aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu
diff options
context:
space:
mode:
authorVladimir Vid <vladimir.vid@sartura.hr>2019-06-07 15:58:15 +0200
committerPetr Štetiar <ynezz@true.cz>2019-06-18 16:12:52 +0200
commit008b41b9b0ddd4c5c877a769a85d27eb9c4e21a4 (patch)
tree1877cb2a7f8bc864795c9c280531b769ab86ed01 /target/linux/mvebu
parentf342ffd300da48aa352c51bd65afebf6419b2228 (diff)
downloadupstream-008b41b9b0ddd4c5c877a769a85d27eb9c4e21a4.tar.gz
upstream-008b41b9b0ddd4c5c877a769a85d27eb9c4e21a4.tar.bz2
upstream-008b41b9b0ddd4c5c877a769a85d27eb9c4e21a4.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>
Diffstat (limited to 'target/linux/mvebu')
-rw-r--r--target/linux/mvebu/image/generic-arm64.bootscript10
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}