Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3396466ybp; Sun, 6 Oct 2019 11:01:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPE+eFdUQNCoUW/fLMbVAHCg0aHFTtBCbnRoRl+tg/VK28ACMCzIsEk8UGgt6Uk7eYDoNo X-Received: by 2002:a17:906:b259:: with SMTP id ce25mr19932634ejb.229.1570384906404; Sun, 06 Oct 2019 11:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570384906; cv=none; d=google.com; s=arc-20160816; b=atQ+umeLU3jPGwWQlBg42O+o5FyK/pmAoL5zBGwip8N2NYXyJ88zFK9oDZHSD6A89d wR09sXDszzhUJhoyQX8JHpvvu6iBpTGMsKoamap0F+TqYEP9ZFa8g1EGHOvSiIK0XhsU 4m9+GQki0BHGIQ6l8GWNHmw49IBb9+12DAJRc0LrIFKpgjkVk/ikYS/8Dkp1ek8N+T2L AsGhj9uiojt/PnmB1VH+47SSfxvqL+z73x5Y+dl4BBvLDW+h70FSwBW8L+X0QCrcJp2X CZrLU/6KeVp15Vw3ByNCZRoS/1xEbDZf9z7zvroMWkR+MnnKcm1Ngrn4pf3iHT3Vffk9 lThQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2FT6BNODAo2ljnMOmPaXUYJt57rSJf6ba6MmAkYbLP4=; b=B9HHGHBTUovhlp4ioACw+A0lAR7qxA5tx+ikFFKC5piLLCsv5v0pT2V18fWeC8EwcS 3b6y1cMF1ifqUEdn0HFg/f+pLoGOxnR6cIoYGOrOuEipSAbDQW7renLvT+WmJEPrb5V8 53InLU7A8dIWKNqWaTuLAacnbKKQuHOwQewmSV1Zy9X4iZD150g4EB4LZ+quzT7FfoOw F67frhWDJXyL7YGiEfDX3Kul+ooFAuGoq0INGAtM/JCYrv1wXVM+zFvSEYEEC1Z/mvQK jl12JJc5rooC+bgVE5hlV5J+gv6k1N6LwDcu9jxPOUezW2AXbLc+k35GqgL1LNmNkE1e ZUFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=akUdzhva; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f19si7746016edb.385.2019.10.06.11.01.22; Sun, 06 Oct 2019 11:01:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=akUdzhva; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726949AbfJFRbK (ORCPT + 99 others); Sun, 6 Oct 2019 13:31:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:57096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729344AbfJFRbD (ORCPT ); Sun, 6 Oct 2019 13:31:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ECA822087E; Sun, 6 Oct 2019 17:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383062; bh=IyDHnK8MqzATXg9wnBUtcvenpx8QuaAiwj+xpIBD9tA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=akUdzhvaJlDZX1+W4AXq1vxE0Y7jlMlUNab6smC58RIwf8rpTh6vInkZSwdn7UNWk 1m1KHDMsjB2lIrQJoYdIH1wqehOAttQsh/XuQ/cfA3yaqTFXUAcZAjG5OiUHA5vduA gsrFqjgDLVdWM6NdMQHiWS8Tp7c3CZe6uqOcfvH0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Greg Thelen , Nicholas Piggin , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.19 071/106] kbuild: clean compressed initramfs image Date: Sun, 6 Oct 2019 19:21:17 +0200 Message-Id: <20191006171153.095314377@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171124.641144086@linuxfoundation.org> References: <20191006171124.641144086@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Thelen [ Upstream commit 6279eb3dd7946c69346a3b98473ed13d3a44adb5 ] Since 9e3596b0c653 ("kbuild: initramfs cleanup, set target from Kconfig") "make clean" leaves behind compressed initramfs images. Example: $ make defconfig $ sed -i 's|CONFIG_INITRAMFS_SOURCE=""|CONFIG_INITRAMFS_SOURCE="/tmp/ir.cpio"|' .config $ make olddefconfig $ make -s $ make -s clean $ git clean -ndxf | grep initramfs Would remove usr/initramfs_data.cpio.gz clean rules do not have CONFIG_* context so they do not know which compression format was used. Thus they don't know which files to delete. Tell clean to delete all possible compression formats. Once patched usr/initramfs_data.cpio.gz and friends are deleted by "make clean". Link: http://lkml.kernel.org/r/20190722063251.55541-1-gthelen@google.com Fixes: 9e3596b0c653 ("kbuild: initramfs cleanup, set target from Kconfig") Signed-off-by: Greg Thelen Cc: Nicholas Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- usr/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/Makefile b/usr/Makefile index 748f6a60bb1e0..138c18cefb529 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -11,6 +11,9 @@ datafile_y = initramfs_data.cpio$(suffix_y) datafile_d_y = .$(datafile_y).d AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/$(datafile_y)" +# clean rules do not have CONFIG_INITRAMFS_COMPRESSION. So clean up after all +# possible compression formats. +clean-files += initramfs_data.cpio* # Generate builtin.o based on initramfs_data.o obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o -- 2.20.1