summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Christ <s.christ@phytec.de>2016-04-27 12:04:43 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-02 08:13:00 +0200
commitc3318ae77f1cfb5e3ec2053c78518c0028e4661d (patch)
treeebde7da5c8d3c4353151d5802f50ed77ef061dfd
parent0a7a5e73aad52b912f5845a56403d11db18063e8 (diff)
downloadbarebox-c3318ae77f1cfb5e3ec2053c78518c0028e4661d.tar.gz
barebox-c3318ae77f1cfb5e3ec2053c78518c0028e4661d.tar.xz
ARM: phytec-som-imx6: fix bootsource for phyCORE-i.MX6
The phyCORE-i.MX6 has either a NAND or EMMC storage device and an external SD-Card interface. The automatic bootsource detection in the barebox environment should reflect that. - If the board was booted from the external SD-Card interface, it should continue loading the kernel and device tree from it. - If the board was booted from EMMC, it should load kernel and device tree from the boot partition on the EMMC. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource
new file mode 100644
index 0000000000..515613b041
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/init/bootsource
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ -n "$nv.boot.default" ]; then
+ exit
+fi
+
+if [ $bootsource = mmc ]; then
+ if [ $bootsource_instance = 0 ]; then
+ global.boot.default="mmc emmc nand spi net"
+ elif [ $bootsource_instance = 3 ]; then
+ global.boot.default="emmc mmc nand spi net"
+ fi
+elif [ $bootsource = nand ]; then
+ global.boot.default="nand spi emmc mmc net"
+elif [ $bootsource = spi ]; then
+ global.boot.default="spi nand emmc mmc net"
+elif [ $bootsource = net ]; then
+ global.boot.default="net nand spi emmc mmc"
+fi