From patchwork Wed Mar 15 15:48:59 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: 9626003 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 80A84604A9 for ; Wed, 15 Mar 2017 15:49:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7369321E5A for ; Wed, 15 Mar 2017 15:49:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6815F2810E; Wed, 15 Mar 2017 15:49:20 +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 E04A521E5A for ; Wed, 15 Mar 2017 15:49:19 +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=aU+ocA6J5kRhUvfA2AJNy2QGTL23F2Uf0PVQO15MK/A=; b=aKv RYc85tZsGaD9x8dnGMP77j5vgMlC0ffvhGdXmH+ES3UXvK339oN+leH4pLUGf0tkHD5HjC2IywolQ i2GeWVdp68lcwslxmlAAUs07Gv+Yv3YwFzBsF/bz7MQz2NV1EMteA8bMfvNucacRz/Zk7+ZjnZlYC 4FqCJQA67U8AI5isDOWatSUF5HHs7hM1GqZbkbMFVN0lrggdwX9ASid0eOLgyLTZDPqZhUZr605q+ Sd1FlDVKuc11y4MEWQ+Ufuvyw1FvOE/S+nXaVyMJ+q7+LXNaubIyTn22XN2hnhHWfJ0aQANmihX9b XjgRL/XVSk87a/R/BDEN3mV23+E3lcQ==; 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 1coBAm-0007f8-C0; Wed, 15 Mar 2017 15:49:12 +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 1coBAj-0007eq-Mw; Wed, 15 Mar 2017 15:49:09 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.87) (envelope-from ) id 1coBAa-0008aH-Nh; Wed, 15 Mar 2017 12:49:00 -0300 From: Mauro Carvalho Chehab To: Subject: [PATCH v2] arm: install.sh: don't use /sbin/install if cross-compiling Date: Wed, 15 Mar 2017 12:48:59 -0300 Message-Id: <6675ef47aaa7a186f066c506a564e71c54559776.1489592885.git.mchehab@s-opensource.com> 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 --- v2: keep calling a ~/bin/${INSTALLKERNEL} script, as it can be used to cope with cross builds. arch/arm/boot/install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh index 2a45092a40e3..831e63ac8b0f 100644 --- a/arch/arm/boot/install.sh +++ b/arch/arm/boot/install.sh @@ -35,8 +35,11 @@ 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 [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/ "$@"; fi +if [ "x$CROSS_COMPILE" == "x" ]; then + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi +fi if [ "$(basename $2)" = "zImage" ]; then # Compressed install