mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] defenv-2: Make it simpler
@ 2012-11-01 18:52 Sascha Hauer
  2012-11-01 18:52 ` [PATCH 1/3] defenv-2: remove initrd boot script Sascha Hauer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sascha Hauer @ 2012-11-01 18:52 UTC (permalink / raw)
  To: barebox

The feedback I got from defenv-2 is often that it's too complicated. This
is an attempt to make it simpler to increase its acceptance. First several
of the /env/bin/bootargs-* scripts are removed since it adds complexity
for doubtful value. Then the content of several scripts from /env/init/*
is moved to the good old /env/config file. This way the things get back
more concentrated to a single place which is easier to remember.

Sascha

----------------------------------------------------------------
Sascha Hauer (3):
      defenv-2: remove initrd boot script
      defenv-2: remove some helper scripts
      defenv-2: bring back /env/config

 .../boards/crystalfontz-cfa10036/env/boot/mmc-ext3 |    2 +-
 .../crystalfontz-cfa10036/env/init/bootargs-base   |    8 ------
 .../crystalfontz-cfa10036/env/init/config-board    |    7 ++++++
 .../boards/crystalfontz-cfa10036/env/init/hostname |    8 ------
 .../freescale-mx51-pdk/env/init/bootargs-base      |    8 ------
 .../freescale-mx51-pdk/env/init/config-board       |    7 ++++++
 .../boards/freescale-mx51-pdk/env/init/hostname    |    8 ------
 .../freescale-mx6-sabrelite/env/init/bootargs-base |    8 ------
 .../freescale-mx6-sabrelite/env/init/config-board  |    7 ++++++
 .../freescale-mx6-sabrelite/env/init/hostname      |    8 ------
 arch/arm/boards/karo-tx53/env/init/bootargs-base   |    8 ------
 arch/arm/boards/karo-tx53/env/init/config-board    |    7 ++++++
 arch/arm/boards/karo-tx53/env/init/hostname        |    8 ------
 arch/arm/boards/pcm038/env/boot/nand-ubi           |    2 +-
 arch/arm/boards/pcm038/env/init/bootargs-base      |    8 ------
 arch/arm/boards/pcm038/env/init/config-board       |    7 ++++++
 arch/arm/boards/pcm038/env/init/hostname           |    8 ------
 arch/arm/boards/tqma53/env/init/bootargs-base      |    8 ------
 arch/arm/boards/tqma53/env/init/config-board       |    7 ++++++
 arch/arm/boards/tqma53/env/init/hostname           |    8 ------
 defaultenv-2/base/bin/bootargs-ip-barebox          |    7 ------
 defaultenv-2/base/bin/bootargs-ip-dhcp             |    5 ----
 defaultenv-2/base/bin/bootargs-ip-none             |    5 ----
 defaultenv-2/base/bin/bootargs-root-disk           |   26 --------------------
 defaultenv-2/base/bin/bootargs-root-ext            |   12 ---------
 defaultenv-2/base/bin/bootargs-root-initrd         |   16 ------------
 defaultenv-2/base/bin/bootargs-root-jffs2          |   21 ----------------
 defaultenv-2/base/bin/bootargs-root-nfs            |   20 ---------------
 defaultenv-2/base/bin/bootargs-root-ubi            |   24 ------------------
 defaultenv-2/base/bin/init                         |   10 ++++++--
 defaultenv-2/base/boot/initrd                      |   17 -------------
 defaultenv-2/base/boot/net                         |    2 +-
 defaultenv-2/base/config                           |   21 ++++++++++++++++
 defaultenv-2/base/data/boot-template               |    4 +--
 defaultenv-2/base/init/bootargs-base               |    8 ------
 defaultenv-2/base/init/general                     |   15 -----------
 defaultenv-2/base/init/hostname                    |    8 ------
 defaultenv-2/base/init/prompt                      |    7 ------
 defaultenv-2/menu/menu/mainmenu                    |    1 +
 39 files changed, 76 insertions(+), 295 deletions(-)
 delete mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/bootargs-base
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/config-board
 delete mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/hostname
 delete mode 100644 arch/arm/boards/freescale-mx51-pdk/env/init/bootargs-base
 create mode 100644 arch/arm/boards/freescale-mx51-pdk/env/init/config-board
 delete mode 100644 arch/arm/boards/freescale-mx51-pdk/env/init/hostname
 delete mode 100644 arch/arm/boards/freescale-mx6-sabrelite/env/init/bootargs-base
 create mode 100644 arch/arm/boards/freescale-mx6-sabrelite/env/init/config-board
 delete mode 100644 arch/arm/boards/freescale-mx6-sabrelite/env/init/hostname
 delete mode 100644 arch/arm/boards/karo-tx53/env/init/bootargs-base
 create mode 100644 arch/arm/boards/karo-tx53/env/init/config-board
 delete mode 100644 arch/arm/boards/karo-tx53/env/init/hostname
 delete mode 100644 arch/arm/boards/pcm038/env/init/bootargs-base
 create mode 100644 arch/arm/boards/pcm038/env/init/config-board
 delete mode 100644 arch/arm/boards/pcm038/env/init/hostname
 delete mode 100644 arch/arm/boards/tqma53/env/init/bootargs-base
 create mode 100644 arch/arm/boards/tqma53/env/init/config-board
 delete mode 100644 arch/arm/boards/tqma53/env/init/hostname
 delete mode 100644 defaultenv-2/base/bin/bootargs-ip-barebox
 delete mode 100644 defaultenv-2/base/bin/bootargs-ip-dhcp
 delete mode 100644 defaultenv-2/base/bin/bootargs-ip-none
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-disk
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-ext
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-initrd
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-jffs2
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-nfs
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-ubi
 delete mode 100644 defaultenv-2/base/boot/initrd
 create mode 100644 defaultenv-2/base/config
 delete mode 100644 defaultenv-2/base/init/bootargs-base
 delete mode 100644 defaultenv-2/base/init/general
 delete mode 100644 defaultenv-2/base/init/hostname
 delete mode 100644 defaultenv-2/base/init/prompt

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] defenv-2: remove initrd boot script
  2012-11-01 18:52 [PATCH] defenv-2: Make it simpler Sascha Hauer
@ 2012-11-01 18:52 ` Sascha Hauer
  2012-11-01 18:52 ` [PATCH 2/3] defenv-2: remove some helper scripts Sascha Hauer
  2012-11-01 18:52 ` [PATCH 3/3] defenv-2: bring back /env/config Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2012-11-01 18:52 UTC (permalink / raw)
  To: barebox

