[PATCH 2/7] defaultenv: enable glovalvar support
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Wed Sep 12 10:48:23 EDT 2012
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 at jcrosoft.com>
---
common/Kconfig | 1 +
defaultenv/bin/init | 2 ++
2 files changed, 3 insertions(+)
diff --git a/common/Kconfig b/common/Kconfig
index b97392c..9378783 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 f535e37..adb3c43 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
--
1.7.10.4
More information about the barebox
mailing list