summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2021-04-10 12:45:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-04-13 08:09:55 +0200
commit38b017d9b198e8f4fd6ad40eee3181b02b1385e4 (patch)
treefed19d93b436c865ed67e65cdaf487cfb9ac30d4 /defaultenv
parent5e7499310e334eae50ab72bdd858f58598113903 (diff)
downloadbarebox-38b017d9b198e8f4fd6ad40eee3181b02b1385e4.tar.gz
barebox-38b017d9b198e8f4fd6ad40eee3181b02b1385e4.tar.xz
common: add option for shipping KCONFIG_CONFIG as /env/data/config
Add a new option that enables access to the barebox configuration file through /env/data/config. This can be useful in environments where a fatter barebox can be tolerated (like on an EFI system partition). It could also be used to conditionally skip tests on disabled functionality in the future. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Tested-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/Makefile7
-rw-r--r--defaultenv/defaultenv.c2
2 files changed, 9 insertions, 0 deletions
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);
}