[PATCH 3/6] phyCORE-AM335x: Update default enviroment
Teresa Gámez
t.gamez at phytec.de
Fri Oct 10 02:14:30 PDT 2014
- Set default bootsource to the $boosource variable
- Pass ip to kernel on all boot options
- mount rootfs rw
Signed-off-by: Teresa Gámez <t.gamez at phytec.de>
---
.../phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc | 7 +++++--
.../phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand | 5 ++++-
.../phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi | 4 +++-
.../defaultenv-phycore-am335x/config-board | 10 ++++++++++
4 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc
index 32854d1..6a60761 100644
--- a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc
@@ -1,5 +1,8 @@
#!/bin/sh
-global.bootm.image=/boot/uImage
+global.bootm.image=/boot/linuximage
#global.bootm.oftree=/boot/oftree
-global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rootwait"
+
+bootargs-ip
+
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait"
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand
index cdfd93d..d9ef145 100644
--- a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand
@@ -2,4 +2,7 @@
global.bootm.image="/dev/nand0.kernel.bb"
#global.bootm.oftree="/env/oftree"
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root,2048 rootfstype=ubifs"
+
+bootargs-ip
+
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root,2048 rw rootfstype=ubifs"
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi
index 7a53d84..c87299a 100644
--- a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi
@@ -2,5 +2,7 @@
global.bootm.image="/dev/m25p0.kernel"
+bootargs-ip
+
# Use rootfs form NAND for now as rootfs partition < 4MB
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root,2048 rootfstype=ubifs"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root,2048 rw rootfstype=ubifs"
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board
index 7f0b2b7..a492ed1 100644
--- a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board
@@ -5,3 +5,13 @@
global.hostname=pcm051
global.linux.bootargs.base="console=ttyO0,115200"
+
+if [ $bootsource = mmc ]; then
+ global.boot.default="mmc nand spi net"
+elif [ $boosource = nand ]; then
+ global.boot.default="nand spi mmc net"
+elif [ $boosource = spi ]; then
+ global.boot.default="spi nand mmc net"
+elif [ $boosource = net ]; then
+ global.boot.default="net nand spi mmc"
+fi
--
1.9.1
More information about the barebox
mailing list