From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.9092.1595557744304995260 for ; Thu, 23 Jul 2020 19:29:04 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: samer.el-haj-mahmoud@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D37ED101E; Thu, 23 Jul 2020 19:29:03 -0700 (PDT) Received: from U203705.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7789B3F66E; Thu, 23 Jul 2020 19:29:03 -0700 (PDT) From: "Samer El-Haj-Mahmoud" To: devel@edk2.groups.io Cc: G Edhaya Chandran , Eric Jin , Irene Park , Heinrich Schuchardt Subject: [edk2-test][PATCH v1 1/3] uefi-sct/SctPkg: Fix build with latest EDK2 Date: Thu, 23 Jul 2020 22:28:58 -0400 Message-Id: <20200724022900.30826-2-Samer.El-Haj-Mahmoud@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200724022900.30826-1-Samer.El-Haj-Mahmoud@arm.com> References: <20200724022900.30826-1-Samer.El-Haj-Mahmoud@arm.com> Update the SctPkg build.sh script to work with latest EDK2, without depending on UDK2017. Changes include: - Allowing GCC versions 5+ - Refactoring WORKSPACE based on the new EDK2 stuructre (SctPkg is treated as another PACKAGES_PATH component, not a package in the Edk2 folder itself) - Remove unnecessary EdkCompatibilityPkg reference This patch depends on the change in https://edk2.groups.io/g/devel/message/60407 Cc: G Edhaya Chandran Cc: Eric Jin Cc: Irene Park Cc: Heinrich Schuchardt Signed-off-by: Samer El-Haj-Mahmoud --- uefi-sct/SctPkg/build.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/uefi-sct/SctPkg/build.sh b/uefi-sct/SctPkg/build.sh index baf28b40a5f0..d4253cecc7a5 100755 --- a/uefi-sct/SctPkg/build.sh +++ b/uefi-sct/SctPkg/build.sh @@ -1,7 +1,7 @@ #!/bin/bash # # Copyright 2006 - 2015 Unified EFI, Inc.
-# Copyright (c) 2011 - 2019, ARM Ltd. All rights reserved.
+# Copyright (c) 2011 - 2020, ARM Ltd. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -13,7 +13,7 @@ # ## -SctpackageDependencyList=(EdkCompatibilityPkg SctPkg BaseTools) +SctpackageDependencyList=(SctPkg BaseTools) function get_build_arch { @@ -55,8 +55,13 @@ function set_cross_compile function get_gcc_version { gcc_version=$($1 -dumpversion) + + if [ "$gcc_version" -gt "5" ]; then + gcc_version="5" + fi + case $gcc_version in - 4.6*|4.7*|4.8*|4.9*) + 4.6*|4.7*|4.8*|4.9*|5*) echo GCC$(echo ${gcc_version} | awk -F. '{print $1$2}') ;; *) @@ -122,7 +127,6 @@ do done export EFI_SOURCE=`pwd` -export EDK_SOURCE=`pwd`/EdkCompatibilityPkg # check if the last command was successful status=$? @@ -201,14 +205,13 @@ fi # if [ -z "${WORKSPACE:-}" ]; then echo Initializing workspace - # Uses an external BaseTools project - # Uses the BaseTools in edk2 - export EDK_TOOLS_PATH=`pwd`/BaseTools + export WORKSPACE=$PWD + export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/SctPkg # We do not pass BuildArmSct.sh arguments to edksetup.sh while (( "$#" )); do shift done - source ./edksetup.sh + . edk2/edksetup.sh else echo Building from: $WORKSPACE fi -- 2.17.1