summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-09-03 20:02:31 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-02 08:57:07 +0200
commit4676721b30274f318a56672b34d394e1df365a3d (patch)
treeb3ef1f9137d09bb9980300d5d70e01f0462097f7
parent9b22271b7bc1aff16e71705be1a2cc69e9d82089 (diff)
downloadbarebox-4676721b30274f318a56672b34d394e1df365a3d.tar.gz
barebox-4676721b30274f318a56672b34d394e1df365a3d.tar.xz
defaultenv: enable glovalvar support
This will allow to do not have 2 set of var for defaultenv and the new defaultenv-2. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-rw-r--r--common/Kconfig1
-rw-r--r--defaultenv/bin/init2
2 files changed, 3 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index b97392cfdb..93787839c4 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -575,6 +575,7 @@ config DEFAULT_ENVIRONMENT_GENERIC
select CMD_CRC
select CMD_CRC_CMP
select CMD_AUTOMOUNT if HAVE_DEFAULT_ENVIRONMENT_NEW
+ select CMD_GLOBAL
prompt "Default environment generic"
help
With this option barebox will use the generic default
diff --git a/defaultenv/bin/init b/defaultenv/bin/init
index f535e3781c..adb3c43a66 100644
--- a/defaultenv/bin/init
+++ b/defaultenv/bin/init
@@ -3,6 +3,8 @@
PATH=/env/bin
export PATH
+global hostname
+
. /env/config
if [ -e /dev/nor0 -a -n "$nor_parts" ]; then
addpart /dev/nor0 $nor_parts