mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Daniel Schultz <d.schultz@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 5/7] arm: boards: phytec-som-am335x: Update boot scripts
Date: Fri, 28 Apr 2017 14:46:06 +0200	[thread overview]
Message-ID: <1493383568-27798-5-git-send-email-d.schultz@phytec.de> (raw)
In-Reply-To: <1493383568-27798-1-git-send-email-d.schultz@phytec.de>

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 <d.schultz@phytec.de>
---
 .../defaultenv-physom-am335x/boot/emmc                  |  7 +++++++
 .../phytec-som-am335x/defaultenv-physom-am335x/boot/mmc |  7 ++++---
 .../defaultenv-physom-am335x/boot/nand                  |  4 +++-
 .../phytec-som-am335x/defaultenv-physom-am335x/boot/net | 17 +++++++++++++++++
 .../phytec-som-am335x/defaultenv-physom-am335x/boot/spi |  4 +++-
 .../defaultenv-physom-am335x/init/bootsource            | 16 ++++++++++++----
 6 files changed, 46 insertions(+), 9 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

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 0000000..ed0f240
--- /dev/null
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/emmc
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+global.bootm.image=/mnt/emmc/linuximage
+global.bootm.oftree=/mnt/emmc/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 834669d..21b16f4 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,7 @@
 #!/bin/sh
 
-global.bootm.image=/boot/linuximage
-global.bootm.oftree=/boot/oftree
+[ -e /env/config-expansions ] && /env/config-expansions
 
-global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rw rootwait"
+global.bootm.image=/mnt/mmc/linuximage
+global.bootm.oftree=/mnt/mmc/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 ece44b7..fa695bb 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
@@ -1,8 +1,10 @@
 #!/bin/sh
 
+[ -e /env/config-expansions ] && /env/config-expansions
+
 [ ! -e /dev/nand0.root.ubi ] && ubiattach /dev/nand0.root
 
 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/net b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net
new file mode 100644
index 0000000..6dbd2aa
--- /dev/null
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/boot/net
@@ -0,0 +1,17 @@
+#!/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
+
+[ -e /env/config-expansions ] && /env/config-expansions
+
+global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,vers=3,udp"
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 71c5834..2d88626 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
@@ -1,7 +1,9 @@
 #!/bin/sh
 
+[ -e /env/config-expansions ] && /env/config-expansions
+
 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 3f2ff4b..61a0879 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
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2017-04-28 12:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 12:46 [PATCH 1/7] arm: mach-omap: Change file flags in emmc handler Daniel Schultz
2017-04-28 12:46 ` [PATCH 2/7] arm: boards: Add MLO handler for EMMC devices Daniel Schultz
2017-04-28 12:46 ` [PATCH 3/7] arm: mach-omap: Change mountpoint of boot partitions Daniel Schultz
2017-05-02  6:52   ` Sascha Hauer
2017-04-28 12:46 ` [PATCH 4/7] arm: boards: phytec-som-am335x: Add automount script Daniel Schultz
2017-04-28 12:46 ` Daniel Schultz [this message]
2017-04-28 12:46 ` [PATCH 6/7] arm: boards: beaglebone: Update boot scripts Daniel Schultz
2017-05-02  7:11   ` Sascha Hauer
2017-04-28 12:46 ` [PATCH 7/7] arm: boards: afi-gf: Update SD card boot script Daniel Schultz
2017-05-05  7:03 ` [PATCH 1/7] arm: mach-omap: Change file flags in emmc handler Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493383568-27798-5-git-send-email-d.schultz@phytec.de \
    --to=d.schultz@phytec.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox