From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23CAEC433EF for ; Fri, 10 Sep 2021 01:02:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09B24610C7 for ; Fri, 10 Sep 2021 01:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244908AbhIJBEA (ORCPT ); Thu, 9 Sep 2021 21:04:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:49622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234814AbhIJAY1 (ORCPT ); Thu, 9 Sep 2021 20:24:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8CCDD60FDA; Fri, 10 Sep 2021 00:23:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233397; bh=Skk1y91WJSa/AERaoFTESdAFmZcXOU/Cr8bE+QgJAf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=csvxWu3gTowsYOoPrGwFQJi5aA7+PcKO/bLQGDNpBC876VXtcxrIDXcnUzMT7sbbk DPbbuoMCk2VtJAuI3K8ou5rmdbKkqHMjFUhr7botmTTD2e2zm4BsLnBPT2MxTXLm1U L8nKaCkqCzQfe6kgQvvk7vaOYFv5k7d0YyKoODhLWgrn8I48NTJKIPyYjLT8eCMpCv vDZVfLQ1hwZO+iyecVpAao8ZhiwfKEyZPcaecCGca3/9A8MckNCKTAznlznwRSiHND p/BE7/SToTtlUN3IQJO3ad1c4gXA/G+hGCRtwKppvkdOsOm8NBBYh8QhdiGYGYSyEg skkZLP8qSJe7A== 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 4.14 05/19] powerpc: make the install target not depend on any build artifact Date: Thu, 9 Sep 2021 20:22:55 -0400 Message-Id: <20210910002309.176412-5-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910002309.176412-1-sashal@kernel.org> References: <20210910002309.176412-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 5807c9d8e56d..a74573b4e027 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -435,7 +435,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