Booting from SD card

Has anyone managed to boot from SD yet?

I don’t know about everyone else, but I haven’t. Whilst I can mount the SD card from an eMMC based image, I can’t boot from it, even using the latest kernel.

Yes, same here.

My current stab in the dark is that the bootloader is not capable of booting from Class 10 cards.

I have ordered a Class 4 SD card to test and a serial cable so I can see what’s going on.

I have partly booted, using the default kernel, I have Tux’es and a log, but the boot process gets stuck after “random: nonblocking pool is initialized”. The kernel still reacts to USB events and magic SysRq keys.

The eMMC kernel has a similar (on adv7533_set_video to kthread) albeit different trace on boot, but manages to recover fine.

It turns out I get the same results without the SDcard. I guess the bootloader doesn’t find the kernel image on the SDcard and defaults to eMMC. Of course, I have flashed boot-fat.img beforehand.

For reference, the log I’m talking about in previous post is here: https://drive.google.com/file/d/0B9Lwf-0Ueco_Z1Y3RGY0OTNmcFpHdHphVzR5QkR1SFdYcEhF/view?usp=sharing

Unfortunately, you’re still not booting from SD.

This is the behaviour of the kernel in boot-fat.img that you flashed to eMMC.

I’m still waiting on my delivery [Class 4 SD card and Serial => USB cable].

Once it arrives I’ll have some more fun and get back to you.

Indeed. I think my behavior commes from an error in the quick start guide: the files on the hikey-jessie_developer_20150208-104.img to be dd’ed on the SD (contains hi6220-hikey.dtb, Image and initrd.img-3.18.0-linaro-hikey) don’t match the required ones according to the Building the kernel/Install onto SD Card section. It states:

File names are important. Refer to Table 2 to find out all four files that expected to be in the boot partition. In case any of these missing from SD's boot partition, it will fall back to eMMC boot partition and boot from eMMC.

Renaming hi6220-hikey.dtb to lcb.dtb, initrd.img-3.18.0-linaro-hikey to ramdisk.img and adding cmdline changes the behavior: the kernel doesn’t boot from eMMC anymore, but shows no sign of life except keyboard leds lightning up. I take it as a sign that it can read the SDcard.

My cable arrived today.

You are right, it was bailing out due to incorrectly named files:

[1970:1:1 0:34:52][376463]SD Card has been detected. [1970:1:1 0:34:52][376619][fastboot]: sd_init begin [1970:1:1 0:34:52][383894][fastboot]: sd_init over [1970:1:1 0:34:52][384229]fat ok [1970:1:1 0:34:52][384330]Partition 1: Filesystem: FAT16 "boot " [1970:1:1 0:35:1][670228]rest_init: read kernel bytes 00b9d8f0 [1970:1:1 0:35:1][670564]rest_init: failed to read ramdisk -1 [1970:1:1 0:35:1][670719]Partition 1: Filesystem: FAT16 "BOOT IMG " [1970:1:1 0:35:1][685012]rest_init: read kernel bytes 00b9d8f0 [1970:1:1 0:35:1][688859]rest_init: read ramdisk bytes 002f2642 [1970:1:1 0:35:1][689236]rest_init: read dtb bytes 000143fc [1970:1:1 0:35:1][689499]rest_init: read cmdline console=tty0 console=ttyAMA0,115200n8 root=/dev/mmcblk1p2 rootwait rw

I too changed them and get a better response:

[1970:1:1 0:0:13][375944]SD Card has been detected. [1970:1:1 0:0:13][376098][fastboot]: sd_init begin [1970:1:1 0:0:13][382953][fastboot]: sd_init over [1970:1:1 0:0:13][383285]fat ok [1970:1:1 0:0:13][383383]Partition 1: Filesystem: FAT16 "boot " [1970:1:1 0:0:22][669276]rest_init: read kernel bytes 00b9d8f0 [1970:1:1 0:0:24][742312]rest_init: read ramdisk bytes 002f2642 [1970:1:1 0:0:24][744941]rest_init: read dtb bytes 000143fc [1970:1:1 0:0:24][745406]rest_init: read cmdline console=tty0 console=ttyAMA0,115200n8 root=/dev/mmcblk1p2 rootwait rw [1970:1:1 0:0:24][745722]cmd_line_mem_size = 0x40000000 [1970:1:1 0:0:24][745884]creat_kernelsize_cmdline : cmd_line_mem_size = 0x0000038cMB

Now it is failing to find /dev/mmcblk1p2 and dropping into a initramfs shell:

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Waiting for root file system ... done. Gave up waiting for root device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Check root= (did the system wait for the right device?) - Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/mmcblk1p2 does not exist. Dropping to a shell!

BusyBox v1.22.1 (Debian 1:1.22.0-9+b1) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

/bin/sh: can’t access tty; job control turned off
(initramfs)

When I take a look in /dev, only the eMMC appears to be present:

(initramfs) ls /dev/ | grep mmc mmcblk0 mmcblk0boot0 mmcblk0boot1 mmcblk0p1 mmcblk0p2 mmcblk0p3 mmcblk0p4 mmcblk0p5 mmcblk0p6 mmcblk0p7 mmcblk0p8 mmcblk0p9

Today I have tried with http://www.ebay.in/itm/like/191519408553?aff_source=Sok-Goog card and which is not working for me.