diff options
author | Daniel Schultz <d.schultz@phytec.de> | 2017-06-27 16:28:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-06-30 07:56:54 +0200 |
commit | 1d662436001a8e464906227f722555771aa0eb0a (patch) | |
tree | b243397cce10f93a36cb27560c8b2e4bfaaea564 | |
parent | 1a21d7af398b3b8b360142147fd2a9d0197f56ce (diff) | |
download | barebox-1d662436001a8e464906227f722555771aa0eb0a.tar.gz barebox-1d662436001a8e464906227f722555771aa0eb0a.tar.xz |
arm: boards: phytec-som-am335x: Update boot scripts
Expand the boot scripts by eMMC and clean them up.
Add NV variable files and removed unnecessary kernel bootargs from the
boot scripts.
Add "rootflags='data=journal'" bootarg to SD card boot script.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
9 files changed, 26 insertions, 10 deletions
diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc new file mode 100644 index 0000000000..b1792a6ff0 --- /dev/null +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc @@ -0,0 +1,5 @@ +#!/bin/sh + +global.bootm.image=/mnt/mmc1.0/linuximage +global.bootm.oftree=/mnt/mmc1.0/oftree +global.linux.bootargs.dyn.root="root=/dev/mmcblk1p2 rootflags='data=journal'" diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc index 834669df62..77a076df58 100644 --- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc @@ -1,6 +1,5 @@ #!/bin/sh -global.bootm.image=/boot/linuximage -global.bootm.oftree=/boot/oftree - -global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rw rootwait" +global.bootm.image=/mnt/mmc0.0/linuximage +global.bootm.oftree=/mnt/mmc0.0/oftree +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootflags='data=journal'" diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand index ece44b70dc..33f5f022ab 100644 --- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand @@ -5,4 +5,4 @@ global.bootm.image="/dev/nand0.root.ubi.kernel" global.bootm.oftree="/dev/nand0.root.ubi.oftree" -global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rw rootfstype=ubifs" +global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs" diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi index 71c5834c0b..a321aa986f 100644 --- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi @@ -4,4 +4,4 @@ global.bootm.image="/dev/m25p0.kernel" global.bootm.oftree="/dev/m25p0.oftree" # Use rootfs from NAND -global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rw rootfstype=ubifs" +global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs" diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource index 3f2ff4bcc8..61a0879bfb 100644 --- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource @@ -4,12 +4,20 @@ if [ -n "$nv.boot.default" ]; then exit fi -if [ $bootsource = mmc ]; then - global.boot.default="mmc nand spi net" +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 nand mmc net" + global.boot.default="spi $nvmem mmc net" elif [ $bootsource = net ]; then - global.boot.default="net nand spi mmc" + global.boot.default="net $nvmem spi mmc" fi diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/allow_color b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/allow_color new file mode 100644 index 0000000000..c508d5366f --- /dev/null +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/allow_color @@ -0,0 +1 @@ +false diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/boot.watchdog_timeout b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/boot.watchdog_timeout new file mode 100644 index 0000000000..abdfb053e4 --- /dev/null +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/boot.watchdog_timeout @@ -0,0 +1 @@ +60 diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/linux.bootargs.base b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/linux.bootargs.base new file mode 100644 index 0000000000..efc4ee63d4 --- /dev/null +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/linux.bootargs.base @@ -0,0 +1 @@ +consoleblank=0 diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/linux.bootargs.rootfs b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/linux.bootargs.rootfs new file mode 100644 index 0000000000..199c7b52ec --- /dev/null +++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/nv/linux.bootargs.rootfs @@ -0,0 +1 @@ +rootwait ro fsck.repair=yes |