summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource
blob: 61a0879bfb7f0c52b1d518e45550033210aa4db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

if [ -n "$nv.boot.default" ]; then
	exit
fi

if [ -e /dev/mmc1.0 ]; then
	nvmem="emmc"
else
	nvmem="nand"
fi

if [ $bootsource = mmc -a $bootsource_instance = 1 ]; then
	global.boot.default="emmc mmc spi net"
elif [ $bootsource = mmc -a $bootsource_instance = 0 ]; then
	global.boot.default="mmc $nvmem spi net"
elif [ $bootsource = nand ]; then
	global.boot.default="nand spi mmc net"
elif [ $bootsource = spi ]; then
	global.boot.default="spi $nvmem mmc net"
elif [ $bootsource = net ]; then
	global.boot.default="net $nvmem spi mmc"
fi