summaryrefslogtreecommitdiffstats
path: root/common/Makefile
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-02-18 10:25:13 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-02-28 08:14:14 +0100
commit7fa10256c3f4b38f9ca899c5367584380c017bea (patch)
treed1c5654947c4d8305d66646aa35656c8611bd16d /common/Makefile
parentb850dbad6557c4cd0e03c9b83be88579412cdd3f (diff)
downloadbarebox-7fa10256c3f4b38f9ca899c5367584380c017bea.tar.gz
defaultenv: Allow multiple defaultenvironment overlays
We can compile barebox for multiple boards at once, but currently they all share a single default environment. This patch adds a defaultenv_append() which boards can call to customize the default environment during runtime. Each board now generate default environment snippets using bbenv-y and add them during runtime with defaultenv_append() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/Makefile')
-rw-r--r--common/Makefile39
1 files changed, 0 insertions, 39 deletions
diff --git a/common/Makefile b/common/Makefile
index 9c68f7b..667c7b3 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -7,7 +7,6 @@ obj-y += misc.o
obj-y += memsize.o
obj-y += resource.o
obj-y += bootsource.o
-extra-y += barebox_default_env barebox_default_env.h
obj-$(CONFIG_AUTO_COMPLETE) += complete.o
obj-$(CONFIG_BANNER) += version.o
obj-$(CONFIG_BAREBOX_UPDATE) += bbu.o
@@ -45,44 +44,6 @@ obj-$(CONFIG_SHELL_HUSH) += hush.o
obj-$(CONFIG_SHELL_SIMPLE) += parser.o
obj-$(CONFIG_UIMAGE) += image.o uimage.o
-
-ifdef CONFIG_DEFAULT_ENVIRONMENT
-$(obj)/startup.o: $(obj)/barebox_default_env.h
-$(obj)/env.o: $(obj)/barebox_default_env.h
-
-ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW),y)
-DEFAULT_ENVIRONMENT_PATH = "defaultenv/defaultenv-2-base"
-ifeq ($(CONFIG_CMD_MENU_MANAGEMENT),y)
-DEFAULT_ENVIRONMENT_PATH += "defaultenv/defaultenv-2-menu"
-endif
-endif
-
-ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_GENERIC),y)
-DEFAULT_ENVIRONMENT_PATH = "defaultenv/defaultenv-1"
-endif
-
-ifneq ($(CONFIG_DEFAULT_ENVIRONMENT_PATH),"")
-DEFAULT_ENVIRONMENT_PATH += $(CONFIG_DEFAULT_ENVIRONMENT_PATH)
-endif
-
-endif # ifdef CONFIG_DEFAULT_ENVIRONMENT
-
-#
-# Generate a barebox envfs image.
-#
-quiet_cmd_envs = ENV $@
-cmd_envs = ($(srctree)/scripts/genenv $(srctree) $(objtree) $@ $(DEFAULT_ENVIRONMENT_PATH))
-
-$(obj)/barebox_default_env: FORCE
- $(call cmd,envs)
-
-quiet_cmd_env_h = ENVH $@
-cmd_env_h = cat $< | (cd $(obj) && $(objtree)/scripts/bin2c "__aligned(4) default_environment") > $@; \
- echo "static const int default_environment_uncompress_size=`stat -c%s $(obj)/barebox_default_env`;" >> $@
-
-$(obj)/barebox_default_env.h: $(obj)/barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX) FORCE
- $(call if_changed,env_h)
-
quiet_cmd_pwd_h = PWDH $@
ifdef CONFIG_PASSWORD
ifneq ($(CONFIG_PASSWORD_DEFAULT),"")