openwrt/target/linux/mvebu/image/generic-arm64.bootscript
Vladimir Vid 886f524c6b mvebu: image: fix generic-arm64.bootscript mmc selection
Not all versions of ESPRESSObin require SD card, but can
be booted from the internal emmc flash (mmc dev 1) instead.
Add a simple check in the bootscript to see which mmc device
is detected and boot from it using mmcdev variable.

Tested-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
(cherry picked from commit 008b41b9b0)
2019-06-28 21:52:21 +02:00

17 lines
330 B
Plaintext

setenv bootargs "root=PARTUUID=@ROOT@-02 rw rootwait"
if test -n "${console}"; then
setenv bootargs "${bootargs} ${console}"
fi
if mmc dev 0; then
setenv mmcdev 0
elif mmc dev 1; then
setenv mmcdev 1
fi
load mmc ${mmcdev}:1 ${fdt_addr} @DTB@.dtb
load mmc ${mmcdev}:1 ${kernel_addr} Image
booti ${kernel_addr} - ${fdt_addr}