diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2010-10-11 16:34:39 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-10-12 21:32:44 +0200 |
commit | 4dfd5b5c621c88ea94d39afd6c3d7395a9dd94fd (patch) | |
tree | fecfe0f0c150783432657f8ae16e2a5aa8ef41ad /common | |
parent | 23e13992c8dd993a69794952fdf4f1c11e3da6e4 (diff) | |
download | barebox-4dfd5b5c621c88ea94d39afd6c3d7395a9dd94fd.tar.gz barebox-4dfd5b5c621c88ea94d39afd6c3d7395a9dd94fd.tar.xz |
defaultenv: introduce CONFIG_DEFAULT_ENVIRONMENT_GENERIC to enable it
this will we usefull to enable functionnality if used
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 13 | ||||
-rw-r--r-- | common/Makefile | 10 |
2 files changed, 21 insertions, 2 deletions
diff --git a/common/Kconfig b/common/Kconfig index 123d07086e..fb47397e9f 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -389,6 +389,19 @@ config DEFAULT_ENVIRONMENT Enabling this option will give you a default environment when the environment found in the environment sector is invalid +config DEFAULT_ENVIRONMENT_GENERIC + bool + depends on DEFAULT_ENVIRONMENT + select SHELL_HUSH + prompt "Default environment generic" + help + With this option barebox will use the generic default + environment found under defaultenv/ in the src tree. + The Directory given with DEFAULT_ENVIRONMENT_PATH + will be added to the default environment. This should + at least contain a /env/config file. + This will be able to overwrite the files from defaultenv. + config DEFAULT_ENVIRONMENT_PATH string depends on DEFAULT_ENVIRONMENT diff --git a/common/Makefile b/common/Makefile index e56dbc21a8..753455b64f 100644 --- a/common/Makefile +++ b/common/Makefile @@ -26,12 +26,18 @@ ifdef CONFIG_DEFAULT_ENVIRONMENT $(obj)/startup.o: include/generated/barebox_default_env.h $(obj)/env.o: include/generated/barebox_default_env.h -ENV_FILES := $(shell cd $(srctree); for i in $(CONFIG_DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec readlink -f {} \;; done) +ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_GENERIC),y) +DEFAULT_ENVIRONMENT_PATH = "defaultenv" +endif + +DEFAULT_ENVIRONMENT_PATH += $(CONFIG_DEFAULT_ENVIRONMENT_PATH) + +ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec readlink -f {} \;; done) endif # ifdef CONFIG_DEFAULT_ENVIRONMENT barebox_default_env: $(ENV_FILES) - $(Q)$(srctree)/scripts/genenv $(srctree) $(objtree) $(CONFIG_DEFAULT_ENVIRONMENT_PATH) + $(Q)$(srctree)/scripts/genenv $(srctree) $(objtree) $(DEFAULT_ENVIRONMENT_PATH) include/generated/barebox_default_env.h: barebox_default_env $(Q)cat $< | $(objtree)/scripts/bin2c default_environment > $@ |