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>
master
Vladimir Vid 5 years ago committed by Petr Štetiar
parent f342ffd300
commit 008b41b9b0

@ -4,7 +4,13 @@ if test -n "${console}"; then
setenv bootargs "${bootargs} ${console}"
fi
load mmc 0:1 ${fdt_addr} @DTB@.dtb
load mmc 0:1 ${kernel_addr} Image
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}

Loading…
Cancel
Save