Linuxカーネル4.1をビルド・インストール

Linuxカーネル4.1が公開されましたので、
さっそく、ビルド・インストールしてみました。


毎度のことなので、ビルドまでを行うシェルスクリプトを作ってみました
https://github.com/cupnes/sandbox/blob/master/build_kernel.sh

  • 「初期設定(ここから)」から「初期設定(ここまで)」の範囲を設定し、実行すれば、debパッケージ作成までを行います


あとは、以下のコマンドでインストール

sudo dpkg -i linux-image-3.16.1_20140817_i386.deb linux-headers-3.16.1_20140817_i386.deb


ビルドの所要時間は、1時間23分でした


インストール後、無事に起動を確認

$ uname -a
Linux dyna 4.1.0 #1 SMP Mon Jun 22 19:46:15 JST 2015 i686 GNU/Linux


以下は、取り留めもなく色々と調べた結果

カーネルコンフィグの増減

4.0 -> 4.1 で減ったコンフィギュレーション
  • CONFIG_ZONE_DMA32
  • CONFIG_AUDIT_ARCH
  • CONFIG_GENERIC_CLOCKEVENTS_BUILD
  • CONFIG_MEMTEST
  • CONFIG_X86_UP_APIC_MSI
  • CONFIG_MICROCODE_INTEL_EARLY
  • CONFIG_MICROCODE_AMD_EARLY
  • CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE
  • CONFIG_NET_DSA_MV88E6060
  • CONFIG_NET_DSA_MV88E6131
  • CONFIG_NET_DSA_MV88E6123_61_65
  • CONFIG_NET_DSA_MV88E6171
  • CONFIG_NET_DSA_MV88E6352
  • CONFIG_NET_DSA_BCM_SF2
  • CONFIG_AMD_XGBE
  • CONFIG_NET_XGENE
  • CONFIG_AMD_XGBE_PHY
  • CONFIG_SERIAL_MFD_HSU
  • CONFIG_TCG_TIS_I2C_ST33
  • CONFIG_GPIO_SCH311X
  • CONFIG_GPIO_LYNXPOINT
  • CONFIG_GPIO_ADP5588
  • CONFIG_GPIO_PCH
  • CONFIG_HID_HUION
  • CONFIG_INTEL_MID_DMAC
  • CONFIG_DW_DMAC_CORE
  • CONFIG_F2FS_FS
  • CONFIG_NET_MPLS_GSO
  • CONFIG_TCM_USER
  • CONFIG_TOUCHSCREEN_SUR40
  • CONFIG_GPIO_F7188X
  • CONFIG_GPIO_ICH
  • CONFIG_GPIO_BT8XX
4.0 -> 4.1 で増えたコンフィギュレーション
  • CONFIG_PGTABLE_LEVELS
  • CONFIG_RCU_EXPEDITE_BOOT
  • CONFIG_MULTIUSER
  • CONFIG_HAVE_ARCH_HUGE_VMAP
  • CONFIG_ARCH_HAS_ELF_RANDOMIZE
  • CONFIG_X86_PMEM_LEGACY
  • CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT
  • CONFIG_TIPC_MEDIA_UDP
  • CONFIG_BT_DEBUGFS
  • CONFIG_BT_INTEL
  • CONFIG_BT_BCM
  • CONFIG_BT_HCIBTUSB_BCM
  • CONFIG_BT_HCIUART_INTEL
  • CONFIG_BT_HCIUART_BCM
  • CONFIG_CFG80211_WEXT_EXPORT
  • CONFIG_NFC_NXP_NCI
  • CONFIG_MTD_PARTITIONED_MASTER
  • CONFIG_BLK_DEV_PMEM
  • CONFIG_MD_CLUSTER
  • CONFIG_DM_MQ_DEFAULT
  • CONFIG_DM_LOG_WRITES
  • CONFIG_NET_CADENCE
  • CONFIG_MACB
  • CONFIG_TCG_TIS_ST33ZP24
  • CONFIG_SPI_CADENCE
  • CONFIG_GPIO_DWAPB
  • CONFIG_GPIO_F7188X
  • CONFIG_GPIO_ICH
  • CONFIG_GPIO_ADP5588
  • CONFIG_GPIO_BT8XX
  • CONFIG_GPIO_PCH
  • CONFIG_SENSORS_NCT7904
  • CONFIG_CADENCE_WATCHDOG
  • CONFIG_BCMA_DRIVER_PCI
  • CONFIG_MFD_MT6397
  • CONFIG_MFD_SKY81452
  • CONFIG_DRM_RADEON_USERPTR
  • CONFIG_DRM_VGEM
  • CONFIG_SND_HDA_CORE
  • CONFIG_USB_CHAOSKEY
  • CONFIG_LEDS_PM8941_WLED
  • CONFIG_RTC_DRV_ABX80X
  • CONFIG_HSU_DMA_PCI
  • CONFIG_VIRTIO_INPUT
  • CONFIG_COMEDI_8254
  • CONFIG_FB_SM750
  • CONFIG_EXT4_ENCRYPTION
  • CONFIG_F2FS_FS
  • CONFIG_DEBUG_TIMEKEEPING
  • CONFIG_PROVE_RCU
  • CONFIG_TRACE_ENUM_MAP_FILE
  • CONFIG_MEMTEST
  • CONFIG_RATIONAL
  • CONFIG_MPLS
  • CONFIG_TCM_USER2
  • CONFIG_TOUCHSCREEN_SX8654
  • CONFIG_GPIO_LYNXPOINT
  • CONFIG_GPIO_SCH311X

