From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wi0-f178.google.com ([209.85.212.178]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SYzII-00089q-Mg for ptxdist@pengutronix.de; Mon, 28 May 2012 14:43:42 +0200 Received: by wibhn6 with SMTP id hn6so1222270wib.7 for ; Mon, 28 May 2012 05:43:25 -0700 (PDT) From: "Bart vdr. Meulen" Date: Mon, 28 May 2012 14:42:37 +0200 Message-Id: <1338208981-8681-11-git-send-email-bartvdrmeulen@gmail.com> Subject: [ptxdist] [PATCH] kernel: Ignore config difference when using rootfs in kernel option Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de From: "Bart vdr. Meulen" When using a rootfs inside the kernel the config option CONFIG_INITRAMFS_SOURCE is changed build time, ignore this when checking for differences after running oldconfig. This prevents a make failure when the source kernel.config is read-only, preventing the copy back action that normally takes place when a difference is detected. Signed-off-by: Bart vdr. Meulen --- rules/kernel.make | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rules/kernel.make b/rules/kernel.make index 4a45a3f..e1e3a6a 100644 --- a/rules/kernel.make +++ b/rules/kernel.make @@ -111,16 +111,19 @@ ifdef KERNEL_INITRAMFS_SOURCE_y endif @$(call ptx/oldconfig, KERNEL) - @diff -q -I "# [^C]" "$(KERNEL_DIR)/.config" "$(<)" > /dev/null || cp "$(KERNEL_DIR)/.config" "$(<)" - # +# CONFIG_INITRAMFS_SOURCE has been changed in .config, ignore when taking diff. # Don't keep the expanded path to INITRAMS_SOURCE in $(KERNEL_CONFIG), # because it contains local workdir path which is not relevant to # other developers. # ifdef KERNEL_INITRAMFS_SOURCE_y + @diff -q -I "# [^C]" -I "^CONFIG_INITRAMFS_SOURCE=[^C]" "$(KERNEL_DIR)/.config" "$(<)" > /dev/null || \ + cp "$(KERNEL_DIR)/.config" "$(<)" @sed -i -e 's,^CONFIG_INITRAMFS_SOURCE.*$$,CONFIG_INITRAMFS_SOURCE=\"# Automatically set by PTXDist\",g' \ "$(<)" +else + @diff -q -I "# [^C]" "$(KERNEL_DIR)/.config" "$(<)" > /dev/null || cp "$(KERNEL_DIR)/.config" "$(<)" endif @$(call touch) -- 1.7.9.5 -- ptxdist mailing list ptxdist@pengutronix.de