From patchwork Thu Jan 11 11:14:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Vandeputte X-Patchwork-Id: 859043 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="PHADKutq"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ncentric.com header.i=@ncentric.com header.b="efDy8+CF"; 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 3zHNbK0kJLz9sBW for ; Thu, 11 Jan 2018 22:15:41 +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=irt3wKk0d7JpWRYJ/ZHOd2Qn7fnBeLCkotKwzV2xt6g=; b=PHADKutqdGhFbX DZ6mvSNDlmKNglOYKIQ7N9/vv/chmrnJU/Sd1y6nw9/X0eOS34SiA3B5/uf7+m7n/JywaCafVSF11 Jk8vcnzCmt6VDqrQUpKiwyfME+dyqdhWCAYNVhbo4Q0ct5MVZEGzkImpgM/0FFWlEJ74vAmet3Pgq fytddZqAdRkm0SFo0RzGyW3Ivery6frTDzZo7qdnvuiCb7jfqRonPht5yHHv1lRj7PPesNP9VyL3N EH8fUCYRUw0IW5yKMGjYHJgC5LsDs1MJlH8TFlcMxvVMxg9gvHqONIBkh/Np6YJebg7GrM8j3at1k wtXVyfoF3MlQXT9ZyrSQ==; 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 1eZape-0000o8-Pn; Thu, 11 Jan 2018 11:15:38 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZapZ-0000ga-Bq for lede-dev@lists.infradead.org; Thu, 11 Jan 2018 11:15:36 +0000 Received: by mail-wm0-x241.google.com with SMTP id i11so4650603wmf.4 for ; Thu, 11 Jan 2018 03:15:22 -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=2jYwdPXFqxxsEyNTMJw3MFt3Y3Iy1l+HyXN/MMAI3QI=; b=efDy8+CFv/AKZwtCxmEH/urNODfmy1BcgoedwFNiO5H95snqhZqX9cgAzm9HwyX2Qn vGxp7rZv3KhYCzZLG29lyUns+X9gE4vZhOjln03gpUTPyhpnpA5o7m9nP3e84lRR4m9n 65OlGJRoPdDpyLcSMecvs7kvXzPjZS7XIz/TE= 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=2jYwdPXFqxxsEyNTMJw3MFt3Y3Iy1l+HyXN/MMAI3QI=; b=ihJiB0TuxUsknY/RJAhMEsZXyYA+4thcZG3va9AnWHw3E4o0hfJBQyt05gAzg5TUOF vOF9lUpvLME8VH5AhRhg5jbfNY3uNF0JzmuuUffFBhseysQXijJCWZoCBWyP91s1mnj0 89iZoGVfQlt+TcCajFPtVO0zpxMWWZJRiSPa7CI0/iHSqFm2tNO7+swip1GEnMnOXD6f jRkYIu6SF2gzb719RKwlOptOQ2WdfrkTapKT8j0m67lnbozFm7c9AJbKsxzqOOTremBg RW3WaS+nLzx6dGyWT71pYx5wvqCZoIrFNdGkCiCXLDxAuJNDikD+lComT4oDBqhLfOR7 e+Uw== X-Gm-Message-State: AKwxytdK3hTNCGdlHgwBXvJ2Xl8+znrI6WeGwKKnNe+9j3tVerOME44P cxTR4dWcq4RHr71qiTFMTEQ0Tlf/jWk= X-Google-Smtp-Source: ACJfBoulo6oIusCD4mmO4rza1042+jbPmxUH2H9tm1vnQDpdNGcWhllzn2QudZtbIZvnSe66esGjdw== X-Received: by 10.80.163.134 with SMTP id s6mr1855312edb.221.1515669320655; Thu, 11 Jan 2018 03:15:20 -0800 (PST) Received: from localhost.localdomain (d515300d8.static.telenet.be. [81.83.0.216]) by smtp.googlemail.com with ESMTPSA id b7sm11211860eda.60.2018.01.11.03.15.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jan 2018 03:15:20 -0800 (PST) From: Koen Vandeputte To: lede-dev@lists.infradead.org Date: Thu, 11 Jan 2018 12:14:40 +0100 Message-Id: <1515669280-19331-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_031533_561134_0F9B02B2 X-CRM114-Status: UNSURE ( 8.27 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:241 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] 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 passes 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) [] (NEW) Signed-off-by: Koen Vandeputte --- 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