Received: by 10.192.165.156 with SMTP id m28csp1385867imm; Wed, 11 Apr 2018 18:42:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+rIIt33hz/4dBEAWjftCGhjp0FFPgDUpEFGCMsPB1ags+Ma+pbRB9ub/bbrSPjyjhwtYml X-Received: by 10.99.115.14 with SMTP id o14mr5211569pgc.121.1523497344203; Wed, 11 Apr 2018 18:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523497344; cv=none; d=google.com; s=arc-20160816; b=KIDlBikuZ5obldHPlazshWmPfXPzx9PtLOD0jexzUSBomsyengLXKrzoby/cgElCax 75BWWV1wt1zt0/sQTtyAc9SznCMIxv9Whk7Ob7MyNaovXxDl/BxIpBq+X1+/moi57dbU RtUDkCk1MydsF7l+1JXW+xMlO3W+xxb9MbsR3tsjbqQM1unFM+vrS/ckcaNUdaRQnZsf ftNffnlHO54kIF5/CRDptz5bCQxEP6w7OBYCbH2+S8KiIMYwbfEqp42AfyK9ZNRhTwuQ IM81zIM2wDJJL/HsjtFgB84IlNdWCkKGT56DKqeIoijwmE6ZNU1FwlZO4levzlLDcmIS O4LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:to:dkim-signature:arc-authentication-results; bh=l4HXsOkcNRUy3azLBQ+ZoeVui3d7CRjojQ1iC7Go61U=; b=wpqShzjQcTdtbax4ce28FZTL+BzS3At6cPb2mAcQxgwqxPXuBtdkqfWE/vsflD1oV7 vY5ojDW4ZO7I5IIGYjaABIu2BTIq73N7Pg86qAGTxEk12PxcN24Z/P6t52TQu2MmPjRK I+ydfV21Vabe0oqY+oAhzZ9jg3VTYP8KoU6v82FAZAx5ta1jcnZQp6g5zI0By+XQ+sjF cRyxABtVpPvNg6y3OSzDzaixAMCk5y4cbqoF/6x3WNBKZpeuaeWTMtZUf11IcZ9SW+4q 1zB59AzqQJVZCrsmmJVR2mdS+e7R1Jea2RUGzONORnZwN21HlX2GHl54qbUXZqT0jFLW /0hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=Efpi0vEF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3-v6si2263495plc.740.2018.04.11.18.41.46; Wed, 11 Apr 2018 18:42:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=Efpi0vEF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752406AbeDLBip (ORCPT + 99 others); Wed, 11 Apr 2018 21:38:45 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:39663 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbeDLBin (ORCPT ); Wed, 11 Apr 2018 21:38:43 -0400 Received: by mail-pf0-f193.google.com with SMTP id c78so2220598pfj.6 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=HV2UfoxuvRd1dSHHdZUSrGlNj9UQ53jWfesL8TwyI8VylVhgtfqoCdd6LYXgusabUA +5KsjDOVIzwF+wC31WGMcyVNlV3GDdbvHEyXBMmoASJsyDcyKfn+Ki8qDeA6DnwSInhi 3khin+BI7rOzCtWzZT1l3/7H9OvtDq8kUIB0MvYbCKsF1I0vpen6jdTaOlS9fZzdOpJy GFdrDX4EVFwMFzotQ07ebtXm5Xepq2vvFW5T9PajlkWrVxR7wsN6uiYRxW8PF6k86HVK IKq8WTmWtaqzajKJCLcMeSADHmcM3tAC4TP1ncekHHAdZo8hLJSaA08t9NtjigSc53Bh ekEg== X-Gm-Message-State: ALQs6tAr4nr9M2+YCCvuqxyZB+svCwXylGdQ/Cm6ZtAwzw8Ge6zEeJ3D wgGQmOsA+krqJX0l7h21qgi3Aw== 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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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)