From nobody Mon Feb 9 19:52:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55362+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55362+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1583301773; cv=none; d=zohomail.com; s=zohoarc; b=GVf8SDf/rQOEBLBJrjBqQPJ9c0quWJNPSmW/GTp1dGmLA3dYUWFzceTAE/EMsDuzndDfXEcOF1fqgMCn23fObhnv4t20Fip1nHza51Bd3ByyD23GtSCVkFULbT422A71PuFwpLGkH+sygD/1E7aaYz3z+kVtCSn0dcQIBxP2nHs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583301773; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=c5Sma6Xdjqw7H4MuRsK6weE1czXlQCbQ7oESaAzcZiA=; b=HRdYBesHwVlqIUz8pvItgn1HTqG1yu/LxxRBevhljVT8khB9NmegdFEoSKHcOx/gxrbozw6hrYa3zn+kw7ek1jc6V3ddl6uHYSLPrCJoIOQuWL8a8e/Fl4nMN2kNT+rz+XIwup/4vSyGbS87LYAerenntSzkzIbGBFckL8tp7Vc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55362+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1583301773087473.49415062914; Tue, 3 Mar 2020 22:02:53 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id uMtlYY1788612xdfNxS2Ipz6; Tue, 03 Mar 2020 22:02:52 -0800 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web09.7624.1583301771721814221 for ; Tue, 03 Mar 2020 22:02:51 -0800 X-Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02460gli030947; Wed, 4 Mar 2020 06:02:51 GMT X-Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 2yj4vqh21d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Mar 2020 06:02:51 +0000 X-Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 882D46F; Wed, 4 Mar 2020 06:02:50 +0000 (UTC) X-Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id C7E7B4A; Wed, 4 Mar 2020 06:02:47 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Bret Barkelew , Sean Brogan , Bob Feng , Leif Lindholm , Michael D Kinney , Liming Gao , Gilbert Chen , Daniel Helmut Schaefer Subject: [edk2-devel] [edk2/master PATCH RISC-V CI v1 4/6] BaseTools: Enable RISC-V architecture for RISC-V EDK2 CI. Date: Wed, 4 Mar 2020 13:26:05 +0800 Message-Id: <20200304052607.31801-5-abner.chang@hpe.com> In-Reply-To: <20200304052607.31801-1-abner.chang@hpe.com> References: <20200304052607.31801-1-abner.chang@hpe.com> X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@hpe.com X-Gm-Message-State: 3drb4ZD0411qfUIGUftKVagjx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583301772; bh=zbOaKAUWKxCheCdDCjXYT6sSrr/mQiceMrfREDjjD0o=; h=Cc:Date:From:Reply-To:Subject:To; b=fG72iYICLNKkYVqwkTAJTWtIAbrmirvm8fz4XoyOnDk6fTq0rY7NM0AmY+8TMcL73fI 1+0fHAkcQpVZ6Ua2hm7jAgogU26kzftVdw6gzJ/AHj0TJ8ywVyaY1UCXgxPM2EjoC52UZ yy/9ynkT0308q+a6zJoUCthvdiicC5A8WQk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ:2562: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2562 EDK CI for RISC-V architecture Enable RISC-V architecture for RISC-V EDK2 CI testing. Signed-off-by: Abner Chang Cc: Bret Barkelew Cc: Sean Brogan Cc: Bob Feng Cc: Leif Lindholm Cc: Michael D Kinney Cc: Liming Gao Cc: Gilbert Chen Cc: Daniel Helmut Schaefer --- .../Bin/gcc_riscv64_unknown_ext_dep.yaml | 21 +++++++++++++ .../LinuxGcc5ToolChain/LinuxGcc5ToolChain.py | 31 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml diff --git a/BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml b/BaseTools/Bin= /gcc_riscv64_unknown_ext_dep.yaml new file mode 100644 index 0000000000..38fe300a68 --- /dev/null +++ b/BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml @@ -0,0 +1,21 @@ +## @file +# Download GCC RISCV64 compiler from RISC-V Organization release site +# Set shell variable GCC5_RISCV64_INSTALL to this folder +# +# This is only downloaded when a build activates scope gcc_riscv64_unknown +# +# Copyright (c) Microsoft Corporation. +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +## +{ + "scope": "gcc_riscv64_unknown", + "type": "web", + "name": "gcc_riscv64_unknown", + "source": "https://media.githubusercontent.com/media/riscv/riscv-uefi-ed= k2-docs/master/gcc-riscv-edk2-ci-toolchain/gcc-riscv-9.2.0-2020.02-x86_64_r= iscv64-unknown-gnu.tar.xz", + "version": "9.2.0", + "compression_type": "tar", + "internal_path": "/gcc-riscv-9.2.0-2020.02-x86_64_riscv64-unknown-gnu", + "flags": ["set_shell_var", ], + "var_name": "GCC5_RISCV64_INSTALL" +} diff --git a/BaseTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py b/Ba= seTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py index c31641e931..502d2c21d2 100644 --- a/BaseTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py +++ b/BaseTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py @@ -4,6 +4,7 @@ # This plugin works in conjuncture with the tools_def # # Copyright (c) Microsoft Corporation +# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent ## import os @@ -36,6 +37,12 @@ class LinuxGcc5ToolChain(IUefiBuildPlugin): self.Logger.critical("Failed in check arm") return ret =20 + # Check RISCV64 compiler + ret =3D self._check_riscv64() + if ret !=3D 0: + self.Logger.critical("Failed in check riscv64") + return ret + return 0 =20 def _check_arm(self): @@ -83,3 +90,27 @@ class LinuxGcc5ToolChain(IUefiBuildPlugin): return -2 =20 return 0 + + def _check_riscv64(self): + # check to see if full path already configured + if shell_environment.GetEnvironment().get_shell_var("GCC5_RISCV64_= PREFIX") is not None: + self.Logger.info("GCC5_RISCV64_PREFIX is already set.") + + else: + # now check for install dir. If set then set the Prefix + install_path =3D shell_environment.GetEnvironment( + ).get_shell_var("GCC5_RISCV64_INSTALL") + if install_path is None: + return 0 + + # make GCC5_RISCV64_PREFIX to align with tools_def.txt + prefix =3D os.path.join(install_path, "bin", "riscv64-unknown-= elf-") + shell_environment.GetEnvironment().set_shell_var("GCC5_RISCV64= _PREFIX", prefix) + + # now confirm it exists + if not os.path.exists(shell_environment.GetEnvironment().get_shell= _var("GCC5_RISCV64_PREFIX") + "gcc"): + self.Logger.error( + "Path for GCC5_RISCV64_PREFIX toolchain is invalid") + return -2 + + return 0 --=20 2.25.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55362): https://edk2.groups.io/g/devel/message/55362 Mute This Topic: https://groups.io/mt/71720429/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-