[PATCH] defaultenv: generate force-built-in (zero) environment file

Jan Luebbe jlu at pengutronix.de
Wed Jan 28 02:02:36 PST 2015


Signed-off-by: Jan Luebbe <jlu at pengutronix.de>
---
 .gitignore          | 1 +
 defaultenv/Makefile | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 0456bfd..1b48213 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,6 +50,7 @@ barebox-flash-image
 System.map
 Module.symvers
 barebox_default_env*
+barebox_zero_env
 
 #
 # git files that we don't want to ignore even it they are dot-files
diff --git a/defaultenv/Makefile b/defaultenv/Makefile
index fc679eb..8a001ec 100644
--- a/defaultenv/Makefile
+++ b/defaultenv/Makefile
@@ -3,7 +3,7 @@ bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU) += defaultenv-2-menu
 bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU) += defaultenv-2-dfu
 bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-1
 obj-$(CONFIG_DEFAULT_ENVIRONMENT) += defaultenv.o
-extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX)
+extra-y += barebox_default_env barebox_default_env.h barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX) barebox_zero_env
 
 $(obj)/defaultenv.o: $(obj)/barebox_default_env.h
 
@@ -22,3 +22,9 @@ cmd_env_h = cat $< | (cd $(obj) && $(objtree)/scripts/bin2c "__aligned(4) defaul
 
 $(obj)/barebox_default_env.h: $(obj)/barebox_default_env$(DEFAULT_COMPRESSION_SUFFIX) FORCE
 	$(call if_changed,env_h)
+
+quiet_cmd_env_zero = ENVZ    $@
+cmd_env_zero = ($(srctree)/scripts/bareboxenv -z $(CONFIG_DEFAULT_ENVIRONMENT_PATH) $@)
+
+$(obj)/barebox_zero_env: FORCE
+	$(call cmd,env_zero)
-- 
2.1.4




More information about the barebox mailing list