From patchwork Wed Mar 15 16:14:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9626101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6F4456048C for ; Wed, 15 Mar 2017 16:16:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 615FD28620 for ; Wed, 15 Mar 2017 16:16:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55A4D2861A; Wed, 15 Mar 2017 16:16:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 440CE2861A for ; Wed, 15 Mar 2017 16:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=OklUFx0EQ1NlPd9i5/25gjpkmr3Q7a9QllZgero9raA=; b=Kwk Sg5fKidezoVQOcN/dfZR61kclGaJZ4nql0mKoVExDXELFjw4lS3WzY3+p0S6trlXZfazZuznileWr /QFtTa0JMEstXrg3gm9PWcM4vro5K1SL9wFo+tRr0xuzpvFw4YF+0P4QNZ7Mfj68Hi/8ZSJKme4tf sxlrHYpFsy8Yj5h+Zdn6hcq0OUwwnVQTfYcKG6BODedLq+HvQ6MJSIerioKiArpulk+AkcBrBsRY3 oPWvAdMIIcKvX95Gksz+G1cgQLKWgzGiAjAxJ5qEI2cfw/ZqLCwhmB8DG9SUwM9J4W4oFhUZ8ucZ+ ERgRF+RNLD7+j13Y74UE8Np0TsL35AA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1coBai-0007Xr-Ek; Wed, 15 Mar 2017 16:16:00 +0000 Received: from [179.95.63.235] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1coBZY-0005Sr-4J; Wed, 15 Mar 2017 16:14:48 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.87) (envelope-from ) id 1coBZP-0008cQ-Ja; Wed, 15 Mar 2017 13:14:39 -0300 From: Mauro Carvalho Chehab To: Subject: [PATCH v3] arm: install.sh: don't use /sbin/install if cross-compiling Date: Wed, 15 Mar 2017 13:14:38 -0300 Message-Id: X-Mailer: git-send-email 2.9.3 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mauro Carvalho Chehab , Russell King , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP It doesn't make sense to run the local machine's install script if the Kernel was built using a cross-compiler, as it will try to create symlinks at the rootfs of the local machine: ln: failed to create symbolic link '/boot/System.map': Permission denied ln: failed to create symbolic link '/boot/vmlinuz': Permission denied ln: failed to create symbolic link '/boot/System.map': Permission denied Signed-off-by: Mauro Carvalho Chehab --- arch/arm/boot/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh index 2a45092a40e3..5384f0ff91ea 100644 --- a/arch/arm/boot/install.sh +++ b/arch/arm/boot/install.sh @@ -36,7 +36,10 @@ 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 [ "x$CROSS_COMPILE" == "x" ]; then + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi +fi if [ "$(basename $2)" = "zImage" ]; then # Compressed install