This is mostly an example and does not have a real use, so remove
it to not have it in each and every environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 defaultenv-2/base/boot/initrd |   17 -----------------
 1 file changed, 17 deletions(-)
 delete mode 100644 defaultenv-2/base/boot/initrd

diff --git a/defaultenv-2/base/boot/initrd b/defaultenv-2/base/boot/initrd
deleted file mode 100644
index 7c44d07..0000000
--- a/defaultenv-2/base/boot/initrd
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	boot-menu-add-entry "$0" "kernel + initrd via tftp"
-	exit
-fi
-
-path="/mnt/tftp"
-global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
-global.bootm.initrd="${path}/initramfs"
-bootargs-root-initrd
-#global.bootm.oftree=<path to oftree>
-
-global.linux.bootargs.dyn.root="root=/dev/ram0"
-
-#bootargs-root-nfs -n "<path on server>" -s <serverip>
-#bootargs-root-ubi -r <volume> -m <mtdname>
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] defenv-2: remove some helper scripts
  2012-11-01 18:52 [PATCH] defenv-2: Make it simpler Sascha Hauer
  2012-11-01 18:52 ` [PATCH 1/3] defenv-2: remove initrd boot script Sascha Hauer
@ 2012-11-01 18:52 ` Sascha Hauer
  2012-11-01 18:52 ` [PATCH 3/3] defenv-2: bring back /env/config Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2012-11-01 18:52 UTC (permalink / raw)
  To: barebox

The added complexity of bootargs-ip-* and bootargs-root-* makes
understanding defenv-2 more complicated. remove them and open
code the scripts instead in their users.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 .../boards/crystalfontz-cfa10036/env/boot/mmc-ext3 |    2 +-
 arch/arm/boards/pcm038/env/boot/nand-ubi           |    2 +-
 defaultenv-2/base/bin/bootargs-ip-barebox          |    7 ------
 defaultenv-2/base/bin/bootargs-ip-dhcp             |    5 ----
 defaultenv-2/base/bin/bootargs-ip-none             |    5 ----
 defaultenv-2/base/bin/bootargs-root-disk           |   26 --------------------
 defaultenv-2/base/bin/bootargs-root-ext            |   12 ---------
 defaultenv-2/base/bin/bootargs-root-initrd         |   16 ------------
 defaultenv-2/base/bin/bootargs-root-jffs2          |   21 ----------------
 defaultenv-2/base/bin/bootargs-root-nfs            |   20 ---------------
 defaultenv-2/base/bin/bootargs-root-ubi            |   24 ------------------
 defaultenv-2/base/boot/net                         |    2 +-
 defaultenv-2/base/data/boot-template               |    4 +--
 13 files changed, 4 insertions(+), 142 deletions(-)
 delete mode 100644 defaultenv-2/base/bin/bootargs-ip-barebox
 delete mode 100644 defaultenv-2/base/bin/bootargs-ip-dhcp
 delete mode 100644 defaultenv-2/base/bin/bootargs-ip-none
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-disk
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-ext
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-initrd
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-jffs2
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-nfs
 delete mode 100644 defaultenv-2/base/bin/bootargs-root-ubi

diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/boot/mmc-ext3 b/arch/arm/boards/crystalfontz-cfa10036/env/boot/mmc-ext3
index 7d7eb50..b2325af 100644
--- a/arch/arm/boards/crystalfontz-cfa10036/env/boot/mmc-ext3
+++ b/arch/arm/boards/crystalfontz-cfa10036/env/boot/mmc-ext3
@@ -7,4 +7,4 @@ fi
 
 global.bootm.image="/mnt/disk0.1/zImage-cfa10036"
 global.bootm.oftree="/mnt/disk0.1/oftree-cfa10036"
-bootargs-root-ext -r 3 -m mmcblk0p3
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p3 rootfstype=ext3 rootwait"
diff --git a/arch/arm/boards/pcm038/env/boot/nand-ubi b/arch/arm/boards/pcm038/env/boot/nand-ubi
index a3f748e..67b0cb4 100644
--- a/arch/arm/boards/pcm038/env/boot/nand-ubi
+++ b/arch/arm/boards/pcm038/env/boot/nand-ubi
@@ -7,4 +7,4 @@ fi
 
 global.bootm.image="/dev/nand0.kernel.bb"
 #global.bootm.oftree="/env/oftree"
-bootargs-root-ubi -r root -m nand0.root
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"
diff --git a/defaultenv-2/base/bin/bootargs-ip-barebox b/defaultenv-2/base/bin/bootargs-ip-barebox
deleted file mode 100644
index 5a3b984..0000000
--- a/defaultenv-2/base/bin/bootargs-ip-barebox
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# pass barebox ip settings for eth0 to Linux
-
-ifup eth0
-
-global.linux.bootargs.dyn.ip="ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask::eth0:"
diff --git a/defaultenv-2/base/bin/bootargs-ip-dhcp b/defaultenv-2/base/bin/bootargs-ip-dhcp
deleted file mode 100644
index dec8ae4..0000000
--- a/defaultenv-2/base/bin/bootargs-ip-dhcp
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-# Do dhcp in Linux
-
-global.linux.bootargs.dyn.ip="ip=dhcp"
diff --git a/defaultenv-2/base/bin/bootargs-ip-none b/defaultenv-2/base/bin/bootargs-ip-none
deleted file mode 100644
index 88aaa21..0000000
--- a/defaultenv-2/base/bin/bootargs-ip-none
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-# disable ip setup in Linux
-
-global.linux.bootargs.dyn.ip="ip=none"
diff --git a/defaultenv-2/base/bin/bootargs-root-disk b/defaultenv-2/base/bin/bootargs-root-disk
deleted file mode 100644
index aa60cf3..0000000
--- a/defaultenv-2/base/bin/bootargs-root-disk
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-usage="$0 [OPTIONS]\n -p <partition>\n -t <fstype>"
-
-while getopt "p:t:h" opt; do
-	if [ ${opt} = p ]; then
-		part=${OPTARG}
-	elif [ ${opt} = t ]; then
-		fstype=${OPTARG}
-	elif [ ${opt} = h ]; then
-		echo -e "$usage"
-		exit 0
-	fi
-done
-
-if [ -z "${part}" ]; then
-	echo "$0: no partition given"
-	exit 1
-fi
-
-if [ -z "${fstype}" ]; then
-	echo "$0: no filesystem type given"
-	exit 1
-fi
-
-global.linux.bootargs.dyn.root="root=/dev/$part rootfstype=$fstype rootwait"
diff --git a/defaultenv-2/base/bin/bootargs-root-ext b/defaultenv-2/base/bin/bootargs-root-ext
deleted file mode 100644
index dbdddb9..0000000
--- a/defaultenv-2/base/bin/bootargs-root-ext
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-while getopt "m:r:" opt; do
-	if [ ${opt} = m ]; then
-		part=${OPTARG}
-	fi
-	if [ ${opt} = r ]; then
-		type=${OPTARG}
-	fi
-done
-
-global.linux.bootargs.dyn.root="root=/dev/$part rootfstype=ext$type rootwait"
diff --git a/defaultenv-2/base/bin/bootargs-root-initrd b/defaultenv-2/base/bin/bootargs-root-initrd
deleted file mode 100644
index cc711a1..0000000
--- a/defaultenv-2/base/bin/bootargs-root-initrd
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-rdinit="/sbin/init"
-
-usage="$0 [OPTIONS]\n -i <rdinitpath> (/sbin/init)"
-
-while getopt "i:h" opt; do
-	if [ ${opt} = i ]; then
-		rdinit=${OPTARG}
-	elif [ ${opt} = h ]; then
-		echo -e "$usage"
-		exit 0
-	fi
-done
-
-global.linux.bootargs.dyn.root="root=/dev/ram0 rdinit=${rdinit}"
diff --git a/defaultenv-2/base/bin/bootargs-root-jffs2 b/defaultenv-2/base/bin/bootargs-root-jffs2
deleted file mode 100644
index a8eb5e7..0000000
--- a/defaultenv-2/base/bin/bootargs-root-jffs2
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-mtd=
-
-usage="$0 [OPTIONS]\n -m <mtd>"
-
-while getopt "m:h" opt; do
-	if [ ${opt} = m ]; then
-		mtd=${OPTARG}
-	elif [ ${opt} = h ]; then
-		echo -e "$usage"
-		exit 0
-	fi
-done
-
-if [ -z "$mtd" ]; then
-	echo -e "$usage"
-	exit 1
-fi
-
-global.linux.bootargs.dyn.root="root=$mtd rootfstype=jffs2"
diff --git a/defaultenv-2/base/bin/bootargs-root-nfs b/defaultenv-2/base/bin/bootargs-root-nfs
deleted file mode 100644
index 355f93d..0000000
--- a/defaultenv-2/base/bin/bootargs-root-nfs
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-usage="$0 [OPTIONS]\n -n <nfspath>\n -s <serverip>"
-
-while getopt "n:s:h" opt; do
-	if [ ${opt} = n ]; then
-		nfsroot=${OPTARG}
-	elif [ ${opt} = s ]; then
-		serverip=${OPTARG}
-	elif [ ${opt} = h ]; then
-		echo -e "$usage"
-		exit 0
-	fi
-done
-
-if [ -n ${serverip} ]; then
-	nfsroot="$serverip:$nfsroot"
-fi
-
-global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
diff --git a/defaultenv-2/base/bin/bootargs-root-ubi b/defaultenv-2/base/bin/bootargs-root-ubi
deleted file mode 100644
index 4260336..0000000
--- a/defaultenv-2/base/bin/bootargs-root-ubi
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-ubiroot=root
-mtd=
-
-usage="$0 [OPTIONS]\n -r <ubiroot> (root)\n -m <mtd>"
-
-while getopt "m:r:h" opt; do
-	if [ ${opt} = r ]; then
-		ubiroot=${OPTARG}
-	elif [ ${opt} = m ]; then
-		mtd=${OPTARG}
-	elif [ ${opt} = h ]; then
-		echo -e "$usage"
-		exit 0
-	fi
-done
-
-if [ -z "$mtd" ]; then
-	echo -e "$usage"
-	exit 1
-fi
-
-global.linux.bootargs.dyn.root="root=ubi0:$ubiroot ubi.mtd=$mtd rootfstype=ubifs"
diff --git a/defaultenv-2/base/boot/net b/defaultenv-2/base/boot/net
index 922bef1..90c25aa 100644
--- a/defaultenv-2/base/boot/net
+++ b/defaultenv-2/base/boot/net
@@ -11,4 +11,4 @@ global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
 #global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
 nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
 bootargs-ip
-bootargs-root-nfs -n "$nfsroot"
+global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
diff --git a/defaultenv-2/base/data/boot-template b/defaultenv-2/base/data/boot-template
index 1cacf18..9297499 100644
--- a/defaultenv-2/base/data/boot-template
+++ b/defaultenv-2/base/data/boot-template
@@ -11,6 +11,4 @@ global.bootm.image=<path to image>
 
 #bootargs-ip
 
-#bootargs-root-nfs -n "<path on server>" -s <serverip>
-#bootargs-root-jffs2 -m <mtdname>
-#bootargs-root-ubi -r <volume> -m <mtdname>
+global.linux.bootargs.dyn.root="root=<rootfs here>"
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] defenv-2: bring back /env/config
  2012-11-01 18:52 [PATCH] defenv-2: Make it simpler Sascha Hauer
  2012-11-01 18:52 ` [PATCH 1/3] defenv-2: remove initrd boot script Sascha Hauer
  2012-11-01 18:52 ` [PATCH 2/3] defenv-2: remove some helper scripts Sascha Hauer
@ 2012-11-01 18:52 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2012-11-01 18:52 UTC (permalink / raw)
  To: barebox

The idea of having /env/init/* scripts was to make the configuration
more flexible and customizable for boards. It turned out though that
people (including myself) do not find the place where they should
change these settings.

So this patch brings back /env/config for defenv-2. The individual
env/init/* scripts are removed and their content is added to
/env/init/config-board. This makes the values from /env/init/config-board
the board specific defaults which can be overwritten in /env/config.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 .../crystalfontz-cfa10036/env/init/bootargs-base   |    8 --------
 .../crystalfontz-cfa10036/env/init/config-board    |    7 +++++++
 .../boards/crystalfontz-cfa10036/env/init/hostname |    8 --------
 .../freescale-mx51-pdk/env/init/bootargs-base      |    8 --------
 .../freescale-mx51-pdk/env/init/config-board       |    7 +++++++
 .../boards/freescale-mx51-pdk/env/init/hostname    |    8 --------
 .../freescale-mx6-sabrelite/env/init/bootargs-base |    8 --------
 .../freescale-mx6-sabrelite/env/init/config-board  |    7 +++++++
 .../freescale-mx6-sabrelite/env/init/hostname      |    8 --------
 arch/arm/boards/karo-tx53/env/init/bootargs-base   |    8 --------
 arch/arm/boards/karo-tx53/env/init/config-board    |    7 +++++++
 arch/arm/boards/karo-tx53/env/init/hostname        |    8 --------
 arch/arm/boards/pcm038/env/init/bootargs-base      |    8 --------
 arch/arm/boards/pcm038/env/init/config-board       |    7 +++++++
 arch/arm/boards/pcm038/env/init/hostname           |    8 --------
 arch/arm/boards/tqma53/env/init/bootargs-base      |    8 --------
 arch/arm/boards/tqma53/env/init/config-board       |    7 +++++++
 arch/arm/boards/tqma53/env/init/hostname           |    8 --------
 defaultenv-2/base/bin/init                         |   10 ++++++++--
 defaultenv-2/base/config                           |   21 ++++++++++++++++++++
 defaultenv-2/base/init/bootargs-base               |    8 --------
 defaultenv-2/base/init/general                     |   15 --------------
 defaultenv-2/base/init/hostname                    |    8 --------
 defaultenv-2/base/init/prompt                      |    7 -------
 defaultenv-2/menu/menu/mainmenu                    |    1 +
 25 files changed, 72 insertions(+), 136 deletions(-)
 delete mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/bootargs-base
 create mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/config-board
 delete mode 100644 arch/arm/boards/crystalfontz-cfa10036/env/init/hostname
 delete mode 100644 arch/arm/boards/freescale-mx51-pdk/env/init/bootargs-base
 create mode 100644 arch/arm/boards/freescale-mx51-pdk/env/init/config-board
 delete mode 100644 arch/arm/boards/freescale-mx51-pdk/env/init/hostname
 delete mode 100644 arch/arm/boards/freescale-mx6-sabrelite/env/init/bootargs-base
 create mode 100644 arch/arm/boards/freescale-mx6-sabrelite/env/init/config-board
 delete mode 100644 arch/arm/boards/freescale-mx6-sabrelite/env/init/hostname
 delete mode 100644 arch/arm/boards/karo-tx53/env/init/bootargs-base
 create mode 100644 arch/arm/boards/karo-tx53/env/init/config-board
 delete mode 100644 arch/arm/boards/karo-tx53/env/init/hostname
 delete mode 100644 arch/arm/boards/pcm038/env/init/bootargs-base
 create mode 100644 arch/arm/boards/pcm038/env/init/config-board
 delete mode 100644 arch/arm/boards/pcm038/env/init/hostname
 delete mode 100644 arch/arm/boards/tqma53/env/init/bootargs-base
 create mode 100644 arch/arm/boards/tqma53/env/init/config-board
 delete mode 100644 arch/arm/boards/tqma53/env/init/hostname
 create mode 100644 defaultenv-2/base/config
 delete mode 100644 defaultenv-2/base/init/bootargs-base
 delete mode 100644 defaultenv-2/base/init/general
 delete mode 100644 defaultenv-2/base/init/hostname
 delete mode 100644 defaultenv-2/base/init/prompt

diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/init/bootargs-base b/arch/arm/boards/crystalfontz-cfa10036/env/init/bootargs-base
deleted file mode 100644
index 4dda550..0000000
--- a/arch/arm/boards/crystalfontz-cfa10036/env/init/bootargs-base
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "Base bootargs"
-	exit
-fi
-
-global.linux.bootargs.base="console=ttyAMA0,115200"
diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/init/config-board b/arch/arm/boards/crystalfontz-cfa10036/env/init/config-board
new file mode 100644
index 0000000..b99866e
--- /dev/null
+++ b/arch/arm/boards/crystalfontz-cfa10036/env/init/config-board
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.hostname=cfa10036
+global.linux.bootargs.base="console=ttyAMA0,115200"
diff --git a/arch/arm/boards/crystalfontz-cfa10036/env/init/hostname b/arch/arm/boards/crystalfontz-cfa10036/env/init/hostname
deleted file mode 100644
index 1dbe346..0000000
--- a/arch/arm/boards/crystalfontz-cfa10036/env/init/hostname
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "hostname"
-	exit
-fi
-
-global.hostname=cfa10036
diff --git a/arch/arm/boards/freescale-mx51-pdk/env/init/bootargs-base b/arch/arm/boards/freescale-mx51-pdk/env/init/bootargs-base
deleted file mode 100644
index d869754..0000000
--- a/arch/arm/boards/freescale-mx51-pdk/env/init/bootargs-base
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "Base bootargs"
-	exit
-fi
-
-global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/freescale-mx51-pdk/env/init/config-board b/arch/arm/boards/freescale-mx51-pdk/env/init/config-board
new file mode 100644
index 0000000..cfc483e
--- /dev/null
+++ b/arch/arm/boards/freescale-mx51-pdk/env/init/config-board
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.hostname=babbage
+global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/freescale-mx51-pdk/env/init/hostname b/arch/arm/boards/freescale-mx51-pdk/env/init/hostname
deleted file mode 100644
index 4c78902..0000000
--- a/arch/arm/boards/freescale-mx51-pdk/env/init/hostname
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "hostname"
-	exit
-fi
-
-global.hostname=babbage
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/env/init/bootargs-base b/arch/arm/boards/freescale-mx6-sabrelite/env/init/bootargs-base
deleted file mode 100644
index 2c51feb..0000000
--- a/arch/arm/boards/freescale-mx6-sabrelite/env/init/bootargs-base
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "Base bootargs"
-	exit
-fi
-
-global.linux.bootargs.base="console=ttymxc1,115200"
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/env/init/config-board b/arch/arm/boards/freescale-mx6-sabrelite/env/init/config-board
new file mode 100644
index 0000000..e39e4b6
--- /dev/null
+++ b/arch/arm/boards/freescale-mx6-sabrelite/env/init/config-board
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.hostname=SabreLite
+global.linux.bootargs.base="console=ttymxc1,115200"
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/env/init/hostname b/arch/arm/boards/freescale-mx6-sabrelite/env/init/hostname
deleted file mode 100644
index db5b2b2..0000000
--- a/arch/arm/boards/freescale-mx6-sabrelite/env/init/hostname
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "hostname"
-	exit
-fi
-
-global.hostname=SabreLite
diff --git a/arch/arm/boards/karo-tx53/env/init/bootargs-base b/arch/arm/boards/karo-tx53/env/init/bootargs-base
deleted file mode 100644
index d869754..0000000
--- a/arch/arm/boards/karo-tx53/env/init/bootargs-base
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "Base bootargs"
-	exit
-fi
-
-global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/karo-tx53/env/init/config-board b/arch/arm/boards/karo-tx53/env/init/config-board
new file mode 100644
index 0000000..3ebfac6
--- /dev/null
+++ b/arch/arm/boards/karo-tx53/env/init/config-board
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.hostname=tx53
+global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/karo-tx53/env/init/hostname b/arch/arm/boards/karo-tx53/env/init/hostname
deleted file mode 100644
index 2de9130..0000000
--- a/arch/arm/boards/karo-tx53/env/init/hostname
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "hostname"
-	exit
-fi
-
-global.hostname=tx53
diff --git a/arch/arm/boards/pcm038/env/init/bootargs-base b/arch/arm/boards/pcm038/env/init/bootargs-base
deleted file mode 100644
index d869754..0000000
--- a/arch/arm/boards/pcm038/env/init/bootargs-base
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "Base bootargs"
-	exit
-fi
-
-global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/pcm038/env/init/config-board b/arch/arm/boards/pcm038/env/init/config-board
new file mode 100644
index 0000000..93fd41b
--- /dev/null
+++ b/arch/arm/boards/pcm038/env/init/config-board
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.hostname=pcm038
+global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/pcm038/env/init/hostname b/arch/arm/boards/pcm038/env/init/hostname
deleted file mode 100644
index 09c2f08..0000000
--- a/arch/arm/boards/pcm038/env/init/hostname
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "hostname"
-	exit
-fi
-
-global.hostname=pcm038
diff --git a/arch/arm/boards/tqma53/env/init/bootargs-base b/arch/arm/boards/tqma53/env/init/bootargs-base
deleted file mode 100644
index d869754..0000000
--- a/arch/arm/boards/tqma53/env/init/bootargs-base
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "Base bootargs"
-	exit
-fi
-
-global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/tqma53/env/init/config-board b/arch/arm/boards/tqma53/env/init/config-board
new file mode 100644
index 0000000..4776438
--- /dev/null
+++ b/arch/arm/boards/tqma53/env/init/config-board
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.hostname=tqma53
+global.linux.bootargs.base="console=ttymxc0,115200"
diff --git a/arch/arm/boards/tqma53/env/init/hostname b/arch/arm/boards/tqma53/env/init/hostname
deleted file mode 100644
index c56ac6a..0000000
--- a/arch/arm/boards/tqma53/env/init/hostname
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "hostname"
-	exit
-fi
-
-global.hostname=tqma53
diff --git a/defaultenv-2/base/bin/init b/defaultenv-2/base/bin/init
index 8e8871d..bb4abcd 100644
--- a/defaultenv-2/base/bin/init
+++ b/defaultenv-2/base/bin/init
@@ -8,12 +8,18 @@ global autoboot_timeout=3
 global boot.default=net
 global allow_color=true
 global linux.bootargs.base
-#linux.bootargs.dyn.* will be clearer at the beginning of boot
+#linux.bootargs.dyn.* will be cleared at the beginning of boot
 global linux.bootargs.dyn.ip
 global linux.bootargs.dyn.root
 global editcmd=sedit
 
-/env/init/general
+/env/config
+
+if [ ${global.allow_color} = "true" ]; then
+        export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m "
+else
+        export PS1="barebox@\h:\w "
+fi
 
 if [ -e /env/menu ]; then
 	echo -e -n "\nHit m for menu or any other key to stop autoboot: "
diff --git a/defaultenv-2/base/config b/defaultenv-2/base/config
new file mode 100644
index 0000000..189e5a6
--- /dev/null
+++ b/defaultenv-2/base/config
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# change network settings in /env/network/eth0
+# change mtd partition settings and automountpoints in /env/init/*
+
+#global.hostname=
+
+# set to false if you do not want to have colors
+global.allow_color=true
+
+# user (used for network filenames)
+global.user=none
+
+# timeout in seconds before the default boot entry is started
+global.autoboot_timeout=3
+
+# default boot entry (one of /env/boot/*)
+global.boot.default=net
+
+# base bootargs
+#global.linux.bootargs.base="console=ttyS0,115200"
diff --git a/defaultenv-2/base/init/bootargs-base b/defaultenv-2/base/init/bootargs-base
deleted file mode 100644
index 8e588ad..0000000
--- a/defaultenv-2/base/init/bootargs-base
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "Base bootargs"
-	exit
-fi
-
-global.linux.bootargs.base="console=ttyS0,115200"
diff --git a/defaultenv-2/base/init/general b/defaultenv-2/base/init/general
deleted file mode 100644
index 1de06ce..0000000
--- a/defaultenv-2/base/init/general
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "general config settings"
-	exit
-fi
-
-# user (used for network filenames)
-global.user=none
-
-# timeout in seconds before the default boot entry is started
-global.autoboot_timeout=3
-
-# default boot entry (one of /env/boot/*)
-global.boot.default=net
diff --git a/defaultenv-2/base/init/hostname b/defaultenv-2/base/init/hostname
deleted file mode 100644
index 57a2c94..0000000
--- a/defaultenv-2/base/init/hostname
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "hostname"
-	exit
-fi
-
-global.hostname=generic
diff --git a/defaultenv-2/base/init/prompt b/defaultenv-2/base/init/prompt
deleted file mode 100644
index 11dce9f..0000000
--- a/defaultenv-2/base/init/prompt
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-if [ ${global.allow_color} = "true" ]; then
-	export PS1="\e[1;32mbarebox@\e[1;36m\h:\w\e[0m "
-else
-	export PS1="barebox@\h:\w "
-fi
diff --git a/defaultenv-2/menu/menu/mainmenu b/defaultenv-2/menu/menu/mainmenu
index 5bd7027..c74cc9c 100644
--- a/defaultenv-2/menu/menu/mainmenu
+++ b/defaultenv-2/menu/menu/mainmenu
@@ -15,6 +15,7 @@ while true; do
 	boot-entries-collect
 
 	menu -e -a -R -m boot -c "$global.editcmd /env/network/eth0" -d "Network settings"
+	menu -e -a -R -m boot -c "$global.editcmd /env/config" -d "Config settings"
 	menu -e -a -m boot -c "boot-entries-edit" -d "Edit boot entries"
 	menu -e -a -m boot -c "init-entries-edit" -d "Edit init entries"
 	menu -e -a -R -m boot -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-01 18:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-01 18:52 [PATCH] defenv-2: Make it simpler Sascha Hauer
2012-11-01 18:52 ` [PATCH 1/3] defenv-2: remove initrd boot script Sascha Hauer
2012-11-01 18:52 ` [PATCH 2/3] defenv-2: remove some helper scripts Sascha Hauer
2012-11-01 18:52 ` [PATCH 3/3] defenv-2: bring back /env/config Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox