summaryrefslogtreecommitdiffstats
path: root/defaultenv-2
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-11-01 14:46:04 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-11-01 19:46:40 +0100
commitd78597af84d1481af8cd68c5ec31487c0892cb93 (patch)
tree4a8e476ff2fbdb73ce790d7dbaf1af287962d736 /defaultenv-2
parentfee5d94b9ab10fc4c7c0890384bd368681f4a0f6 (diff)
downloadbarebox-d78597af84d1481af8cd68c5ec31487c0892cb93.tar.gz
barebox-d78597af84d1481af8cd68c5ec31487c0892cb93.tar.xz
defenv-2: bring back /env/config
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>
Diffstat (limited to 'defaultenv-2')
-rw-r--r--defaultenv-2/base/bin/init10
-rw-r--r--defaultenv-2/base/config21
-rw-r--r--defaultenv-2/base/init/bootargs-base8
-rw-r--r--defaultenv-2/base/init/general15
-rw-r--r--defaultenv-2/base/init/hostname8
-rw-r--r--defaultenv-2/base/init/prompt7
-rw-r--r--defaultenv-2/menu/menu/mainmenu1
7 files changed, 30 insertions, 40 deletions
diff --git a/defaultenv-2/base/bin/init b/defaultenv-2/base/bin/init
index 8e8871d10a..bb4abcdec9 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 0000000000..189e5a68f2
--- /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 8e588ad43d..0000000000
--- 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 1de06ce291..0000000000
--- 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 57a2c94798..0000000000
--- 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 11dce9fe0e..0000000000
--- 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 5bd7027e2a..c74cc9c767 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"