From nobody Tue Feb 10 20:50:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+94413+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94413+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1664277272; cv=none; d=zohomail.com; s=zohoarc; b=BLU5/TQdzqGBEgjktEs531FBTsBQA2TGtvJsSAIqX4ENKEjVegJQ0JXKHQHfyOGB1pfPyALUxcgj4pHR6uva/ECtRzHnfdktfc2rcFHsGEEp/l6HFuPHjcrczUXMhfDXP0MafoLvN+LHOYclJJlC/fq0q3vlgacYjF4IVDQy5Nc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664277272; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=leEQvd+h1KI47l8CAOsABew3vkcMSjzRQwVlJeJqzho=; b=iiCN3lmifYjXE3To/hQMqTzCpySdCH7a+vvmdWv3rujU9xxMuB18PcODWMrl9PPnSFp2uGeyxuiJ3YJoNasHNGzLpXXg+/Mr9hrl+RP+uW4Fp21WV9XWp4Qo6O9QbojhLA/WwLqnuo1EAQ0k7jhxkw6YP+xeFydiTbpBnmhLVzY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+94413+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1664277272500530.1363984695766; Tue, 27 Sep 2022 04:14:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id UT05YY1788612xX7WgoK8IT9; Tue, 27 Sep 2022 04:14:32 -0700 X-Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web12.9752.1664277270903524371 for ; Tue, 27 Sep 2022 04:14:31 -0700 X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxrmv02jJjirsiAA--.49762S21; Tue, 27 Sep 2022 19:14:29 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen , Michael D Kinney Subject: [edk2-devel] [PATCH v3 19/34] BaseTools: Enable LoongArch64 architecture for LoongArch64 EDK2 CI. Date: Tue, 27 Sep 2022 19:13:39 +0800 Message-Id: <20220927111354.4107719-20-lichao@loongson.cn> In-Reply-To: <20220927111354.4107719-1-lichao@loongson.cn> References: <20220927111354.4107719-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cxrmv02jJjirsiAA--.49762S21 X-Coremail-Antispam: 1UD129KBjvJXoWxXF1fZr1kXFyxJryfKw4rZrb_yoWrAr17p3 Z7Zwn5GF42qrn7Cr93Ka47ur9YvrWkCr17tFWfur1rCrWDZ340gr47try7tFy3A34F9ana 9wsYgw12gF18GaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQACCGMxll4dbgAds- Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,lichao@loongson.cn X-Gm-Message-State: FuGiAqSnEHtKMJTHzZGH9X5lx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1664277272; bh=4Z7B4C8ciKAwIffLc8luvLKI1worfSdMq8VLuis4hgw=; h=Cc:Date:From:Reply-To:Subject:To; b=vjulTh9R1PyZg3Jvc98bLRewqbYa1AJoAJD+uXhfxNnxP1l1qb3fR7YIMox3tPs6Hjd /Y0sCknsolhJipv+ih5P8cgScOZOjisCSt4FRaQj6npc1pQt7Rf0wTXBoLoN/9/zhdBHQ m7PMkQqVaptedaICBgem6XqFpaiSJ1KGeRg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1664277273198100046 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4053 EDK CI for LoongArch64 architecture Enable LoongArch64 architecture for LoongArch64 EDK2 CI testing. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Chao Li Reviewed-by: Michael D Kinney --- ...gcc_loongarch64_unknown_linux_ext_dep.yaml | 22 +++++++++++++ .../LinuxGcc5ToolChain/LinuxGcc5ToolChain.py | 31 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml diff --git a/BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml b/Bas= eTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml new file mode 100644 index 0000000000..ac18438080 --- /dev/null +++ b/BaseTools/Bin/gcc_loongarch64_unknown_linux_ext_dep.yaml @@ -0,0 +1,22 @@ +## @file +# Download GCC LoongArch64 compiler from LoongArch GitHub release site +# Set shell variable GCC5_LOONGARCH64_INSTALL to this folder +# +# This is only downloaded when a build activates scope gcc_loongarch64_unk= nown_linux +# +# Copyright (c) Microsoft Corporation. +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights = reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +## +{ + "scope": "gcc_loongarch64_unknown_linux", + "type": "web", + "name": "gcc_loongarch64_unknown_linux", + "source":"https://github.com/loongson/build-tools/releases/download/2022= .09.06/loongarch64-clfs-6.3-cross-tools-gcc-full.tar.xz", + "version": "13.0.0", + "sha256":"27a43c5bb127794f091d0e75da0003c4d0eec28a958d8f2cc7cd290a6e6133= ab", + "compression_type": "tar", + "internal_path": "/cross-tools/", + "flags": ["set_shell_var", ], + "var_name": "GCC5_LOONGARCH64_INSTALL" +} diff --git a/BaseTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py b/Ba= seTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py index f0685d8040..dab7a87997 100644 --- a/BaseTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py +++ b/BaseTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py @@ -5,6 +5,7 @@ # # Copyright (c) Microsoft Corporation # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
+# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights = reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent ## import os @@ -43,6 +44,12 @@ class LinuxGcc5ToolChain(IUefiBuildPlugin): self.Logger.critical("Failed in check riscv64") return ret =20 + # Check LoongArch64 compiler + ret =3D self._check_loongarch64() + if ret !=3D 0: + self.Logger.critical("Failed in check loongarch64") + return ret + return 0 =20 def _check_arm(self): @@ -121,3 +128,27 @@ class LinuxGcc5ToolChain(IUefiBuildPlugin): shell_environment.GetEnvironment().set_shell_var("LD_LIBRARY_PATH"= , prefix) =20 return 0 + + def _check_loongarch64(self): + # check to see if full path already configured + if shell_environment.GetEnvironment().get_shell_var("GCC5_LOONGARC= H64_PREFIX") is not None: + self.Logger.info("GCC5_LOONGARCH64_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_LOONGARCH64_INSTALL") + if install_path is None: + return 0 + + # make GCC5_LOONGARCH64_PREFIX to align with tools_def.txt + prefix =3D os.path.join(install_path, "bin", "loongarch64-unkn= own-linux-gnu-") + shell_environment.GetEnvironment().set_shell_var("GCC5_LOONGAR= CH64_PREFIX", prefix) + + # now confirm it exists + if not os.path.exists(shell_environment.GetEnvironment().get_shell= _var("GCC5_LOONGARCH64_PREFIX") + "gcc"): + self.Logger.error( + "Path for GCC5_LOONGARCH64_PREFIX toolchain is invalid") + return -2 + + return 0 --=20 2.27.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 (#94413): https://edk2.groups.io/g/devel/message/94413 Mute This Topic: https://groups.io/mt/93947371/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-