1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 21:48:23 +02:00

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>
This commit is contained in:
Vladimir Vid 2019-06-07 15:58:15 +02:00 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}