diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | common/Kconfig | 8 | ||||
-rw-r--r-- | defaultenv/Makefile | 7 | ||||
-rw-r--r-- | defaultenv/defaultenv.c | 2 | ||||
-rw-r--r-- | scripts/Makefile.lib | 3 |
5 files changed, 22 insertions, 0 deletions
@@ -350,6 +350,8 @@ endif KCONFIG_CONFIG ?= .config +export KCONFIG_CONFIG + # Default file for 'make defconfig'. This may be overridden by arch-Makefile. export KBUILD_DEFCONFIG := defconfig diff --git a/common/Kconfig b/common/Kconfig index 342817bbcb..bddf802d3b 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -941,6 +941,14 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE depends on DEFAULT_ENVIRONMENT_GENERIC_NEW depends on REBOOT_MODE +config DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG + bool "Ship .config as /env/data/config" + depends on DEFAULT_ENVIRONMENT_GENERIC_NEW + help + This option embeds the used barebox Kconfig .config file into the + environment as /env/data/config. This will increases barebox image + size. If unsure, say n here. + config DEFAULT_ENVIRONMENT_PATH string depends on DEFAULT_ENVIRONMENT diff --git a/defaultenv/Makefile b/defaultenv/Makefile index 91293567c0..6879032118 100644 --- a/defaultenv/Makefile +++ b/defaultenv/Makefile @@ -32,3 +32,10 @@ cmd_env_zero = ($(objtree)/scripts/bareboxenv -z $(CONFIG_DEFAULT_ENVIRONMENT_PA $(obj)/barebox_zero_env: FORCE $(call if_changed,env_zero) + +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG) += defaultenv-2-ikconfig + +defaultenv/defaultenv-2-ikconfig.bbenv$(DEFAULT_COMPRESSION_SUFFIX): $(KCONFIG_CONFIG) + @mkdir -p defaultenv/defaultenv-2-ikconfig/data + @cp $(KCONFIG_CONFIG) defaultenv/defaultenv-2-ikconfig/data/config + $(call cmd,envgen,defaultenv/defaultenv-2-ikconfig) diff --git a/defaultenv/defaultenv.c b/defaultenv/defaultenv.c index d69446c893..055475eb47 100644 --- a/defaultenv/defaultenv.c +++ b/defaultenv/defaultenv.c @@ -47,6 +47,8 @@ static void defaultenv_add_base(void) defaultenv_append_directory(defaultenv_2_dfu); if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE)) defaultenv_append_directory(defaultenv_2_reboot_mode); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_IKCONFIG)) + defaultenv_append_directory(defaultenv_2_ikconfig); if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) defaultenv_append_directory(defaultenv_1); } diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 319ac19975..80d76b177c 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -365,6 +365,9 @@ cmd_env_S = \ $(obj)/%.bbenv$(DEFAULT_COMPRESSION_SUFFIX).S: $(src)/%.bbenv$(DEFAULT_COMPRESSION_SUFFIX) FORCE $(call if_changed,env_S) +quiet_cmd_envgen = ENVGEN $@ +cmd_envgen=$(srctree)/scripts/genenv $(objtree) $(objtree) $@ $2 + quiet_cmd_env = ENV $@ cmd_env=$(srctree)/scripts/genenv $(srctree) $(objtree) $@ $< |