前回は、u-bootが立ち上がったもののinitを起動させることができず、どうしたらよいのか分からないところで終わった。
そこまで日記に書いたところ、uramdisk.image.gzを事前に展開しておく必要があるということを @ksmakoto さんに教わった。 確かにその通りで、u-bootはinitがどこにあるのか(実際にはuramdisk.image.gzに格納されている)がどこにあるのかも知らないし、それをメモリに展開したところで場所を教えないとどうしようもない。 どうしたらよいのだろうと調査した結果、Xilinxの以下のページを発見し、試行してみた。
なるほど、以下のようにしてイメージをメモリに展開するのか。さらに展開した場所をカーネルに教えてやり、起動する。
u-boot> fatload mmc 0 0x3000000 uImage u-boot> fatload mmc 0 0x2A00000 devicetree.dtb u-boot> fatload mmc 0 0x2000000 uramdisk.image.gz u-boot> bootm 0x3000000 0x2000000 0x2A00000
同じように実行すると、起動し始めた。よしよし。
brd: module loaded loop: module loaded libphy: XEMACPS mii bus: probed [Firmware Warn]: /amba@0/eth@e000b000/phy@0: Whitelisted compatible string. Please remove xemacps e000b000.eth: pdev->id -1, baseaddr 0xe000b000, irq 33 ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver usbcore: registered new interface driver usb-storage usbcore: registered new interface driver usbserial usbcore: registered new interface driver usbserial_generic usbserial: USB Serial support registered for generic usbcore: registered new interface driver ftdi_sio usbserial: USB Serial support registered for FTDI USB Serial Device mousedev: PS/2 mouse device common for all mice i2c /dev entries driver xiic-i2c 41600000.i2c: input clock not found. xiic-i2c: probe of 41600000.i2c failed with error -2 Xilinx Zynq CpuIdle Driver started sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman sdhci-pltfm: SDHCI platform and OF driver helper mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA ledtrig-cpu: registered to indicate activity on CPUs hidraw: raw HID events driver (C) Jiri Kosina usbcore: registered new interface driver usbhid usbhid: USB HID core driver adv7511-hdmi-snd fpga-axi@0:adv7511_hdmi_snd: ASoC: CODEC DAI adv7511 not registered mmc0: new high speed SDHC card at address 1234 zed-adau1761-snd fpga-axi@0:zed_sound: ASoC: CODEC DAI adau-hifi not registered mmcblk0: mmc0:1234 SA08G 7.25 GiB mmcblk0: p1 p2 p3 p4 NET: Registered protocol family 17 zynq_pm_ioremap: no compatible node found for 'xlnx,zynq-ddrc-a05' zynq_pm_late_init: Unable to map DDRC IO memory. Registering SWP/SWPB emulation handler of_graph_get_next_endpoint(): no port node found in /fpga-axi@0/axi_hdmi@70e00000 adv7511-hdmi-snd fpga-axi@0:adv7511_hdmi_snd: ASoC: CODEC DAI adv7511 not registered zed-adau1761-snd fpga-axi@0:zed_sound: ASoC: CODEC DAI adau-hifi not registered hctosys: unable to open rtc device (rtc0) xemacps e000b000.eth: Set clk to 25000000 Hz xemacps e000b000.eth: link up (100/FULL) Sending DHCP requests ., OK IP-Config: Got DHCP answer from 192.168.0.1, my address is 192.168.0.7 IP-Config: Complete: device=eth0, hwaddr=00:0a:35:00:01:22, ipaddr=192.168.0.7, mask=255.255.255.0, gw=192.168.0.1 host=192.168.0.7, domain=airport, nis-domain=(none) bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath= nameserver0=192.168.0.1 ALSA device list: No soundcards found. Freeing unused kernel memory: 248K (c0698000 - c06d6000) This architecture does not have kernel memory protection. init: cannot find '/system/bin/debuggerd64', disabling 'debuggerd64'ev/block/mmcblk0p3,target=/data,type=ext4)=0 init: cannot find '/system/bin/install-recovery.sh', disabling 'flash_recovery' Unable to find swap-space signature shell@zedboard:/
しかししばらく待っていると、以下のエラーメッセージを吐いてリブートしてしまった。えー、何だこりゃ。
$ init: critical process 'healthd' exited 4 times in 4 minutes; rebooting into recovery mode reboot: Restarting system with command 'recovery'
調査していると、以下のブログを発見した。
うーん、nfsが関係しているのか?以下を追加してみよう。
setenv bootargs 'earlyprintk maxcpus=1 console=ttyPS0,115200 ip=dhcp root=/dev/nfs nfsroot=192.168.1.2:/export/root/zedroid,nfsvers=3 rw init=/init' saveenv
今度は、以下のエラーを出して同様にリブートがかかってしまった。
init: critical process 'servicemanager' exited 4 times in 4 minutes; rebooting into recovery mode eboot: Restarting system with command 'recovery'
うーん、まだ調整が必要だなあ。