[source] build: add devel option to store build config in firmware
LEDE Commits
lede-commits at lists.infradead.org
Sat Mar 18 04:56:00 PDT 2017
stintel pushed a commit to source.git, branch master:
https://git.lede-project.org/01337ba472d0661af1e3b397be3c40573e46ea69
commit 01337ba472d0661af1e3b397be3c40573e46ea69
Author: Vitaly Chekryzhev <13hakta at gmail.com>
AuthorDate: Thu Jan 5 12:06:26 2017 +0500
build: add devel option to store build config in firmware
Store config.seed in firmware /etc/build.config
Signed-off-by: Vitaly Chekryzhev <13hakta at gmail.com>
---
config/Config-build.in | 6 ++++++
package/base-files/Makefile | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/config/Config-build.in b/config/Config-build.in
index e0889fc..d5e1839 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -67,6 +67,12 @@ menu "Global build settings"
This removes all ipkg/opkg status data files from the target directory
before building the root filesystem.
+ config INCLUDE_CONFIG
+ bool "Include build configuration in firmware" if DEVEL
+ default n
+ help
+ If enabled, config.seed will be stored in /etc/build.config of firmware.
+
config COLLECT_KERNEL_DEBUG
bool
prompt "Collect kernel debug information"
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 78c3dc9..512fa66 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -168,6 +168,10 @@ define Package/base-files/install
echo "$$$${conffile##$(1)}" >> $(1)/CONTROL/conffiles; \
fi \
done
+
+ $(if $(CONFIG_INCLUDE_CONFIG), \
+ echo -e "# Build configuration for board $(BOARD)/$(SUBTARGET)/$(PROFILE)\n" >$(1)/etc/build.config; \
+ cat $(BIN_DIR)/config.seed >>$(1)/etc/build.config)
endef
ifneq ($(DUMP),1)
More information about the lede-commits
mailing list