From patchwork Thu Jan 5 10:29:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 9498847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C208A606B5 for ; Thu, 5 Jan 2017 10:32:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CF3527F89 for ; Thu, 5 Jan 2017 10:32:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81D6F27F8C; Thu, 5 Jan 2017 10:32:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF1DE2808C for ; Thu, 5 Jan 2017 10:32:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033579AbdAEKaa (ORCPT ); Thu, 5 Jan 2017 05:30:30 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33155 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033575AbdAEKaG (ORCPT ); Thu, 5 Jan 2017 05:30:06 -0500 Received: by mail-pf0-f194.google.com with SMTP id 127so18379227pfg.0 for ; Thu, 05 Jan 2017 02:30:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/yBZhKSgh2Rf8JAEitZX2YVyg2g1bgi9HnOPrd/tv9U=; b=qr7PcCTQz3G+SyFOfnCw2ZADvWQoM/bU4thQi/bTiXxgUAuZ8VhSY5aTmxiGaURdQC oc2lfwBJWhtv3VI4oQqmTDpKTPHDvjZ50GmvyfJeAq2jguqLjfMIntWM6/JOq1Mv03ZN KelPsXvSGpZgudy9YrU9ZgHwmq8Rg9C2idAc1C1YelTTh6ZskJFboHmGVvAOZpWDBU3B Mzr86khZo6Byi1FNaoOT8lGijvLMwAM26aM9aZQlkH/blzMrjL+YPv0Njwt9iBZxqut4 TF3SWK/JrtNCMAVKFvxPaUsRC3gst9DXldNiC2+8eGqxzcfGeUyHJJUF3EqgP8yPU1us 3a5Q== 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:in-reply-to :references; bh=/yBZhKSgh2Rf8JAEitZX2YVyg2g1bgi9HnOPrd/tv9U=; b=kyiWsxALWpKE1aibPrQrlyZbGh/2zhdgdbIGtg67xS7ND8q00Qqq7EZF5NjlwUw/eK anMBXekpQQaOZxges6SzfprugWOmM77YzvshpO2vlcjagLv+mIKuEW4rfhTnHW9r6hBb +95hfxhb6ONYx9J8uwZ2KpeW32Z1a0GDQtrhnUeGfaEXn5goybfX/159WTQ/Ze8b0Jjz E4sSLG2o8+/CgyCF108ZBmFAQhpWo4SxXg/FhroKGh8xPPtokP/JLS9OmT4GjAONoNDC iL1okuexEcxyF5OFja6xrGKW2WNYZq7Tcl7EK/suo5h5dg46m6vJzewsYkoVJBNsxCEX Lhdg== X-Gm-Message-State: AIkVDXKj4P+VFmBQb3KKFroltnuuoTVR+KKS3U7v+Z869ZDH0CSEa7oQuzr3VAwPkr/gBw== X-Received: by 10.84.174.129 with SMTP id r1mr157298923plb.19.1483612205857; Thu, 05 Jan 2017 02:30:05 -0800 (PST) Received: from roar.au.ibm.com ([203.221.7.176]) by smtp.gmail.com with ESMTPSA id b71sm152654349pfj.62.2017.01.05.02.30.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 02:30:05 -0800 (PST) From: Nicholas Piggin To: Michal Marek Cc: Nicholas Piggin , linux-kbuild@vger.kernel.org, Andrew Morton , Florian Fainelli , torvalds@linux-foundation.org, pebolle@tiscali.nl, ppandit@redhat.com Subject: [PATCH 2/2] kbuild: initramfs cleanup, set target from Kconfig Date: Thu, 5 Jan 2017 20:29:36 +1000 Message-Id: <20170105102936.5673-2-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170105102936.5673-1-npiggin@gmail.com> References: <20170105102936.5673-1-npiggin@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rather than keep a list of all possible compression types in the Makefile, set the target explicitly from Kconfig. Reviewed-by: Francisco Blas Izquierdo Riera (klondike) Signed-off-by: Nicholas Piggin Reviewed-by: Florian Fainelli --- usr/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usr/Makefile b/usr/Makefile index 746c3fd0b933..0b87e71c00fc 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -6,7 +6,9 @@ klibcdirs:; PHONY += klibcdirs suffix_y = $(subst $\",,$(CONFIG_INITRAMFS_COMPRESSION)) -AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/initramfs_data.cpio$(suffix_y)" +datafile_y = initramfs_data.cpio$(suffix_y) +AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/$(datafile_y)" + # Generate builtin.o based on initramfs_data.o obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o @@ -14,7 +16,7 @@ obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o # initramfs_data.o contains the compressed initramfs_data.cpio image. # The image is included using .incbin, a dependency which is not # tracked automatically. -$(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio$(suffix_y) FORCE +$(obj)/initramfs_data.o: $(obj)/$(datafile_y) FORCE ##### # Generate the initramfs cpio archive @@ -38,10 +40,8 @@ endif quiet_cmd_initfs = GEN $@ cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) -targets := initramfs_data.cpio.gz initramfs_data.cpio.bz2 \ - initramfs_data.cpio.lzma initramfs_data.cpio.xz \ - initramfs_data.cpio.lzo initramfs_data.cpio.lz4 \ - initramfs_data.cpio +targets := $(datafile_y) + # do not try to update files included in initramfs $(deps_initramfs): ; @@ -51,6 +51,6 @@ $(deps_initramfs): klibcdirs # 2) There are changes in which files are included (added or deleted) # 3) If gen_init_cpio are newer than initramfs_data.cpio # 4) arguments to gen_initramfs.sh changes -$(obj)/initramfs_data.cpio$(suffix_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs +$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/.initramfs_data.cpio.d $(call if_changed,initfs)