BBBのkernelの再構築を試みる。
makeの手順は以下で詳しく説明されている。
http://wiki.beyondlogic.org/index.php/BeagleBoneBlack_Building_Kernel
上記URLでの手順ではKernel3.12で説明されているが、今回は作成したmicroSDの環境の Kernelの換装が目的であるので、Kernel3.8で手順をなぞる。
先ずはクロスコンパイルのtool-chainとgit、u-bootをインストールする。
temp-host@temp-host:~$ sudo apt-get install gcc-arm-linux-gnueabi temp-host@temp-host:~$ sudo apt-get install git temp-host@temp-host:~$ git config --global user.email "temp-host.email@temp-host.com" temp-host@temp-host:~$ sudo apt-get install lzop temp-host@temp-host:~$ wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 temp-host@temp-host:~$ tar -xjf u-boot-latest.tar.bz2 #cd into u-boot directory temp-host@temp-host:~$ cd u-boot-2014.07 temp-host@temp-host:~$ make tools-only temp-host@temp-host:~$ sudo install tools/mkimage /usr/local/bin temp-host@temp-host:~$ mkdir bbb_kernel.3.8 temp-host@temp-host:~$ cd bbb_kernel.3.8/ temp-host@temp-host:~/bbb_kernel.3.8$ git clone git://github.com/beagleboard/kernel.git Cloning into 'kernel'... remote: Counting objects: 31953, done. remote: Total 31953 (delta 0), reused 0 (delta 0) Receiving objects: 100% (31953/31953), 17.51 MiB | 4.27 MiB/s, done. Resolving deltas: 100% (21512/21512), done. Checking connectivity... done. temp-host@temp-host:~/bbb_kernel.3.8$ temp-host@temp-host:~$ cd kernel/ temp-host@temp-host:~/bbb_kernel.3.8/kernel$ git checkout 3.8 Branch 3.8 set up to track remote branch 3.8 from origin. Switched to a new branch '3.8'
patch.shを実行。
ちなみにpatch.shの実行は仮想環境でのゲストOSでは一時間半以上かかる。
ログは長いので省略する。
temp-host@temp-host:~$ ./patch.sh
次にdefconfigの差し替えを行う。
temp-host@temp-host:~/bbb_kernel.3.8/kernel$ cp configs/beaglebone kernel/arch/arm/configs/beaglebone_defconfig temp-host@temp-host:~/bbb_kernel.3.8/kernel$ wget http://arago-project.org/git/projects/?p=am33x-cm3.git\;a=blob_plain\;f=bin/am335x-pm-firmware.bin\;hb=HEAD -O kernel/firmware/am335x-pm-firmware.bin --2014-09-14 01:21:31-- http://arago-project.org/git/projects/?p=am33x-cm3.git;a=blob_plain;f=bin/am335x-pm-firmware.bin;hb=HEAD arago-project.org (arago-project.org) をDNSに問いあわせています... 184.73.161.183 arago-project.org (arago-project.org)|184.73.161.183|:80 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 10796 (11K) [application/octet-stream] `kernel/firmware/am335x-pm-firmware.bin' に保存中 100%[======================================>] 10,796 61.7KB/s 時間 0.2s 2014-09-14 01:21:32 (61.7 KB/s) - `kernel/firmware/am335x-pm-firmware.bin' へ保存完了 [10796/10796] temp-host@temp-host:~/bbb_kernel.3.8/kernel$ cd kernel temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- beaglebone_defconfig -j4 HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf drivers/video/Kconfig:60:error: recursive dependency detected! drivers/video/Kconfig:60: symbol FB is selected by DRM_KMS_HELPER drivers/gpu/drm/Kconfig:28: symbol DRM_KMS_HELPER is selected by DRM_TILCDC drivers/gpu/drm/tilcdc/Kconfig:1: symbol DRM_TILCDC depends on BACKLIGHT_LCD_SUPPORT drivers/video/backlight/Kconfig:5: symbol BACKLIGHT_LCD_SUPPORT is selected by FB_BACKLIGHT drivers/video/Kconfig:247: symbol FB_BACKLIGHT is selected by PMAC_BACKLIGHT drivers/macintosh/Kconfig:134: symbol PMAC_BACKLIGHT depends on FB warning: (USB_MUSB_HDRC) selects TWL6030_USB which has unmet direct dependencies (USB_SUPPORT && (USB || USB_GADGET) && TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS) warning: (DVB_USB_PCTV452E) selects TTPCI_EEPROM which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_PCI_SUPPORT && MEDIA_DIGITAL_TV_SUPPORT && I2C) warning: (USB_MUSB_HDRC) selects TWL6030_USB which has unmet direct dependencies (USB_SUPPORT && (USB || USB_GADGET) && TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS) warning: (DVB_USB_PCTV452E) selects TTPCI_EEPROM which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_PCI_SUPPORT && MEDIA_DIGITAL_TV_SUPPORT && I2C) # # configuration written to .config #
準備が整ったのでkernelとdtbsをmakeする。
temp-host@temp-host:~/bbb_kernel.3.8/kernel$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage dtbs LOADADDR=0x80008000 -j4
Kernelのフルビルドであるが10分程度。
ログは長いので省略する。
引き続きmodulesのmakeを行う。
temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules -j4
特に問題無くmakeが完了。
ログは長いので省略する。
Kernel makeの成果物は以下
temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ ls -la ./arch/arm/boot/ 合計 15776 drwxrwxr-x 5 temp-host temp-host 4096 9月 14 01:39 . drwxrwxr-x 87 temp-host temp-host 4096 9月 14 01:13 .. -rw-rw-r-- 1 temp-host temp-host 107 9月 14 01:39 .Image.cmd -rw-rw-r-- 1 temp-host temp-host 46 9月 14 00:57 .gitignore -rw-rw-r-- 1 temp-host temp-host 243 9月 14 01:39 .uImage.cmd -rw-rw-r-- 1 temp-host temp-host 134 9月 14 01:39 .zImage.cmd -rwxrwxr-x 1 temp-host temp-host 7250272 9月 14 01:39 Image -rw-rw-r-- 1 temp-host temp-host 3404 9月 14 01:10 Makefile drwxrwxr-x 2 temp-host temp-host 4096 9月 14 00:57 bootp drwxrwxr-x 2 temp-host temp-host 4096 9月 14 01:39 compressed drwxrwxr-x 3 temp-host temp-host 36864 9月 14 01:28 dts -rw-rw-r-- 1 temp-host temp-host 1274 9月 14 01:06 install.sh -rw-rw-r-- 1 temp-host temp-host 4408216 9月 14 01:39 uImage -rwxrwxr-x 1 temp-host temp-host 4408152 9月 14 01:39 zImage temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$
これでkernel関連のmakeは完了した。
実は6月に試した際はいくつもの問題があり色々細工が必要であった。
9月現在ではスムーズに完了するようになっている。
ubootやrootfsを一から再構築するのは面倒であるので、これまでに構築したmicroSDカードのものを流用することとし、 上記makeの生成物をmicroSDカードの内容と差し替える。
debianなのでdpkgが使えるのかもしれないが、原始的に手動コピーで行う。
母艦(ゲストOS)でこれまでに構築したmicroSDカードを認識させる。
母艦(ゲストOS)に/media/temp-host/BEAGLE_BONE/として認識されたとして手順を進める。
先ずはzImageおよびdtbsの内容物を手動でコピーする。
temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ ls -la /media/temp-host/BEAGLE_BONE/ 合計 7494 drwx------ 8 temp-host temp-host 16384 1月 1 1970 . drwxr-x---+ 4 root root 4096 9月 14 22:35 .. drwx------ 2 temp-host temp-host 2048 5月 14 22:19 App drwx------ 4 temp-host temp-host 2048 5月 14 22:19 Docs drwx------ 5 temp-host temp-host 2048 5月 14 22:19 Drivers -rw-r--r-- 1 temp-host temp-host 51 5月 14 22:18 ID.txt -rw-r--r-- 1 temp-host temp-host 41174 5月 14 22:19 LICENSE.txt -rw-r--r-- 1 temp-host temp-host 82424 5月 14 22:18 MLO -rw-r--r-- 1 temp-host temp-host 16822 5月 14 22:19 README.htm -rw-r--r-- 1 temp-host temp-host 292 5月 14 22:19 README.md -rw-r--r-- 1 temp-host temp-host 313 5月 14 22:18 SOC.sh -rw-r--r-- 1 temp-host temp-host 16822 5月 14 22:19 START.htm -rw-r--r-- 1 temp-host temp-host 223 5月 14 22:19 autorun.inf drwx------ 2 temp-host temp-host 2048 5月 14 22:18 debug drwx------ 2 temp-host temp-host 2048 5月 14 22:18 dtbs -rw-r--r-- 1 temp-host temp-host 2957458 5月 14 22:18 initrd.img drwx------ 2 temp-host temp-host 2048 5月 14 22:19 scripts -rw-r--r-- 1 temp-host temp-host 401704 5月 14 22:18 u-boot.img -rw-r--r-- 1 temp-host temp-host 1672 5月 14 22:18 uEnv.txt -rw-r--r-- 1 temp-host temp-host 4103240 5月 14 22:18 zImage temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ mkdir /media/temp-host/BEAGLE_BONE/kernel3.8.13.bone.50 temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ mv /media/temp-host/BEAGLE_BONE/zImage /media/temp-host/BEAGLE_BONE/kernel3.8.13.bone.50/ temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ mv /media/temp-host/BEAGLE_BONE/dtbs /media/temp-host/BEAGLE_BONE/kernel3.8.13.bone.50/ temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ mkdir /media/temp-host/BEAGLE_BONE/dtbs temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ cp ./arch/arm/boot/dts/*.dtb /media/temp-host/BEAGLE_BONE/dtbs/
zImageおよびdtbsの内容物は一応バックアップを取ることとする。
しかしこのパーティションの容量は少ないし、ディスクイメージは残してあるのでバッサリ消してしまっても構わない。
残すとしても母艦(ゲストOS)に残すので良いだろう。
次にmodulesのinstallを行う。
母艦(ゲストOS)に/media/temp-host/rootfs/として認識されたとして手順を進める。
temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=/media/temp-host/rootfs modules_install
ログは長いので省略
数分で完了する。 一応syncを行う。
temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ sudo sync temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ sudo sync temp-host@temp-host:~/bbb_kernel.3.8/kernel/kernel$ sudo sync
丁寧ではないが、一応これで立ち上がるはずだ。
母艦(ゲストOS)からmicroSDカードを抜きBeagleBone Blackに挿入して起動を行う。
母艦(ホストOS)からUSBシリアルTTLケーブルを介し、TeraTermでシリアル接続を行い起動を試みる。
115200bps 8bit; non parity; stop bit 1; フロー制御なし
U-Boot 2014.04-00015-gb4422bd (Apr 22 2014 - 13:24:29) I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 *** Warning - readenv() failed, using default environment Net: not set. Validating first E-fuse MAC cpsw, usb_ether Hit any key to stop autoboot: 0 gpio: pin 53 (gpio 53) value is 1 mmc0 is current device gpio: pin 54 (gpio 54) value is 1 SD/MMC found on device 0 reading uEnv.txt 1704 bytes read in 5 ms (332 KiB/s) gpio: pin 55 (gpio 55) value is 1 Loaded environment from uEnv.txt Importing environment from mmc ... Checking if uenvcmd is set ... gpio: pin 56 (gpio 56) value is 1 Running uenvcmd ... reading zImage 4408152 bytes read in 320 ms (13.1 MiB/s) reading initrd.img 2957458 bytes read in 213 ms (13.2 MiB/s) reading /dtbs/am335x-boneblack.dtb 25814 bytes read in 10 ms (2.5 MiB/s) Kernel image @ 0x82000000 [ 0x000000 - 0x434358 ] ## Flattened Device Tree blob at 88000000 Booting using the fdt blob at 0x88000000 Using Device Tree in place at 88000000, end 880094d5 Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.359478] omap2_mbox_probe: platform not supported [ 0.366038] tps65217-bl tps65217-bl: no platform data provided [ 0.430819] bone-capemgr bone_capemgr.9: slot #0: No cape found [ 0.467926] bone-capemgr bone_capemgr.9: slot #1: No cape found [ 0.505034] bone-capemgr bone_capemgr.9: slot #2: No cape found [ 0.542144] bone-capemgr bone_capemgr.9: slot #3: No cape found [ 0.557118] bone-capemgr bone_capemgr.9: slot #6: BB-BONELT-HDMIN conflict P8.45 (#5:BB-BONELT-HDMI) [ 0.566740] bone-capemgr bone_capemgr.9: slot #6: Failed verification [ 0.581856] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed [ 0.589133] bone-capemgr bone_capemgr.9: loader: failed to load slot-6 BB-BONELT-HDMIN:00A0 (prio 2) [ 0.653750] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8 [ 0.665430] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22 [ 0.672730] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single Loading, please wait... modprobe: chdir(3.8.13-00770-g94e9a39): No such file or directory modprobe: chdir(3.8.13-00770-g94e9a39): No such file or directory modprobe: chdir(3.8.13-00770-g94e9a39): No such file or directory systemd-fsck[211]: rootfs: clean, 79777/221312 files, 422702/917504 blocks Debian GNU/Linux 7 beaglebone ttyO0 default username:password is [debian:temppwd] Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian The IP Address for wlan0 is: 192.168.1.15 The IP Address for usb0 is: 192.168.7.2 beaglebone login: debian Password: Last login: Sat Sep 20 14:25:52 UTC 2014 on ttyO0 Linux beaglebone 3.8.13-00770-g94e9a39 #1 SMP Sun Sep 14 01:39:15 JST 2014 armv7l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. debian@beaglebone:~$ uname -r 3.8.13-00770-g94e9a39
Kernel Versionが3.8.13-00770-g94e9a39に変わっている事を確認。
以下のアラートが出るのはinitrd.imgが古い為。
modprobe: chdir(3.8.13-00770-g94e9a39): No such file or directory modprobe: chdir(3.8.13-00770-g94e9a39): No such file or directory modprobe: chdir(3.8.13-00770-g94e9a39): No such file or directory
引き続きinitrd.imgの更新を行う。
debian@beaglebone:/$ cd /boot/ debian@beaglebone:/boot$ cd uboot/ debian@beaglebone:/boot/uboot$ ls -la total 7798 drwxr-xr-x 10 root root 16384 Jan 1 1970 . drwxr-xr-x 3 root root 4096 May 15 02:57 .. drwxr-xr-x 2 root root 2048 May 14 22:19 App -rwxr-xr-x 1 root root 223 May 14 22:19 autorun.inf drwxr-xr-x 2 root root 2048 May 14 22:18 debug drwxr-xr-x 4 root root 2048 May 14 22:19 Docs drwxr-xr-x 5 root root 2048 May 14 22:19 Drivers drwxr-xr-x 2 root root 2048 Sep 14 23:28 dtbs -rwxr-xr-x 1 root root 51 May 14 22:18 ID.txt -rwxr-xr-x 1 root root 2957458 Sep 20 2014 initrd.img drwxr-xr-x 3 root root 2048 Sep 14 23:17 kernel3.8.13.bone.50 -rwxr-xr-x 1 root root 41174 May 14 22:19 LICENSE.txt -rwxr-xr-x 1 root root 82424 May 14 22:18 MLO -rwxr-xr-x 1 root root 16822 May 14 22:19 README.htm -rwxr-xr-x 1 root root 292 May 14 22:19 README.md drwxr-xr-x 2 root root 2048 May 14 22:19 scripts -rwxr-xr-x 1 root root 313 May 14 22:18 SOC.sh -rwxr-xr-x 1 root root 16822 May 14 22:19 START.htm drwxr-xr-x 2 root root 2048 Sep 14 23:43 System Volume Information -rwxr-xr-x 1 root root 401704 May 14 22:18 u-boot.img -rwxr-xr-x 1 root root 1704 Sep 15 01:30 uEnv.txt -rwxr-xr-x 1 root root 1672 May 14 22:18 uEnv.txt~ -rwxr-xr-x 1 root root 4408152 Sep 14 23:11 zImage debian@beaglebone:/boot/uboot$ sudo update-initramfs -c -k 3.8.13-00770-g94e9a39 update-initramfs: Generating /boot/initrd.img-3.8.13-00770-g94e9a39 debian@beaglebone:/boot$ ls -la ../ total 6812 drwxr-xr-x 3 root root 4096 Sep 20 14:52 . drwxr-xr-x 22 root root 4096 May 15 02:46 .. -rw-r--r-- 1 root root 6950530 Sep 20 14:52 initrd.img-3.8.13-00770-g94e9a39 drwxr-xr-x 10 root root 16384 Jan 1 1970 uboot debian@beaglebone:/boot/uboot$ sudo rm initrd.img debian@beaglebone:/boot/uboot$ sudo mv ../initrd.img-3.8.13-00770-g94e9a39 ./initrd.img debian@beaglebone:/boot/uboot$ ls -la total 11696 drwxr-xr-x 10 root root 16384 Sep 20 15:01 . drwxr-xr-x 3 root root 4096 Sep 20 15:01 .. drwxr-xr-x 2 root root 2048 May 14 22:19 App -rwxr-xr-x 1 root root 223 May 14 22:19 autorun.inf drwxr-xr-x 2 root root 2048 May 14 22:18 debug drwxr-xr-x 4 root root 2048 May 14 22:19 Docs drwxr-xr-x 5 root root 2048 May 14 22:19 Drivers drwxr-xr-x 2 root root 2048 Sep 14 23:28 dtbs -rwxr-xr-x 1 root root 51 May 14 22:18 ID.txt -rwxr-xr-x 1 root root 6950530 Sep 20 14:52 initrd.img drwxr-xr-x 3 root root 2048 Sep 14 23:17 kernel3.8.13.bone.50 -rwxr-xr-x 1 root root 41174 May 14 22:19 LICENSE.txt -rwxr-xr-x 1 root root 82424 May 14 22:18 MLO -rwxr-xr-x 1 root root 16822 May 14 22:19 README.htm -rwxr-xr-x 1 root root 292 May 14 22:19 README.md drwxr-xr-x 2 root root 2048 May 14 22:19 scripts -rwxr-xr-x 1 root root 313 May 14 22:18 SOC.sh -rwxr-xr-x 1 root root 16822 May 14 22:19 START.htm drwxr-xr-x 2 root root 2048 Sep 14 23:43 System Volume Information -rwxr-xr-x 1 root root 401704 May 14 22:18 u-boot.img -rwxr-xr-x 1 root root 1704 Sep 15 01:30 uEnv.txt -rwxr-xr-x 1 root root 1672 May 14 22:18 uEnv.txt~ -rwxr-xr-x 1 root root 4408152 Sep 14 23:11 zImage debian@beaglebone:/boot/uboot$ cd .. debian@beaglebone:/boot$ ls -la total 24 drwxr-xr-x 3 root root 4096 Sep 20 15:01 . drwxr-xr-x 22 root root 4096 May 15 02:46 .. drwxr-xr-x 10 root root 16384 Sep 20 15:01 uboot
initrd.imgが2957458Byteから6950530Byteに膨れ上がってしまっている。
initrd.imgの作り方が間違っているのかもしれないし、kernel configのせいかもしれない。
とりあえずパーティション容量内に収まっているので良しとする。
rebootを行う。
debian@beaglebone:/boot$ sudo reboot Broadcast message from root@beaglebone (ttyO0) (Sat Sep 20 15:02:18 2014): The system is going down for reboot NOW! debian@beaglebone:/boot$ Sending SIGTERM to remaining processes... Sending SIGKILL to remaining processes... Unmounting file systems. Unmounted /sys/kernel/security. Unmounted /dev/mqueue. Unmounted /sys/kernel/debug. Disabling swaps. Detaching loop devices. Detaching DM devices. [ 605.948908] (NULL device *): gadget not registered. [ 605.970664] Restarting system. U-Boot SPL 2014.04-00015-gb4422bd (Apr 22 2014 - 13:24:29) reading args spl_load_image_fat_os: error reading image args, err - -1 reading u-boot.img reading u-boot.img U-Boot 2014.04-00015-gb4422bd (Apr 22 2014 - 13:24:29) I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 *** Warning - readenv() failed, using default environment Net: not set. Validating first E-fuse MAC cpsw, usb_ether Hit any key to stop autoboot: 0 gpio: pin 53 (gpio 53) value is 1 mmc0 is current device gpio: pin 54 (gpio 54) value is 1 SD/MMC found on device 0 reading uEnv.txt 1704 bytes read in 5 ms (332 KiB/s) gpio: pin 55 (gpio 55) value is 1 Loaded environment from uEnv.txt Importing environment from mmc ... Checking if uenvcmd is set ... gpio: pin 56 (gpio 56) value is 1 Running uenvcmd ... reading zImage 4408152 bytes read in 322 ms (13.1 MiB/s) reading initrd.img 6950530 bytes read in 419 ms (15.8 MiB/s) reading /dtbs/am335x-boneblack.dtb 25814 bytes read in 11 ms (2.2 MiB/s) Kernel image @ 0x82000000 [ 0x000000 - 0x434358 ] ## Flattened Device Tree blob at 88000000 Booting using the fdt blob at 0x88000000 Using Device Tree in place at 88000000, end 880094d5 Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.661679] omap2_mbox_probe: platform not supported [ 0.668288] tps65217-bl tps65217-bl: no platform data provided [ 0.733567] bone-capemgr bone_capemgr.9: slot #0: No cape found [ 0.770674] bone-capemgr bone_capemgr.9: slot #1: No cape found [ 0.807782] bone-capemgr bone_capemgr.9: slot #2: No cape found [ 0.844892] bone-capemgr bone_capemgr.9: slot #3: No cape found [ 0.859831] bone-capemgr bone_capemgr.9: slot #6: BB-BONELT-HDMIN conflict P8.45 (#5:BB-BONELT-HDMI) [ 0.869436] bone-capemgr bone_capemgr.9: slot #6: Failed verification [ 0.884568] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed [ 0.891845] bone-capemgr bone_capemgr.9: loader: failed to load slot-6 BB-BONELT-HDMIN:00A0 (prio 2) [ 0.956494] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8 [ 0.968177] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22 [ 0.975472] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single Loading, please wait... Scanning for Btrfs filesystems systemd-fsck[213]: rootfs: clean, 79967/221312 files, 426975/917504 blocks Debian GNU/Linux 7 beaglebone ttyO0 default username:password is [debian:temppwd] Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian The IP Address for wlan0 is: 192.168.1.15 The IP Address for usb0 is: 192.168.7.2 beaglebone login:
initrd.img理由のアラートは消えた。
相変わらず以下のfailedが出ているが気にしない事にする。
[ 0.884568] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed
なぜかBBBからNFSがマウントできなくなっている。
debian@beaglebone:~$ sudo mount 192.168.1.19:/home/temp-host/nfsroot /mnt/hostnfs mount: wrong fs type, bad option, bad superblock on 192.168.1.19:/home/temp-host/nfsroot, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program) In some cases useful info is found in syslog - try dmesg | tail or so
dmesgを見ても理由が良く判らない。
google検索すると似たトラブルが出ていて、nfs-commonをインストールすると解決した報告があった。
debian@beaglebone:~$ sudo apt-get install nfs-common Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libgssglue1 libnfsidmap2 libtirpc1 rpcbind Suggested packages: open-iscsi watchdog The following NEW packages will be installed: libgssglue1 libnfsidmap2 libtirpc1 nfs-common rpcbind 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 426 kB of archives. After this operation, 1053 kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.us.debian.org/debian/ wheezy/main libgssglue1 armhf 0.4-2 [21.6 kB] Get:2 http://ftp.us.debian.org/debian/ wheezy/main libnfsidmap2 armhf 0.25-4 [34.4 kB] Get:3 http://ftp.us.debian.org/debian/ wheezy/main libtirpc1 armhf 0.2.2-5 [72.0 kB] Get:4 http://ftp.us.debian.org/debian/ wheezy/main rpcbind armhf 0.2.0-8 [40.0 kB] Get:5 http://ftp.us.debian.org/debian/ wheezy/main nfs-common armhf 1:1.2.6-4 [258 kB] Fetched 426 kB in 7s (58.0 kB/s) Selecting previously unselected package libgssglue1:armhf. (Reading database ... 61224 files and directories currently installed.) Unpacking libgssglue1:armhf (from .../libgssglue1_0.4-2_armhf.deb) ... Selecting previously unselected package libnfsidmap2:armhf. Unpacking libnfsidmap2:armhf (from .../libnfsidmap2_0.25-4_armhf.deb) ... Selecting previously unselected package libtirpc1:armhf. Unpacking libtirpc1:armhf (from .../libtirpc1_0.2.2-5_armhf.deb) ... Selecting previously unselected package rpcbind. Unpacking rpcbind (from .../rpcbind_0.2.0-8_armhf.deb) ... Selecting previously unselected package nfs-common. Unpacking nfs-common (from .../nfs-common_1%3a1.2.6-4_armhf.deb) ... Processing triggers for man-db ... Setting up libgssglue1:armhf (0.4-2) ... Setting up libnfsidmap2:armhf (0.25-4) ... Setting up libtirpc1:armhf (0.2.2-5) ... Setting up rpcbind (0.2.0-8) ... [ ok ] Starting rpcbind (via systemctl): rpcbind.service. Setting up nfs-common (1:1.2.6-4) ... Creating config file /etc/idmapd.conf with new version Creating config file /etc/default/nfs-common with new version Adding system user `statd' (UID 109) ... Adding new user `statd' (UID 109) with group `nogroup' ... Not creating home directory `/var/lib/nfs'. [ ok ] Starting nfs-common (via systemctl): nfs-common.service. debian@beaglebone:~$
少し時間がかかるがインストールできた。
BBB側でnfsのmountを試みる。
debian@beaglebone:~$ sudo mount 192.168.1.19:/home/temp-host/nfsroot /mnt/hostnfs debian@beaglebone:~$ mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=62919,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620) tmpfs on /run type tmpfs (rw,nosuid,relatime,size=102072k,mode=755) /dev/mmcblk0p2 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) tmpfs on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) securityfs on /sys/kernel/security type securityfs (rw,relatime) mqueue on /dev/mqueue type mqueue (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) /dev/mmcblk0p1 on /boot/uboot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/mmcblk1p2 on /media/rootfs type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks) /dev/mmcblk1p1 on /media/boot type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1002,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) 192.168.1.19:/home/temp-host/nfsroot on /mnt/hostnfs type nfs4 (rw,relatime,vers=4.0,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.15,local_lock=none,addr=192.168.1.19) debian@beaglebone:~$ cd /mnt/hostnfs/ debian@beaglebone:/mnt/hostnfs$ touch /mnt/hostnfs/test.txt debian@beaglebone:/mnt/hostnfs$
ホスト側でもtest.txtが生成されている事を確認。
nfsがmountできる事は確認できた。
kernelを差し替える前と後で、設定が異なる部分がどうもあるようだ。
ただ、細かく調べる時間は無いのでとりあえず問題毎に対処するか諦めることとする。
何にせよソースコードと対応の取れたKernel環境一式が出来上がったので、必要に応じてkernelを弄れるようになった。