変更が加えられたファイル数

4.0から4.1の間で差分があるファイルは 10103個でした


操作ログ

$ git diff --name-only v4.0 v4.1 | wc -l
10103

追加されたファイル

追加されたファイルは、995個でした


なお、同様の方法でv3.19からv4.0にかけて追加されたファイル数を調べると1331個
「v3.19 -> v4.0の変更量は少なく、大きな変更はv4.1に加わる」と聞いていましたが、そうでもない?


操作ログ

$ git diff --name-status v4.0 v4.1 > /tmp/foo.log
$ grep '^A' /tmp/foo.log | cut -c3- > /tmp/linux_4.0_4.1_add_files.log
$ wc -l /tmp/linux_4.0_4.1_add_files.log
995 /tmp/linux_4.0_4.1_add_files.log

追加されたドキュメント数

「Documentation」ディレクトリに追加されたファイル数を調べてみました

差分 追加ファイル数
v3.19 -> v4.0 107
v4.0 -> v4.1 148
  • v4.1の方が多くのファイルが追加されています
  • ただし、v4.1より前に追加された機能についてのドキュメントも追加されていたりするので、v4.1で追加された機能数とイコールにはなりません


操作ログ

$ grep '^Documentation' /tmp/linux_4.0_4.1_add_files.log | wc -l
148
$ grep '^Documentation' /tmp/linux_3.19_4.0_add_files.log | wc -l
107

追加されたドキュメントで気になったもの

testingにsysfsが増えている

  • Documentation/ABI/testing/sysfs-class-led-flash
  • Documentation/ABI/testing/sysfs-platform-dell-laptop


CMA(Contiguous Memory Allocator)のdebugfsが追加された模様

  • Documentation/cma/debugfs.txt

CMAのContiguousとは、「物理連続」の意味
DMAなどで、物理的に連続なメモリ領域が必要な場合に使用する

  • Documentation/device-mapper/log-writes.txt

何かに使えそうだけど、まだ良くわかってない
ユーザー空間から使用するアプリ(?)が以下にアップロードされている
https://github.com/josefbacik/log-writes


zsmallocという新しいメモリアロケータについて

  • Documentation/vm/zsmalloc.txt

まだ良くわかっていないけど、zramを使うらしい
zs_malloc()という関数らしい

追加されたドキュメント一覧

