From nobody Mon Feb 9 00:42:50 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+55682+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+55682+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1583749813; cv=none; d=zohomail.com; s=zohoarc; b=OZkhoU3bJFyuT+ovB5MwwDNpviSvAusJE4X2s+Gfez2cFfj2Bwcf7plUkBVrVrgrfb7ozHuJbw1Z5mTd4wfUiRFF2cmFlsJ4+yU4LOuIKJ3pB02NJvbmvg65Ue6z4yoSVyFfY3sYE39X+ZKJnwSW3CoRCyt3ND6wqua8OBswlFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583749813; 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=OFniE7Lgl1jhBn5SW8dwpKfZVEMEJhn1ZY0FZZIha6M=; b=Cgq3G54E883v8hYTcfNSMWqf51qSnsFaM1T9U1zQ3rQnvOuBWdUl+XUvhyvo21Q1wvf5oJuiIoc+g6lUeZv0FSyWRkOIjG8nr4B22Iz/cd3domPCDbtxES+LHCIQDVkPCWRcWrwqzxpWKtweba7cor24ej8fv7k6Q4noupnMxag= 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+55682+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 1583749813961620.1858174410789; Mon, 9 Mar 2020 03:30:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id P02TYY1788612xeCoduJiOI4; Mon, 09 Mar 2020 03:30:10 -0700 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.53957.1583749810199793873 for ; Mon, 09 Mar 2020 03:30:10 -0700 X-Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 029AN0qp015172; Mon, 9 Mar 2020 10:30:10 GMT X-Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0a-002e3701.pphosted.com with ESMTP id 2ynhh51anf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Mar 2020 10:30:09 +0000 X-Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 5784DA1; Mon, 9 Mar 2020 10:30:09 +0000 (UTC) X-Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id A214F36; Mon, 9 Mar 2020 10:30:06 +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 v2 3/5] BaseTools: Enable RISC-V architecture for RISC-V EDK2 CI. Date: Mon, 9 Mar 2020 17:53:16 +0800 Message-Id: <20200309095318.7331-4-abner.chang@hpe.com> In-Reply-To: <20200309095318.7331-1-abner.chang@hpe.com> References: <20200309095318.7331-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: CiMpmL5Y1WQYYi6jNvgK1ThSx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583749810; bh=QwA8jOw535x1YbOZkTkgkiWU1YMqObk/Xh9WE6YPwuc=; h=Cc:Date:From:Reply-To:Subject:To; b=tGPRCfruQlPkx86vgD1m5L3dEQZziEIuha/p1wyxeFIogxQqmk870o0UrZrzqeGcbXS Bv0x6LalopvuoeuYT60uT2QkoPIHHjZBPolrQDF3AQ+c8iq+zO5muzDLJPskdWDjlH8G1 tGsYPUtVjrTrQlcewhF2yBXbZ9e1/7VC95E= 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 Signed-off-by: Abner Chang --- .../Bin/gcc_riscv64_unknown_ext_dep.yaml | 22 +++++++++++++ .../LinuxGcc5ToolChain/LinuxGcc5ToolChain.py | 31 +++++++++++++++++++ 2 files changed, 53 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..a3ec2d9bdb --- /dev/null +++ b/BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml @@ -0,0 +1,22 @@ +## @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", + "sha256": "63d10b24bf31992841ff3c1b675cec6464dff2cfa97b241c572d7681f6259= 88a", + "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 (#55682): https://edk2.groups.io/g/devel/message/55682 Mute This Topic: https://groups.io/mt/71831895/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-