From nobody Mon Feb 9 19:04:36 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+55097+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+55097+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1582952382; cv=none; d=zohomail.com; s=zohoarc; b=IpUYtl7DPqjq7jWGvqXTtpj2GOrIFaI/d2Y335h3o8Pzjy7uBqXJWIbOFHQr086j79o4N5EqMsBw1qOn9Pv71j3utQ+U4agxb0s3KB/B1Mea8krrvP/sxeDgsOy8MamzzlDHg4xDuv1W3OlX2+5UZCyY8KTyK1TUbpDKLvL1PKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582952382; 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=IH3fPfMSeMJ/2aN9ajrTEE6JA7K3L+ueMXwfBHuZtfc=; b=kssIza1EAUppPDoDqlqc3mDlth3Rn0MiV9IZq+A+LzfvOUU1bSGmI/ojHYAfQiOwZF59s+qjyKaB0ZVECQHni6FGMaVi4TwHeAdRRd+oaIv8CE0iF7iruOXbnEibD4r7/qA0O9IK7VbgHCVC9CGdoAzkhJk2t3KlzP6BglR8enM= 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+55097+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 1582952382358165.12979388103633; Fri, 28 Feb 2020 20:59:42 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id FC6lYY1788612xBKZEsERRV4; Fri, 28 Feb 2020 20:59:41 -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.10488.1582952380854486573 for ; Fri, 28 Feb 2020 20:59:40 -0800 X-Received: from pps.filterd (m0148663.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01T4raCx021028; Sat, 29 Feb 2020 04:59:40 GMT X-Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0a-002e3701.pphosted.com with ESMTP id 2yfg5mr9n6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 29 Feb 2020 04:59:40 +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 AAAC562; Sat, 29 Feb 2020 04:59:39 +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 DE64336; Sat, 29 Feb 2020 04:59:36 +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-staging/RISC-V-V2: CI Config PATCH v1 4/6] BaseTools: Enable RISC-V architecture for RISC-V EDK2 CI. Date: Sat, 29 Feb 2020 12:23:03 +0800 Message-Id: <20200229042305.1794-5-abner.chang@hpe.com> In-Reply-To: <20200229042305.1794-1-abner.chang@hpe.com> References: <20200229042305.1794-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: cX5vTreSV4yEZ1Z4NdKRURxWx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1582952381; bh=hAk3vuNiUOM1hWZzDDKvjY+DJZi0rig8Az5CwErkZQI=; h=Cc:Date:From:Reply-To:Subject:To; b=JzFpZFZayI4DmkX9YjSR0mSCw1o3dWoR9mJl9fNPxRWyd8pcRKCgydB7fdn4JAAdlT9 Drkk62EUzfbGJsWdHocjZgXXfHCfUbbhJqhzltFOGlki5aMwKTqBEfH486MOFqXF+3PoS 9sPKdAzll7t7e82CHmTboh3EsmXg0QMmTTE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ:2562 - 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 | 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..9e989392f0 --- /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": "file:///home/abner/gcc-riscv-9.2.0-2020.02-x86_64_riscv64-unk= nown-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 (#55097): https://edk2.groups.io/g/devel/message/55097 Mute This Topic: https://groups.io/mt/71625852/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-