The following procedure is useful during development. Instead of flashing all to the Edison eMMC the rootfs goes on an external SDHC or USB disk. This has the advantage that you will alsways have a bootable system from which you can inspect or modify stuf preventing your experimental system from booting. And if not, you can pull the disk and fix from your PC.
Back track to Building the image.
You will find the image here:
The rootfs is
edison-image-edison.ext4. This you can write to your sdcard.
And if necessary unmount:
sudo umount /dev/sdX
Take care: the following command will erase everything on your sdcard:
sudo sh -c 'cat edison-image-edison.ext4 >/dev/sdX' && sync
sudo dd bs=1M if=edison-image-edison.ext4 of=/dev/sdX && sync
Make absolutely sure you know the device representing the sdcard, on my system it was
bmaptool create -o edison-image-edison.bmap edison-image-edison.ext4 sudo bmaptool copy edison-image-edison.ext4 /dev/sdc
You need to check, repair and resize the disk after this. You can use GParted for this. On the command line it is:
sudo e2fsck -f -y -v -C 0 /dev/sdX
sudo resize2fs -p /dev/sdX
During U-Boot press
or during running linux (f.i. on the emmc disk):
Support for this has been removed. U-Boot currently does not support the USB, so can not load the kernel from a USB disk. Booting from external disk requires the kernel to be loaded from emmc or sdhc.
Further, booting from USB prevents you from using the USB in gadget mode to obtain network access, unless you have a fancy USB expander with built-in ethernet port (like SMSC LAN9514 Eval Board)
If your external rootfs is based on the current kernel on the boot partition (or if you updated the boot partition with your latest
edison-image-edison.hddimg) you can use that kernel to boot your usb disk as you see fit. We leave it to your imagination to add a line to U-Boot’s
edison.env to make this work.
© 2018 Ferry Toth