[openwrt/openwrt] config: support new symbol intro'd in kernel 4.12

LEDE Commits lede-commits at lists.infradead.org
Sat Jan 13 07:41:06 PST 2018


blogic pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/fce35bce0f6e14b278f8e20ba46d53b3696b9a31

commit fce35bce0f6e14b278f8e20ba46d53b3696b9a31
Author: Koen Vandeputte <koen.vandeputte at ncentric.com>
AuthorDate: Thu Jan 11 12:55:02 2018 +0100

    config: support new symbol intro'd in kernel 4.12
    
    Symbol CONFIG_INITRAMFS_FORCE allows to ignore the value passed by the
    bootloader.
    
    By default, all symbols containing INITRAMFS are wiped from the final
    config and then re-added conditionally.
    
    Add support for this symbol, as the build will stop otherwise
    questioning the user about this option:
    
    * Restart config...
    *
    *
    * General setup
    *
    Cross-compiler tool prefix (CROSS_COMPILE) []
    Compile also drivers which will not load (COMPILE_TEST) [N/y/?] n
    
    ...
    
    Initial RAM filesystem and RAM disk (initramfs/initrd) support
    (BLK_DEV_INITRD) [Y/n/?] y
    Initramfs source file(s) (INITRAMFS_SOURCE) []
    Ignore the initramfs passed by the bootloader (INITRAMFS_FORCE)
    [N/y/?] (NEW)
    
    Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 config/Config-images.in    | 7 +++++++
 include/kernel-defaults.mk | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/config/Config-images.in b/config/Config-images.in
index 6076591..90e873e 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -52,6 +52,13 @@ menu "Target Images"
 			help
 			  Kernel uses specified external cpio as INITRAMFS_SOURCE.
 
+		config TARGET_INITRAMFS_FORCE
+                        bool "Force"
+                        depends on TARGET_ROOTFS_INITRAMFS
+                        default n
+                        help
+                          Ignore the initramfs passed by the bootloader.
+
 	comment "Root filesystem archives"
 
 	config TARGET_ROOTFS_CPIOGZ
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index f061863..33f3a82 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -63,6 +63,8 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
 	$(call Kernel/SetInitramfs/PreConfigure)
 	echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
 	echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config
+	echo 'CONFIG_INITRAMFS_FORCE=y' >> $(LINUX_DIR)/.config
+	echo "$(if $(CONFIG_TARGET_INITRAMFS_FORCE),CONFIG_INITRAMFS_FORCE=y,# CONFIG_INITRAMFS_FORCE is not set)" >> $(LINUX_DIR)/.config
 	echo "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE),CONFIG_INITRAMFS_COMPRESSION_NONE=y,# CONFIG_INITRAMFS_COMPRESSION_NONE is not set)" >> $(LINUX_DIR)/.config
 	echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),CONFIG_INITRAMFS_COMPRESSION_GZIP=y\nCONFIG_RD_GZIP=y,# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set\n# CONFIG_RD_GZIP is not set)" >> $(LINUX_DIR)/.config
 	echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),CONFIG_INITRAMFS_COMPRESSION_BZIP2=y\nCONFIG_RD_BZIP2=y,# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set\n# CONFIG_RD_BZIP2 is not set)" >> $(LINUX_DIR)/.config
@@ -78,6 +80,7 @@ define Kernel/SetNoInitramfs
 	mv $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.old
 	grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set
 	echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config.set
+	echo '# CONFIG_INITRAMFS_FORCE is not set' >> $(LINUX_DIR)/.config.set
 endef
 
 define Kernel/Configure/Default



More information about the lede-commits mailing list