arm: boards: phytec-som-am335x: Update boot scripts
PATCH v4 1/1 arm: boards: phytec-som-am335x: Update boot scripts
Expand the boot scripts with EMMC and add a default file source for expansions.
Removed "rw" and "rootwait" bootargs from existing boot scripts. Added "rootflags='data=journal'" bootarg to SD card boot script.
--- .../phytec-som-am335x/defaultenv-physom-am335x/boot/emmc | 5 +++++ .../phytec-som-am335x/defaultenv-physom-am335x/boot/mmc | 7 +++---- .../phytec-som-am335x/defaultenv-physom-am335x/boot/nand | 2 +- .../phytec-som-am335x/defaultenv-physom-am335x/boot/net | 15 +++++++++++++++ .../phytec-som-am335x/defaultenv-physom-am335x/boot/spi | 2 +- .../defaultenv-physom-am335x/init/bootsource | 16 ++++++++++++---- 6 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc create mode 100644 arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc new file +5 -0
@@ -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'"
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc +3 -4
@@ -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'"
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand +1 -1
@@ -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"
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net new file +15 -0
@@ -0,0 +1,15 @@ +#!/bin/sh + +path="/mnt/tftp" + +global.bootm.image="${path}/${global.user}-linux-${global.hostname}" + +oftree="${path}/${global.user}-oftree-${global.hostname}" +if [ -f "${oftree}" ]; then + global.bootm.oftree="$oftree" +fi + +nfsroot="/nfsroot/${global.hostname}" +bootargs-ip + +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,udp"
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi +1 -1
@@ -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"
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource +12 -4
@@ -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
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
could you also please apply these patches to the next release?
ls: Fix showing links to directories
fs: Implement links to directories
fs: drop path_check_prereq()
errno: Include string for ELOOP
arm: mach-omap: Change mountpoint of boot partitions
fs: Create automount entries for the default mount pathes
Daniel
Am 13.06.2017 um 15:37 schrieb Daniel Schultz:
Quoted 114 lines
Expand the boot scripts with EMMC and add a default file source for expansions.
Removed "rw" and "rootwait" bootargs from existing boot scripts. Added "rootflags='data=journal'" bootarg to SD card boot script.
Signed-off-by Daniel Schultz <[email protected]>--- .../phytec-som-am335x/defaultenv-physom-am335x/boot/emmc | 5 +++++ .../phytec-som-am335x/defaultenv-physom-am335x/boot/mmc | 7 +++---- .../phytec-som-am335x/defaultenv-physom-am335x/boot/nand | 2 +- .../phytec-som-am335x/defaultenv-physom-am335x/boot/net | 15 +++++++++++++++ .../phytec-som-am335x/defaultenv-physom-am335x/boot/spi | 2 +- .../defaultenv-physom-am335x/init/bootsource | 16 ++++++++++++---- 6 files changed, 37 insertions(+), 10 deletions(-)create mode 100644
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmccreate mode 100644arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/netarch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc new file +5
-0@@ -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'"arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/mmc +3
-4@@ -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'"arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/nand +1
-1@@ -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"arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net new file +15
-0@@ -0,0 +1,15 @@ +#!/bin/sh + +path="/mnt/tftp" + +global.bootm.image="${path}/${global.user}-linux-${global.hostname}" + +oftree="${path}/${global.user}-oftree-${global.hostname}" +if [ -f "${oftree}" ]; then + global.bootm.oftree="$oftree" +fi + +nfsroot="/nfsroot/${global.hostname}" +bootargs-ip + +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,udp"arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/spi +1
-1@@ -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"arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource +12
-4@@ -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
Signature · 8 lines
Mit freundlichen Grüßen, With best regards, Daniel Schultz _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 10 lines · Daniel Schultz
Expand the boot scripts with EMMC and add a default file source for expansions.
Removed "rw" and "rootwait" bootargs from existing boot scripts. Added "rootflags='data=journal'" bootarg to SD card boot script.
Signed-off-by Daniel Schultz <[email protected]>---
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net new file +2
-0+#!/bin/sh +
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net line 12
Quoted 10 lines
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net new file +10
-0+path="/mnt/tftp" + +global.bootm.image="${path}/${global.user}-linux-${global.hostname}" + +oftree="${path}/${global.user}-oftree-${global.hostname}" +if [ -f "${oftree}" ]; then + global.bootm.oftree="$oftree" +fi + +nfsroot="/nfsroot/${global.hostname}"
This assumed there is one nfsroot for all users. The intention with the original naming was that each user can create a link in his home directory to wherever the nfsroot lives, which may include some globally available nfsroot for all users. Why change it?
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net line 15
Quoted 3 lines
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net new file +3
-0+bootargs-ip + +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,udp"
Why udp? Normally tcp is preferred, no?
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi Sascha,
Am 19.06.2017 um 09:25 schrieb Sascha Hauer:
Quoted 18 lines · Daniel Schultz
Quoted 17 lines
Expand the boot scripts with EMMC and add a default file source for expansions.
Removed "rw" and "rootwait" bootargs from existing boot scripts. Added "rootflags='data=journal'" bootarg to SD card boot script.
Signed-off-by Daniel Schultz <[email protected]>---
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net new file +9
-0+#!/bin/sh + +path="/mnt/tftp" + +global.bootm.image="${path}/${global.user}-linux-${global.hostname}" + +oftree="${path}/${global.user}-oftree-${global.hostname}" +if [ -f "${oftree}" ]; then + global.bootm.oftree="$oftree"
Quoted 9 lines
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net line 12
Quoted 3 lines
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net new file +3
-0+fi + +nfsroot="/nfsroot/${global.hostname}"This assumed there is one nfsroot for all users. The intention with the original naming was that each user can create a link in his home directory to wherever the nfsroot lives, which may include some globally available nfsroot for all users. Why change it?
Seems like this was an older script. We will switch to the Barebox network boot script.
Quoted 6 lines
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net line 15
Quoted 3 lines
arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net new file +3
-0+bootargs-ip + +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,udp"Why udp? Normally tcp is preferred, no?
UDP is used as default by the nfsroot kernel system and also by tftp. Additionally, we had troubles with booting in tcp mode.
Quoted 2 lines
Sascha
Signature · 8 lines
Mit freundlichen Grüßen, With best regards, Daniel Schultz _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox