diff options
author | Vladimir Vid <vladimir.vid@sartura.hr> | 2019-06-07 15:58:15 +0200 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-06-28 21:52:21 +0200 |
commit | 886f524c6b06bfba1f993d6c09b8262ce87cc15e (patch) | |
tree | fee154e3b582ab91dc532c161e08f29edb073ec2 /target/linux/mvebu | |
parent | 9deef062a490ef901d96d552a808ee7b46c1d12c (diff) | |
download | upstream-886f524c6b06bfba1f993d6c09b8262ce87cc15e.tar.gz upstream-886f524c6b06bfba1f993d6c09b8262ce87cc15e.tar.bz2 upstream-886f524c6b06bfba1f993d6c09b8262ce87cc15e.zip |
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 008b41b9b0ddd4c5c877a769a85d27eb9c4e21a4)
Diffstat (limited to 'target/linux/mvebu')
-rw-r--r-- | target/linux/mvebu/image/generic-arm64.bootscript | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/target/linux/mvebu/image/generic-arm64.bootscript b/target/linux/mvebu/image/generic-arm64.bootscript index f395590f84..bb78948253 100644 --- a/target/linux/mvebu/image/generic-arm64.bootscript +++ b/target/linux/mvebu/image/generic-arm64.bootscript @@ -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} |