From patchwork Thu Apr 12 01:38:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Landley X-Patchwork-Id: 10337717 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 472AD602D8 for ; Thu, 12 Apr 2018 01:39:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3513E2851B for ; Thu, 12 Apr 2018 01:39:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2925E2851E; Thu, 12 Apr 2018 01:39:05 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 B0F2A2851B for ; Thu, 12 Apr 2018 01:39:04 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BEIM9Cvu/DtAuP6p8vDgeABSgDyoYpkpOXWpjE7H2G8=; b=CH3WgXTIsJfwxk QiN0j2vPbUcOtDhnKouVfTd/fCX2wFHjo6eCqCwmLYDcpL+sLB2qkCd0hUvJjARAIYZ3hbFJLhZU6 um6OrQ8vfKr4D40NUc3KmuM7mXyXdAnsMvwCTqoIZcbv6nqa0Ra0NgJYH2ygEyzhLGXWf+vI7nYTN N9hoMFDmTxn/eReJV8dxl3+r1IDtwanlv7vCoLpguiSTUnaGkaFXW68dpUSs/WeEfa2LU9zmZQnst gZ2bA2l8lQf7yjgvTkic1umUuPx5fng1EHvqFr4GXRJYV0FAZ1vuGxvyQYdv4ZLhd2gVwsYHep1Cq UPVBVG17pOvZ4KlKo4oQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6RCT-0006Ft-A8; Thu, 12 Apr 2018 01:38:57 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6RCQ-0006Dj-F3 for linux-arm-kernel@lists.infradead.org; Thu, 12 Apr 2018 01:38:55 +0000 Received: by mail-pf0-x244.google.com with SMTP id p6so2227080pfn.4 for ; Wed, 11 Apr 2018 18:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=l4HXsOkcNRUy3azLBQ+ZoeVui3d7CRjojQ1iC7Go61U=; b=Efpi0vEFqVIqTyAEZBmaMsJ9HMLzaz2ED/gXwvMayJWLZViABR3nsNHl1csNlvXOyl Nt0qFZtbxfzzogYmj5gwaLhyilY5hoMqua7i6hBCltW0dob3UTRgyreyagO0zhEfVYN6 zzGqBahYri5KorxvKUo8lQ5dUxBz0KAhZivxkCD/0vQbfoh0oTcKnKMJbdo6Mrjd4yxU uvovGN4krPNOO8RzACTgIO0VqbSzzlY4umSWlrpFyNGnUXz4eIX0bdj0XmmDSCTFSW0G NBwlphNPbgaBg29YdEQ9WLhwAOD4iiQHO0RkRsLyVonryHe8i9lNuS2jcGknXTBD8YZj zbnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=l4HXsOkcNRUy3azLBQ+ZoeVui3d7CRjojQ1iC7Go61U=; b=H+jMzHySVQ/zBKdGi22fxicEeIywpjb5CU2iwI5bkMjtqGo6cLQ28T9kFeJtQsCqWO CCrI3oLwKIW9QgCdYUBu857peo4auIAPC04jhqXYgfuN93ha/j1pHcziGqdp6A4xrCYX o57OF+ry9RJ6/vTAV29EEBJAh7SFg94Q/tnCGOXSvtZJZQkUPFVo/zDvHppPUo18dk1v NDzUiDjS797d0vGDUrmuCC+gJVua5kWUwYrJzjsmr/xSvueYdW8Jti9kXB2BPytntusy 41G65M8B/Qt8fzHKgXXKwig9cgZTo8YB6231lp5nIAxfzhbSga8ILwcMRvRFZWxkgL4f uYVQ== X-Gm-Message-State: ALQs6tAhrEqMIKrbPOyyaj4LercRvBDieoem0RVKfMpm3mV5TQoCToCR 5B+RtrZc6dl9W37wxB2tCaqkLyOEXls= X-Google-Smtp-Source: AIpwx4/AfT5PwWlPB8zBaR9+b4j/2ENqCsAEQ49Z0WVxinKwtRhEA0DP1mcPbEsmrQ+cPH8F1AlVoA== X-Received: by 10.99.109.75 with SMTP id i72mr5065679pgc.403.1523497123393; Wed, 11 Apr 2018 18:38:43 -0700 (PDT) Received: from [192.168.43.158] ([172.58.140.11]) by smtp.googlemail.com with ESMTPSA id z8sm4788610pgc.90.2018.04.11.18.38.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 18:38:42 -0700 (PDT) To: "linux-kernel@vger.kernel.org" , linux@armlinux.org.uk, kstewart@linuxfoundation.org, pombredanne@nexb.com, tglx@linutronix.de, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, Tony Lindgren , Keerthy , Russell King From: Rob Landley Subject: [PATCH] Replace unnecessary perl with sed, printf, and the shell $(( )) operator. Message-ID: <9c72100c-b3e4-07ca-1784-fda2ac9d708c@landley.net> Date: Wed, 11 Apr 2018 20:38:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180411_183854_504717_149153C4 X-CRM114-Status: GOOD ( 12.24 ) 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: , 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 You can build a kernel in a cross compiling environment that doesn't have perl in the $PATH. Commit 429f7a062e3b broke that for 32 bit arm. Fix it. Signed-off-by: Rob Landley Acked-by: Rob Landley --- arch/arm/boot/compressed/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 45a6b9b..33ebeb2 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -117,11 +117,10 @@ ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj) asflags-y := -DZIMAGE # Supply kernel BSS size to the decompressor via a linker symbol. -KBSS_SZ = $(shell $(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \ - perl -e 'while (<>) { \ - $$bss_start=hex($$1) if /^([[:xdigit:]]+) B __bss_start$$/; \ - $$bss_end=hex($$1) if /^([[:xdigit:]]+) B __bss_stop$$/; \ - }; printf "%d\n", $$bss_end - $$bss_start;') +KBSS_SZ := $(shell echo $$(($$(printf '%d+%d' $$( \ + $(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \ + sed -n -e 's/^\([^ ]*\) B __bss_start$$/-0x\1/p' \ + -e 's/^\([^ ]*\) B __bss_stop$$/0x\1/p') ) )) ) LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ) # Supply ZRELADDR to the decompressor via a linker symbol. ifneq ($(CONFIG_AUTO_ZRELADDR),y)