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=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 47200C432BE for ; Thu, 29 Jul 2021 14:22:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A2FA600CD for ; Thu, 29 Jul 2021 14:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236978AbhG2OWf (ORCPT ); Thu, 29 Jul 2021 10:22:35 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:49931 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234949AbhG2OWc (ORCPT ); Thu, 29 Jul 2021 10:22:32 -0400 Received: from localhost.localdomain (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-12.nifty.com with ESMTP id 16TEJpXK024963; Thu, 29 Jul 2021 23:19:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 16TEJpXK024963 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1627568393; bh=xnWWtxC19ADseH30zsXXnYhg04+pJDyHBtIF5COZE6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g90J6KzE9ROshrt2kxpkOh/6j3qbX/p8SGW2TSESGoK/7OGAd5KOlIDj2cO4IPwD+ cS03Mjm79Q7MJX7vso7iNFPAIaWygc4UhP6Fgo9TqYIBIF2g5EFJgG3x+xGjr7cPwN 5Jes/l0CFzAx866+FFu8G4zQ60Vy6nF6EaILkAH37wT01u4t3qhIS1Qo+0nTd8H2xl ig/tH3ZgebF1mMZHw0ITaqAxsHGAig0WEAa9ZScRPiev1VAZJbvHtHTTIHKC4iukXA 4PMX0sKoy7g62ZQTJNMn3NO1n7zJdhyqJ1XUEid+8X1lpresxifV912tpW//AqUMhH X0HvPYAQOZRMA== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Cc: Masahiro Yamada , Nicholas Piggin , linux-kernel@vger.kernel.org, Jordan Niethe , "Gustavo A. R. Silva" , Nick Desaulniers , Bill Wendling , Joel Stanley Subject: [PATCH 2/3] powerpc: make the install target not depend on any build artifact Date: Thu, 29 Jul 2021 23:19:36 +0900 Message-Id: <20210729141937.445051-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210729141937.445051-1-masahiroy@kernel.org> References: <20210729141937.445051-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 a702f9d1ec0d..0d165bd98b61 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -445,7 +445,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)" PHONY += install diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index 658c93ca7437..14473150ddb4 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh @@ -20,6 +20,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.27.0 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=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,URIBL_BLOCKED,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 277A3C4338F for ; Thu, 29 Jul 2021 14:27:42 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6AE6560F4A for ; Thu, 29 Jul 2021 14:27:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6AE6560F4A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GbCY750lnz3d7H for ; Fri, 30 Jul 2021 00:27:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=g90J6KzE; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=softfail (domain owner discourages use of this host) smtp.mailfrom=kernel.org (client-ip=202.248.20.75; helo=condef-10.nifty.com; envelope-from=masahiroy@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=g90J6KzE; dkim-atps=neutral X-Greylist: delayed 187 seconds by postgrey-1.36 at boromir; Fri, 30 Jul 2021 00:27:12 AEST Received: from condef-10.nifty.com (condef-10.nifty.com [202.248.20.75]) by lists.ozlabs.org (Postfix) with ESMTP id 4GbCXc2Rw7z2yxT for ; Fri, 30 Jul 2021 00:27:12 +1000 (AEST) Received: from conuserg-12.nifty.com ([10.126.8.75])by condef-10.nifty.com with ESMTP id 16TEKV0k013435 for ; Thu, 29 Jul 2021 23:21:00 +0900 Received: from localhost.localdomain (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-12.nifty.com with ESMTP id 16TEJpXK024963; Thu, 29 Jul 2021 23:19:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com 16TEJpXK024963 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1627568393; bh=xnWWtxC19ADseH30zsXXnYhg04+pJDyHBtIF5COZE6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g90J6KzE9ROshrt2kxpkOh/6j3qbX/p8SGW2TSESGoK/7OGAd5KOlIDj2cO4IPwD+ cS03Mjm79Q7MJX7vso7iNFPAIaWygc4UhP6Fgo9TqYIBIF2g5EFJgG3x+xGjr7cPwN 5Jes/l0CFzAx866+FFu8G4zQ60Vy6nF6EaILkAH37wT01u4t3qhIS1Qo+0nTd8H2xl ig/tH3ZgebF1mMZHw0ITaqAxsHGAig0WEAa9ZScRPiev1VAZJbvHtHTTIHKC4iukXA 4PMX0sKoy7g62ZQTJNMn3NO1n7zJdhyqJ1XUEid+8X1lpresxifV912tpW//AqUMhH X0HvPYAQOZRMA== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/3] powerpc: make the install target not depend on any build artifact Date: Thu, 29 Jul 2021 23:19:36 +0900 Message-Id: <20210729141937.445051-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210729141937.445051-1-masahiroy@kernel.org> References: <20210729141937.445051-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Niethe , Masahiro Yamada , Nick Desaulniers , linux-kernel@vger.kernel.org, Nicholas Piggin , "Gustavo A. R. Silva" , Bill Wendling , Joel Stanley Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 --- 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 a702f9d1ec0d..0d165bd98b61 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -445,7 +445,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)" PHONY += install diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index 658c93ca7437..14473150ddb4 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh @@ -20,6 +20,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.27.0