diff options
author | Klaus Goger <klaus.goger@theobroma-systems.com> | 2015-07-30 16:56:59 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2015-07-30 17:00:33 +0200 |
commit | 8af27b76fce329f4f24a5397c392ed3309e14977 (patch) | |
tree | 9b18655db9df39121a51cd9baf525aec1d2d9c17 | |
parent | b36851f43e75fd94cac602a96c1664b201934c69 (diff) |
detect bootdevice in u-boot boot script
with the emmcboot command we can detect the boot device and set the
root device for the linux bootargs accordingly.
Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
-rw-r--r-- | boot.cmd | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3,7 +3,8 @@ # Compile this file: # mkimage -C none -A arm -T script -d boot.cmd boot.scr -setenv bootargs console=ttyS2,115200 root=/dev/mmcblk0p1 rw rootwait +if emmcboot; then rootdevice=mmcblk0p1; else rootdevice=mmcblk1p1; fi +setenv bootargs console=ttyS2,115200 root=/dev/${rootdevice} rw rootwait ext4load mmc 0:1 0x40008000 boot/uImage ext4load mmc 0:1 0x40000000 boot/sun6i-a31-pangolin.dtb bootm 0x40008000 - 0x40000000 |