From patchwork Thu Jan 11 11:55:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Vandeputte X-Patchwork-Id: 859086 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kSdKFf12"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ncentric.com header.i=@ncentric.com header.b="dsJR1FHD"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zHPTT0mWYz9s75 for ; Thu, 11 Jan 2018 22:55:38 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3N5geN5HuAXlI42EC05b6gJsUJlCTocnNS/vYn+LW+k=; b=kSdKFf12qCRbT6 GqgyYn1ngI8ymM3GYcmOunSeLLzlU9uQymsR5yVf/Zp+Yyjc3MEMPfD+I336iCuFLh4vrDwNLGbQP M5zc29eAZh4Cn3Xxe1df754YcuZFLxokGhRCZsMi09zebBqHAyJhRRYR4y/bJvDOB8EKRenE5sHxT QUk7UmSlqZt1kvaDJ/2hYdClHgqmZg02OS04nfo2Eybl7cEwLmL4HZ1h/jJ7P7lZyiGS8lF22GoOA APqTxQAjWNg8DS+EQw2vhAGTeIwdOAxGF6yYpJ4WrfXba2zm0TGLCz5MNCtNcMwQJM0c2aYYNImts 2EJ1SWhHEUDqdsTJAcog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eZbSF-0000ZK-Ju; Thu, 11 Jan 2018 11:55:31 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZbSC-0000XZ-Bp for lede-dev@lists.infradead.org; Thu, 11 Jan 2018 11:55:30 +0000 Received: by mail-wm0-x232.google.com with SMTP id f140so4893797wmd.2 for ; Thu, 11 Jan 2018 03:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric.com; s=google; h=from:to:cc:subject:date:message-id; bh=SmVBk6/KflieXuqIqFaHqw+BWdB59JEXCLzNfWfz438=; b=dsJR1FHDDbtfgozQMZYQ4GAZhv8vTVhWdv9O5c1reMcR5L2wP3KbDtoHJgG31TlVnG UhLlr+vBTTUlQjPMLYniyFLCmygrM392mBlpnJ/dH1KTGHMv+8SRB6UGiaey8F2O8r7I tL7mzJw67ju/2Wy/awFe2OvJimmyQx+0BzX1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SmVBk6/KflieXuqIqFaHqw+BWdB59JEXCLzNfWfz438=; b=dqDs69lCKYyhu7hCRjldzq7KgMTro9NX43yIo1dh/0bPWPWme8HHAKs6/9rW/76Rxe 0rbQS0JDnL86CrvAaw8vYwM3Z2s2rCMwJsemMvgzDiyFsDMjOxnibNasglHEUuGwmYGt aFjube3377AnKxW0sTdLsaAbzH0CLr1RphsmtkMsBcwzAUVFYqKKBToUmzLczsMDk5Sj Kb6edgK/5Tk4NKSdbebUXcQiikIYXzhWXSqPicVZPoVTadyCvd2tVv0iFHxBXO4SZFKt WbZGL1WwNLIwxunbwKEN/R5ojwF5B7OkvU3uCGJCjxBDlHSvTeZVCCJz0bFScBvUxZU+ RvHQ== X-Gm-Message-State: AKGB3mKsqF1MScC5rYXewzQOpurOEDSy7PZelu0GDrdHIQSU7+ylAJmM 0VkmyZDB+GR+PFUBsF/ogEmGb13i+0o= X-Google-Smtp-Source: ACJfBovYRDRMzVvuxU9MF0F0F5KYRzYhJyGGUXMVhDhsbc/LRgbEFinMSRPC8jPdiBMsgX7jTJ7GNg== X-Received: by 10.80.158.78 with SMTP id z72mr31507980ede.65.1515671714274; Thu, 11 Jan 2018 03:55:14 -0800 (PST) Received: from localhost.localdomain (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.googlemail.com with ESMTPSA id i2sm782772edf.90.2018.01.11.03.55.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jan 2018 03:55:13 -0800 (PST) From: Koen Vandeputte To: lede-dev@lists.infradead.org Date: Thu, 11 Jan 2018 12:55:02 +0100 Message-Id: <1515671702-19482-1-git-send-email-koen.vandeputte@ncentric.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180111_035528_403727_67990916 X-CRM114-Status: UNSURE ( 8.37 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:232 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH v2] config: support new symbol intro'd in kernel 4.12 X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jo@mein.io, Koen Vandeputte , john@phrozen.org MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- v2 --> fix copy/paste error in error description + a typo 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 607659114e67..90e873edb8ea 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 f0618633b292..33f3a8210ff0 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