summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Haustein <mario.haustein@hrz.tu-chemnitz.de>2016-10-24 13:24:38 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-25 21:02:21 +0200
commita17b603f1cdcbe29984e744f809e10fea1c4b94f (patch)
tree4e20d3c693fcd4e3758ae689cd7109ef3660b8fb
parent6bbb8cf19c38a7f15d28617ef492e1c6f202b6f9 (diff)
add Makefile target for saving the kernel configuration to an external file
Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
-rw-r--r--Makefile2
-rw-r--r--Makefile.adk5
-rw-r--r--mk/build.mk10
3 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5faad4743..bdab1564a 100644
--- a/Makefile
+++ b/Makefile
@@ -4,5 +4,5 @@
# GNU make and BSD make compatible make file wrapper
MAKECMDGOALS+= ${.TARGETS}
-all v allmodconfig allnoconfig allyesconfig help pkg-help dev-help targethelp kernelconfig image menuconfig defconfig oldconfig download clean cleankernel cleansystem cleandir distclean hostclean hostpackage fetch package extract patch dep menu newpackage host-update-patches update-patches:
+all v allmodconfig allnoconfig allyesconfig help pkg-help dev-help targethelp kernelconfig savekconfig image menuconfig defconfig oldconfig download clean cleankernel cleansystem cleandir distclean hostclean hostpackage fetch package extract patch dep menu newpackage host-update-patches update-patches:
@./scripts/prereq.sh ${MAKECMDGOALS}
diff --git a/Makefile.adk b/Makefile.adk
index 85df7e0b5..0938316ba 100644
--- a/Makefile.adk
+++ b/Makefile.adk
@@ -47,6 +47,8 @@ help:
@echo 'Common targets:'
@echo ' download - fetches all needed distfiles'
@echo ' kernelconfig - view the target kernel configuration'
+ @echo ' savekconfig - save changes of "make kernelconfig" to an external'
+ @echo ' configuration file (if configured)'
@echo ''
@echo 'Cleaning targets:'
@echo ' clean - Remove firmware and build directories'
@@ -130,6 +132,9 @@ targethelp:
kernelconfig:
@${GMAKE_INV} kernelconfig
+savekconfig:
+ @${GMAKE_INV} savekconfig
+
newpackage:
@${GMAKE_INV} newpackage
diff --git a/mk/build.mk b/mk/build.mk
index b77e5a38a..03ce69536 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -227,6 +227,16 @@ kernelconfig:
${KERNEL_MAKE_OPTS} \
menuconfig
+ifeq ($(ADK_TARGET_KERNEL_USE_CUSTOMCONFIG),y)
+savekconfig:
+ @echo "Saving kernel configuration to $(ADK_TOPDIR)/$(ADK_TARGET_KERNEL_CUSTOMCONFIG_PATH)"
+ $(CP) $(LINUX_DIR)/.config $(ADK_TOPDIR)/$(ADK_TARGET_KERNEL_CUSTOMCONFIG_PATH)
+else
+savekconfig:
+ @echo "You have to enable ADK_TARGET_KERNEL_USE_CUSTOMCONFIG to be able to save the current kernel configuration."
+endif
+
+
# create a new package from package/.template
newpackage:
@echo "Creating new package $(PKG)"