Device Treeに関するドキュメントがほとんど

  • Documentation/ABI/obsolete/sysfs-block-zram
  • Documentation/ABI/stable/sysfs-devices
  • Documentation/ABI/testing/configfs-usb-gadget-printer
  • Documentation/ABI/testing/sysfs-class-led-flash
  • Documentation/ABI/testing/sysfs-platform-dell-laptop
  • Documentation/arm64/acpi_object_usage.txt
  • Documentation/arm64/arm-acpi.txt
  • Documentation/cma/debugfs.txt
  • Documentation/device-mapper/log-writes.txt
  • Documentation/devicetree/bindings/arc/pct.txt
  • Documentation/devicetree/bindings/arm/al,alpine.txt
  • Documentation/devicetree/bindings/arm/altera.txt
  • Documentation/devicetree/bindings/arm/armada-39x.txt
  • Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method.txt
  • Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351.txt
  • Documentation/devicetree/bindings/arm/bcm/brcm,bcm21664.txt
  • Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
  • Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt
  • Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt
  • Documentation/devicetree/bindings/arm/bcm/brcm,brcmstb.txt
  • Documentation/devicetree/bindings/arm/bcm/brcm,cygnus.txt
  • Documentation/devicetree/bindings/arm/cpu-enable-method/al,alpine-smp
  • Documentation/devicetree/bindings/arm/freescale/fsl,vf610-mscm-cpucfg.txt
  • Documentation/devicetree/bindings/arm/freescale/fsl,vf610-mscm-ir.txt
  • Documentation/devicetree/bindings/arm/msm/qcom,idle-state.txt
  • Documentation/devicetree/bindings/arm/omap/ctrl.txt
  • Documentation/devicetree/bindings/arm/omap/l4.txt
  • Documentation/devicetree/bindings/arm/tegra/nvidia,tegra30-actmon.txt
  • Documentation/devicetree/bindings/bus/brcm,bus-axi.txt
  • Documentation/devicetree/bindings/bus/renesas,bsc.txt
  • Documentation/devicetree/bindings/bus/simple-pm-bus.txt
  • Documentation/devicetree/bindings/clock/brcm,kona-ccu.txt
  • Documentation/devicetree/bindings/clock/exynos5433-clock.txt
  • Documentation/devicetree/bindings/clock/fujitsu,mb86s70-crg11.txt
  • Documentation/devicetree/bindings/clock/pistachio-clock.txt
  • Documentation/devicetree/bindings/clock/pwm-clock.txt
  • Documentation/devicetree/bindings/clock/renesas,r8a7778-cpg-clocks.txt
  • Documentation/devicetree/bindings/common-properties.txt
  • Documentation/devicetree/bindings/cris/axis.txt
  • Documentation/devicetree/bindings/cris/boards.txt
  • Documentation/devicetree/bindings/cris/interrupts.txt
  • Documentation/devicetree/bindings/crypto/img-hash.txt
  • Documentation/devicetree/bindings/dma/apm-xgene-dma.txt
  • Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
  • Documentation/devicetree/bindings/dma/jz4780-dma.txt
  • Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt
  • Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
  • Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt
  • Documentation/devicetree/bindings/gpio/gpio-altera.txt
  • Documentation/devicetree/bindings/hwrng/brcm,iproc-rng200.txt
  • Documentation/devicetree/bindings/i2c/brcm,kona-i2c.txt
  • Documentation/devicetree/bindings/i2c/i2c-digicolor.txt
  • Documentation/devicetree/bindings/i2c/i2c-jz4780.txt
  • Documentation/devicetree/bindings/i2c/i2c-xlp9xx.txt
  • Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
  • Documentation/devicetree/bindings/iio/adc/mcp320x.txt
  • Documentation/devicetree/bindings/iio/adc/mcp3422.txt
  • Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
  • Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt
  • Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt
  • Documentation/devicetree/bindings/input/touchscreen/brcm,iproc-touchscreen.txt
  • Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
  • Documentation/devicetree/bindings/input/touchscreen/goodix.txt
  • Documentation/devicetree/bindings/input/touchscreen/sx8654.txt
  • Documentation/devicetree/bindings/interrupt-controller/brcm,bcm3380-l2-intc.txt
  • Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7038-l1-intc.txt
  • Documentation/devicetree/bindings/interrupt-controller/cdns,xtensa-mx.txt
  • Documentation/devicetree/bindings/interrupt-controller/cdns,xtensa-pic.txt
  • Documentation/devicetree/bindings/interrupt-controller/nvidia,tegra-ictlr.txt
  • Documentation/devicetree/bindings/interrupt-controller/st,sti-irq-syscfg.txt
  • Documentation/devicetree/bindings/interrupt-controller/ti,omap4-wugen-mpu
  • Documentation/devicetree/bindings/leds/leds-pm8941-wled.txt
  • Documentation/devicetree/bindings/mailbox/arm-mhu.txt
  • Documentation/devicetree/bindings/media/i2c/mt9v032.txt
  • Documentation/devicetree/bindings/media/i2c/ov2640.txt
  • Documentation/devicetree/bindings/media/i2c/ov2659.txt
  • Documentation/devicetree/bindings/media/ti,omap3isp.txt
  • Documentation/devicetree/bindings/media/xilinx/video.txt
  • Documentation/devicetree/bindings/media/xilinx/xlnx,v-tc.txt
  • Documentation/devicetree/bindings/media/xilinx/xlnx,v-tpg.txt
  • Documentation/devicetree/bindings/media/xilinx/xlnx,video.txt
  • Documentation/devicetree/bindings/memory-controllers/ingenic,jz4780-nemc.txt
  • Documentation/devicetree/bindings/mfd/axp20x.txt
  • Documentation/devicetree/bindings/mfd/brcm,bcm59056.txt
  • Documentation/devicetree/bindings/mfd/da9150.txt
  • Documentation/devicetree/bindings/mfd/mt6397.txt
  • Documentation/devicetree/bindings/mfd/qcom,tcsr.txt
  • Documentation/devicetree/bindings/mfd/sky81452.txt
  • Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
  • Documentation/devicetree/bindings/mips/brcm/soc.txt
  • Documentation/devicetree/bindings/mips/img/pistachio.txt
  • Documentation/devicetree/bindings/misc/brcm,kona-smc.txt
  • Documentation/devicetree/bindings/mmc/brcm,kona-sdhci.txt
  • Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
  • Documentation/devicetree/bindings/mmc/mmc-card.txt
  • Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
  • Documentation/devicetree/bindings/net/brcm,bcm7445-switch-v4.0.txt
  • Documentation/devicetree/bindings/net/brcm,bcmgenet.txt
  • Documentation/devicetree/bindings/net/brcm,systemport.txt
  • Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt
  • Documentation/devicetree/bindings/net/nfc/nxp-nci.txt
  • Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
  • Documentation/devicetree/bindings/panel/ampire,am800480r3tmqwa1h.txt
  • Documentation/devicetree/bindings/panel/auo,b101ean01.txt
  • Documentation/devicetree/bindings/panel/innolux,at043tn24.txt
  • Documentation/devicetree/bindings/panel/innolux,zj070na-01p.txt
  • Documentation/devicetree/bindings/panel/ortustech,com43h4m85ulc.txt
  • Documentation/devicetree/bindings/panel/samsung,ltn140at29-301.txt
  • Documentation/devicetree/bindings/panel/shelly,sca07010-bfn-lnn.txt
  • Documentation/devicetree/bindings/pci/brcm,iproc-pcie.txt
  • Documentation/devicetree/bindings/phy/brcm,kona-usb2-phy.txt
  • Documentation/devicetree/bindings/phy/dm816x-phy.txt
  • Documentation/devicetree/bindings/phy/sun9i-usb-phy.txt
  • Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt
  • Documentation/devicetree/bindings/pinctrl/brcm,cygnus-pinmux.txt
  • Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt
  • Documentation/devicetree/bindings/pinctrl/nvidia,tegra210-pinmux.txt
  • Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
  • Documentation/devicetree/bindings/power/da9150-charger.txt
  • Documentation/devicetree/bindings/power/fsl,imx-gpc.txt
  • Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt
  • Documentation/devicetree/bindings/pwm/brcm,kona-pwm.txt
  • Documentation/devicetree/bindings/reset/brcm,bcm21664-resetmgr.txt
  • Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
  • Documentation/devicetree/bindings/rtc/digicolor-rtc.txt
  • Documentation/devicetree/bindings/security/tpm/st33zp24-spi.txt
  • Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
  • Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
  • Documentation/devicetree/bindings/sound/brcm,bcm2835-i2s.txt
  • Documentation/devicetree/bindings/sound/max98925.txt
  • Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
  • Documentation/devicetree/bindings/sound/renesas,rsrc-card.txt
  • Documentation/devicetree/bindings/sound/storm.txt
  • Documentation/devicetree/bindings/timer/brcm,kona-timer.txt
  • Documentation/devicetree/bindings/usb/brcm,bcm3384-usb.txt
  • Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt
  • Documentation/devicetree/bindings/watchdog/brcm,kona-wdt.txt
  • Documentation/devicetree/of_unittest.txt
  • Documentation/hwmon/nct7904
  • Documentation/i2c/slave-eeprom-backend
  • Documentation/i2c/slave-interface
  • Documentation/leds/leds-class-flash.txt
  • Documentation/md-cluster.txt
  • Documentation/networking/mpls-sysctl.txt
  • Documentation/powerpc/pci_iov_resource_on_powernv.txt
  • Documentation/sound/alsa/timestamping.txt
  • Documentation/vm/zsmalloc.txt
  • Documentation/zh_CN/arm64/legacy_instructions.txt