Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp618470pxf; Wed, 7 Apr 2021 07:44:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYO055lqFvftQfJ6UjliST08LPo4DJHOfRkNnP2wMPyMgzcq91dBH4aLohoI1N0XBw/A+i X-Received: by 2002:a02:cad9:: with SMTP id f25mr3899916jap.26.1617806673283; Wed, 07 Apr 2021 07:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617806673; cv=none; d=google.com; s=arc-20160816; b=uFkhE2+OXJN4YYljWu9HzpjFQSrLqzNb2IIfAeTJm7t3N7KbXQVQ85X3Z/pzWwJMkf SaEqCIXLkrlGgZxU4maDgyedZAIoInkFAgc0jO6TKMryP8pOQrb+Yjic9sc6BwKcfW5J NV9vzX6Rw3bYQSPO324aGnS3Vgny/StPe0x+ruv8VJoAwCWyF7OMObuqb78G+nYvIh3J HrCFHG+mVwM2gL9U1zWEGImKJB0mE82fc4nkA9WfpVQ4mKDQgXfAfcT3N7LKyG9fPCYb 7xgBCJf+Bj1vp1i0rfk/CVPAxvBIz3+h9ehRi3ryR4pJnxOanQFAL97l8/USPuu3mEL/ ulIA== 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=D56FnYd9yPRq0pZH7D5kEWJ4GxbgEG89PjPsiJSSpOI=; b=zv5+jFwhOleVxBgGuKqx6GnzfBqhM1EKNA6nc+WnP3bQF88AvkDapMeghq4cMfNkTX r9kECAIkjbSeEfs9EsOfRzC0/F8WLPnsKKpbXhMe4kSnI0pWRO8w3WGIB5dn/qH70znQ Gkiz5SzZfwHsmo04iV9fVPxDrxh3yk4ZoOVlEtnP7Hh2xlHgK4CXTU13AWivx6PQTKvb HR1YqTGDB7RuE/otxzrfI16SiRe4+mAHPUgU+QsxHeMaV7hFDvwTMlN9cRW0a6IYHQu6 amtB5BB9/XPCmnEYy3epr2FCvlx8aRwHPSjmaU6vMT/nyjw2F2Mnf2t6Hocu/xJM5IAK 8i4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FiAjfIrc; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r74si21283422ior.80.2021.04.07.07.44.21; Wed, 07 Apr 2021 07:44:33 -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=@linuxfoundation.org header.s=korg header.b=FiAjfIrc; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348827AbhDGFfh (ORCPT + 99 others); Wed, 7 Apr 2021 01:35:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:38916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345284AbhDGFfY (ORCPT ); Wed, 7 Apr 2021 01:35:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD09B613B8; Wed, 7 Apr 2021 05:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617773715; bh=1LtG+7DK6bKnBi2fiCGvmOM2s+/3SEL/McsxhTD/qJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FiAjfIrc+lYbxFl7uEMgtFbNoQWG9fQ9+R5YhhD6ILil9yXVjnuxL4vjTRSrdbAN+ P752TFTKp+ls8/yMWH5+MhgMWcch0jJRAkSetV9r8qHUbw+XmMxqJfnTG7CIsfHIyg Zzrl98tHawNoaBMihLWOeOaJj4UFGHJ6hgPWvGJ8= From: Greg Kroah-Hartman To: Masahiro Yamada , Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Subject: [PATCH 08/20] kbuild: riscv: use common install script Date: Wed, 7 Apr 2021 07:34:07 +0200 Message-Id: <20210407053419.449796-9-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210407053419.449796-1-gregkh@linuxfoundation.org> References: <20210407053419.449796-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The common scripts/install.sh script will now work for riscv, all that is needed is to add the compressed image type to it. So add that file type check and remove the riscv-only version of the file. Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Signed-off-by: Greg Kroah-Hartman --- arch/riscv/boot/Makefile | 4 +-- arch/riscv/boot/install.sh | 60 -------------------------------------- scripts/install.sh | 3 +- 3 files changed, 4 insertions(+), 63 deletions(-) delete mode 100644 arch/riscv/boot/install.sh diff --git a/arch/riscv/boot/Makefile b/arch/riscv/boot/Makefile index 03404c84f971..4ba33aec4ccb 100644 --- a/arch/riscv/boot/Makefile +++ b/arch/riscv/boot/Makefile @@ -47,9 +47,9 @@ $(obj)/loader.bin: $(obj)/loader FORCE $(call if_changed,objcopy) install: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ + $(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \ $(obj)/Image System.map "$(INSTALL_PATH)" zinstall: - $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ + $(CONFIG_SHELL) $(srctree)/scripts/install.sh $(KERNELRELEASE) \ $(obj)/Image.gz System.map "$(INSTALL_PATH)" diff --git a/arch/riscv/boot/install.sh b/arch/riscv/boot/install.sh deleted file mode 100644 index 18c39159c0ff..000000000000 --- a/arch/riscv/boot/install.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -# -# arch/riscv/boot/install.sh -# -# This file is subject to the terms and conditions of the GNU General Public -# License. See the file "COPYING" in the main directory of this archive -# for more details. -# -# Copyright (C) 1995 by Linus Torvalds -# -# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin -# Adapted from code in arch/i386/boot/install.sh by Russell King -# -# "make install" script for the RISC-V Linux port -# -# Arguments: -# $1 - kernel version -# $2 - kernel image file -# $3 - kernel map file -# $4 - default install path (blank if root directory) -# - -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 -if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi - -if [ "$(basename $2)" = "Image.gz" ]; then -# Compressed install - echo "Installing compressed kernel" - base=vmlinuz -else -# Normal install - echo "Installing normal kernel" - base=vmlinux -fi - -if [ -f $4/$base-$1 ]; then - mv $4/$base-$1 $4/$base-$1.old -fi -cat $2 > $4/$base-$1 - -# Install system map file -if [ -f $4/System.map-$1 ]; then - mv $4/System.map-$1 $4/System.map-$1.old -fi -cp $3 $4/System.map-$1 diff --git a/scripts/install.sh b/scripts/install.sh index 934619f81119..9c8a22d96255 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -50,7 +50,8 @@ if [ -x ~/bin/"${INSTALLKERNEL}" ]; then exec ~/bin/"${INSTALLKERNEL}" "$@"; fi if [ -x /sbin/"${INSTALLKERNEL}" ]; then exec /sbin/"${INSTALLKERNEL}" "$@"; fi base=$(basename "$2") -if [ "$base" = "bzImage" ]; then +if [ "$base" = "bzImage" ] || + [ "$base" = "Image.gz" ] ; then # Compressed install echo "Installing compressed kernel" base=vmlinuz -- 2.31.1