From patchwork Fri Oct 19 04:15:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 149206 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2819948lji; Thu, 18 Oct 2018 21:16:07 -0700 (PDT) X-Google-Smtp-Source: AJdET5dYtoj3VzNwitdN/IhPAz0cIRhv5EUh4gYr5eEuZkwF8q0Q5u8c7QrKdRCOiAio70hwoRRU X-Received: by 2002:a37:1859:: with SMTP id j86-v6mr1958357qkh.309.1539922566902; Thu, 18 Oct 2018 21:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539922566; cv=none; d=google.com; s=arc-20160816; b=iTiRNRvhYOSiCeCTLJ0nHXIeSWLq1mRqA0QnyzIzCZikpfSll9W3ZIgngLWn/fnLh4 aM50ou5zbPYnwd8DFHTyDhKjTSQB4cu+XQmfV0LsVDChLCUwsqPKx5lAEyx2j/T+SWe+ tSkvz57E9ieUKsOLFDT0jThExFHu/aoOkDQs2d4zhWsPECRrBb7djq/GlkUOD8dVKHxF 9y/T7fNEzOVJk99bsG+8Awthljq+TQ1HvZxZviMJJwKyGioZ8h0TdUgehrTSPmtfot/6 4AhFyQNIVbS1UT1QYA0E3pSFFh4IbtvoK0mQco2qBwFt83ujVAhvWQrWCYHdGCYa3C2w 8jlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=VCEFNThYklESM9Lm5ftS02/qdi7IAHzjGohqC4i7LVs=; b=H6WTdg2YCTfq/9/snthkSDaYVes9llS6NmcGsifb3YteMdOFjMrDC6ah5pTq169agS 7ikflfAjNNYftA/auS6pHcTVQSZOY75mN29LJYgNSKMmexxhlYJ7aS1BTz+MdMJ3B6fi J08/4TRoNmW3Mor7ymbR+SpGIQn9IUG9sd3lINj5TPKx9Mn5bu54OFTQKGUy/6GP7uPX rpwbxopKjWnaNsGbVI/laPrZWbb8RrvNFeK56jNozHK1/vE82NIOqC2R+RZMEB+EGvnr fggYPGkp4iZF83iJkro93ekO32B7YXjRljatCtKNNhaI0ATmTYX/ziWoIeW9m9U+ip6k wb/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id j93-v6si6300388qtd.386.2018.10.18.21.16.05; Thu, 18 Oct 2018 21:16:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9144D68673; Fri, 19 Oct 2018 04:16:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 71DCE6866A; Fri, 19 Oct 2018 04:16:02 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9B9436866E; Fri, 19 Oct 2018 04:15:59 +0000 (UTC) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by lists.linaro.org (Postfix) with ESMTPS id 8A813618B0 for ; Fri, 19 Oct 2018 04:15:58 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id l81-v6so15896450pfg.3 for ; Thu, 18 Oct 2018 21:15:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/Ux0WaX0/zYoq3TZEv4pr6SEH9Vtb8a0V0qw5oQBeAo=; b=BUegaZ3CER4Fx/3PzivdzjyJEiI2/YYSwvjuTJ90zY+decv3Kuv7zJU6+pLiH0g+cU y5H3rZfbRXvwDbYwREtvB+30tdnWchnTNt0/Gxxw9Z1b4989AHX+Q5GsT2JbPM6AtDiU +Asu011gVbMEBquRtAkPLrUC/QoZ7GsRhQOGBOTgkaDsMsJgQrzoTH/igJ77u81LKeAs u+lFEUmIBZpuT7K5EchiHi4011QeGZUwvcxQq0NdDZwJbH8NQY9o90Zx2iD4njqJ8Chx sK2O8sRQ8joh0N7+//iUE8ydQyceC8QPbo7cJXjvD+ianphjHKwfEDVhgFjrwhGUFZdh d/zg== X-Gm-Message-State: ABuFfojNcjKJmFa7SfYfma5MdJcSJQd+iBtp06RHzqzWcHNSZeng1Jin FFbVxD5Dd0rs5uuUUIggTdPXfakjH3s5ZolH X-Received: by 2002:a65:6249:: with SMTP id q9-v6mr30860940pgv.392.1539922557320; Thu, 18 Oct 2018 21:15:57 -0700 (PDT) Received: from localhost.localdomain ([64.64.108.56]) by smtp.gmail.com with ESMTPSA id z15-v6sm26859441pfn.170.2018.10.18.21.15.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Oct 2018 21:15:56 -0700 (PDT) From: Haojian Zhuang To: linaro-uefi@lists.linaro.org, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Date: Fri, 19 Oct 2018 12:15:49 +0800 Message-Id: <1539922549-5432-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [Linaro-uefi] [PATCH] atf-build.sh: fix to calculate atf version X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "For discussions about Linaro-related UEFI development. Not a substitute for edk2-devel." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" commit 1a0f11213a539a5d0c5d05bfaa68ccc75cb340aa Author: Soby Mathew Date: Mon Oct 1 16:16:34 2018 +0100 Update the version to 2.0 Change-Id: Icbc556d47a58d0870577b1bf1cd27cc5827fd56d Signed-off-by: Soby Mathew Since ARM Trusted Firmware version is updated to 2.0, the calculation of ATF is wrong. It could only calculate version for 1.x. Update the calculation to support 2.x or n.x. Signed-off-by: Haojian Zhuang --- atf-build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/atf-build.sh b/atf-build.sh index fb80ad0..c6ec3e3 100755 --- a/atf-build.sh +++ b/atf-build.sh @@ -25,9 +25,12 @@ function check_atf_buildver MAJOR=`grep "^VERSION_MAJOR" Makefile | sed 's/.*:= *\([0-9]*\).*/\1/'` [ $? -ne 0 ] && return 1 MINOR=`grep "^VERSION_MINOR" Makefile | sed 's/.*:= *\([0-9]*\).*/\1/'` - [ $? -ne 0 ] && return 1 - if [ "$MAJOR" -eq 1 -a "$MINOR" -ge 2 ]; then + if [ "$MAJOR" -eq 1 ]; then + if [ "$MINOR" -ge 2 ]; then + ATF_BUILDVER=2 + fi + else ATF_BUILDVER=2 fi }