mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Stefan Christ <s.christ@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 04/10] ARM: phytec-som-imx6: update environment
Date: Fri, 6 Nov 2015 11:21:52 +0100	[thread overview]
Message-ID: <1446805318-26691-5-git-send-email-s.christ@phytec.de> (raw)
In-Reply-To: <1446805318-26691-1-git-send-email-s.christ@phytec.de>

From: Christian Hemp <c.hemp@phytec.de>

Rename sd-ext3 to mmc, remove filesystem type from bootargs and remove
bootargs-ip. Add init script 'bootsource' to set boot source priority
and bootscript 'spi' for SPI NOR.

Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Signed-off-by: Stefan Christ <s.christ@phytec.de>
---
 .../phytec-som-imx6/defaultenv-physom-imx6/boot/mmc       |  5 +++++
 .../phytec-som-imx6/defaultenv-physom-imx6/boot/nand      |  1 -
 .../phytec-som-imx6/defaultenv-physom-imx6/boot/sd-ext3   |  6 ------
 .../phytec-som-imx6/defaultenv-physom-imx6/boot/spi       |  5 +++++
 .../defaultenv-physom-imx6/init/bootsource                | 15 +++++++++++++++
 .../defaultenv-physom-imx6/nv/boot.default                |  1 -
 6 files changed, 25 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/mmc
 delete mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/sd-ext3
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/spi
 create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/init/bootsource
 delete mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/nv/boot.default

diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/mmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/mmc
new file mode 100644
index 0000000..332fc26
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/mmc
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+global.bootm.image="/mnt/mmc/linuximage"
+global.bootm.oftree="/mnt/mmc/oftree"
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootwait rw"
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/nand b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/nand
index 79dc03c..a23aa21 100644
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/nand
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/nand
@@ -2,5 +2,4 @@
 
 global.bootm.image="/dev/nand0.kernel.bb"
 global.bootm.oftree="/dev/nand0.oftree.bb"
-bootargs-ip
 global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs rw"
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/sd-ext3 b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/sd-ext3
deleted file mode 100644
index fd35fe0..0000000
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/sd-ext3
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-global.bootm.image="/mnt/mmc/linuximage"
-global.bootm.oftree="/mnt/mmc/oftree"
-bootargs-ip
-global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rootwait rw"
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/spi b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/spi
new file mode 100644
index 0000000..2000a16
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/boot/spi
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+global.bootm.image="/dev/m25p0.kernel"
+global.bootm.oftree="/dev/m25p0.oftree"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs rw"
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/init/bootsource b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/init/bootsource
new file mode 100644
index 0000000..3f2ff4b
--- /dev/null
+++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/init/bootsource
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+if [ -n "$nv.boot.default" ]; then
+	exit
+fi
+
+if [ $bootsource = mmc ]; then
+	global.boot.default="mmc nand spi net"
+elif [ $bootsource = nand ]; then
+	global.boot.default="nand spi mmc net"
+elif [ $bootsource = spi ]; then
+	global.boot.default="spi nand mmc net"
+elif [ $bootsource = net ]; then
+	global.boot.default="net nand spi mmc"
+fi
diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/nv/boot.default b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/nv/boot.default
deleted file mode 100644
index 026a25c..0000000
--- a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6/nv/boot.default
+++ /dev/null
@@ -1 +0,0 @@
-nand
-- 
1.9.1


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

  parent reply	other threads:[~2015-11-06 10:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 10:21 [PATCH 00/10] Rework towards phytec-som-imx6 and new variants Stefan Christ
2015-11-06 10:21 ` [PATCH 01/10] ARM: imx6: phycard: use numeric suffix in device tree Stefan Christ
2015-11-06 10:21 ` [PATCH 02/10] boards: Add phytec-som-imx6 Stefan Christ
2015-11-06 10:21 ` [PATCH 03/10] ARM: phytec-som-imx6: set loadaddr to start of DDR memory Stefan Christ
2015-11-06 10:21 ` Stefan Christ [this message]
2015-11-06 10:21 ` [PATCH 05/10] ARM: pfla02: append suffix 1bank Stefan Christ
2015-11-06 10:21 ` [PATCH 06/10] ARM: imx6q: pfla02: Add support for 512MiB RAM on one bank Stefan Christ
2015-11-06 10:21 ` [PATCH 07/10] ARM: imx6dl: pfla02: Add support for 128MB and 256MB RAM Stefan Christ
2015-11-06 10:21 ` [PATCH 08/10] ARM: imx6q: pfla02: add phyFLEX-i.MX6 DualLite 1GiB on one bank Stefan Christ
2015-11-06 10:21 ` [PATCH 09/10] ARM: imx6q: Add support for Phytec phyCORE-i.MX6 SOM Stefan Christ
2015-11-06 10:21 ` [PATCH 10/10] ARM: imx6dl: " Stefan Christ
2015-11-09  6:45   ` Sascha Hauer
2015-11-09  8:50     ` Stefan Christ
2015-11-09  6:49 ` [PATCH 00/10] Rework towards phytec-som-imx6 and new variants Sascha Hauer
2015-11-09 12:09   ` Stefan Christ
2015-11-10  8:36     ` 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=1446805318-26691-5-git-send-email-s.christ@phytec.de \
    --to=s.christ@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