Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1013753pxb; Thu, 9 Sep 2021 18:01:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw64j4cjiUka12AqjiK5JUuUd5f7mdSzfH6P6WPsIti60CkGrLHDY6EUHgknLASSySQQFxY X-Received: by 2002:a17:907:209b:: with SMTP id pv27mr5723695ejb.111.1631235681202; Thu, 09 Sep 2021 18:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631235681; cv=none; d=google.com; s=arc-20160816; b=oNCWnXBDigvQJ3y/z+IBUY3R8u1eb147H/eDvJ7kV+ZPGVmVlLh5RePAG5SPbduRnc v+4YKzwLOogGp+rSDF0hXRv3Aa0HUmF7N1MbXcP7t6GV4nGztfIQqKWjVkrI8oVqa5oA HoL+JsU0D7k1o/Rs3Dicr2lG2v3P14qHJEQvgA54PjxJO1TWv1XXGjyAYi4TB5uilmwj WzzpXwxUeJ6Po3HDkE1WgzMbCdiHtv4Op5YiT6piA8FYKPsOZGQF+axhjiRQUuc+84/W LQnpnScbWhEUrKF70LM+yt3a5x7F4L6iQSSr7R9CxB7EWQG0zzcvPY7JkMuv/z7rRseK POKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tQJZCimM/1fnAH3UP37VC6r5xKa+XjD/rfC8xZTOJgk=; b=C4b3Nxw5p33JdHs01H/oJTrKQeYL37LAQSTbQGA4JAi+crQKB0o5a0nY64fF9TznY5 vj7D+0mw7ZHqo2bf2LnWJtG378FXX5Afp91D8DJATKRTA7V2Pub0SuJnsnbacBIwF5xf /PHGeFvBvfqPXHush9sHIj4j1JcDu+YWEUsqj/RonYCLEkup7yNBgwdiJwYJ9loTsv/A KFaxW/WmJYfOkvoom9tJaJHOIVMFx2HzDmwgXd6gkcfsoJwcG28VUwfoLcjEAVVykE+a GhlmQdJ3tzsvV+T5n0xtJi7aLM/9MKkC+tgoiTzOwmp/tRgEa3hgFFnONPYvSQzx2UQn lE/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GlWMi+BK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si3741584edr.63.2021.09.09.18.00.56; Thu, 09 Sep 2021 18:01:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GlWMi+BK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244562AbhIJA7r (ORCPT + 99 others); Thu, 9 Sep 2021 20:59:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:48704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234326AbhIJAXK (ORCPT ); Thu, 9 Sep 2021 20:23:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 95A0960FE3; Fri, 10 Sep 2021 00:21:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233320; bh=D+QLyve1cn3xfj7bjTeGK+jKkdbDavOOIzQB1Q9hzLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GlWMi+BKcRNNq025ZXj7RP/0dio86ZlncrTn7gvrMiDJdUTQjKGA2MDjnq4lT+BC8 M6f5ap2h63JuS3kAwHVP7murcP+kQInIC0Z3Jp+ewKSC0ZnvITPO37ZaeEKFYg86yl E1rhK/dRCT6I7xzqU3fDjklPeWLj7LTHu2POdjvn+BYgSfVsCwiauZR9/3/TGfAoWB 7bAQBOwlAktbS8QXY/xv6B+OuXKF21qJ6RpeXN1mKRJ7JxG4vQNp8unRuuh7tV33H2 wL4JhYTPMbL0KAkLEjd/hepLWCFcRgv5x/g1lduKKD1WVQcijYoPqOgXoYujvfvzBj ZjZjkZudM+h9g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Masahiro Yamada , Nick Desaulniers , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.4 12/37] powerpc: make the install target not depend on any build artifact Date: Thu, 9 Sep 2021 20:21:17 -0400 Message-Id: <20210910002143.175731-12-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002143.175731-1-sashal@kernel.org> References: <20210910002143.175731-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit 9bef456b20581e630ef9a13555ca04fed65a859d ] The install target should not depend on any build artifact. The reason is explained in commit 19514fc665ff ("arm, kbuild: make "make install" not depend on vmlinux"). Change the PowerPC installation code in a similar way. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210729141937.445051-2-masahiroy@kernel.org Signed-off-by: Sasha Levin --- arch/powerpc/boot/Makefile | 2 +- arch/powerpc/boot/install.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 8c69bd07ada6..459ef5c780f7 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -438,7 +438,7 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) $(Q)rm -f $@; ln $< $@ # Only install the vmlinux -install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) +install: sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" # Install the vmlinux and other built boot targets. diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index b6a256bc96ee..8d669cf1ccda 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh @@ -21,6 +21,20 @@ # Bail with error code if anything goes wrong set -e +verify () { + if [ ! -f "$1" ]; then + echo "" 1>&2 + echo " *** Missing file: $1" 1>&2 + echo ' *** You need to run "make" before "make install".' 1>&2 + echo "" 1>&2 + exit 1 + fi +} + +# Make sure the files actually exist +verify "$2" +verify "$3" + # User may have a custom install script if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi -- 2.30.2