From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web09.4180.1663148438301791765 for ; Wed, 14 Sep 2022 02:40:39 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lichao@loongson.cn) Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxTWuToSFj+wAZAA--.35968S2; Wed, 14 Sep 2022 17:40:35 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen , Baoqi Zhang Subject: [PATCH v2 17/34] BaseTools: BaseTools changes for LoongArch platform. Date: Wed, 14 Sep 2022 17:40:35 +0800 Message-Id: <20220914094035.3696346-1-lichao@loongson.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxTWuToSFj+wAZAA--.35968S2 X-Coremail-Antispam: 1UD129KBjvAXoWfuw15CryDAF1fGrW7CFyrtFb_yoW8Zw4rGo Z3Jr48WFn0gr4UJFWxC3W5tFWDur4kWaySqF1akr1rCF4ftwn8Xw4rt34UKry8Wryqk3WD JFyDCF1qya47XF1Dn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UjIYCTnIWjp_UUUYb7k0a2IF6w4kM7kC6x804xWl14x267AKxVWUJVW8JwAFc2x0 x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj4 1l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0 I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjc xK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVAC Y4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv67AKxVWUJV W8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc2xSY4AK6svPMxAIw28I cxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2 IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI 42IY6xIIjxv20xvE14v26r4j6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1lIx AIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2 jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07bYGYJUUUUU= X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAJCGMgctwUuAAmsn Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4053 Python code changes for building EDK2 LoongArch platform. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Chao Li Co-authored-by: Baoqi Zhang --- BaseTools/Source/Python/Common/DataType.py | 21 ++++++++++++++-- .../Source/Python/UPT/Library/DataType.py | 24 ++++++++++++++++++- BaseTools/Source/Python/build/buildoptions.py | 3 ++- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/= Python/Common/DataType.py index dc49623333..48dbf16495 100644 --- a/BaseTools/Source/Python/Common/DataType.py +++ b/BaseTools/Source/Python/Common/DataType.py @@ -4,6 +4,7 @@ # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
=0D # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
=0D # Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. = All rights reserved.
=0D +# Portions Copyright (c) 2022, Loongson Technology Corporation Limited. Al= l rights reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D ##=0D @@ -52,10 +53,10 @@ TAB_ARCH_X64 =3D 'X64' TAB_ARCH_ARM =3D 'ARM'=0D TAB_ARCH_EBC =3D 'EBC'=0D TAB_ARCH_AARCH64 =3D 'AARCH64'=0D -=0D TAB_ARCH_RISCV64 =3D 'RISCV64'=0D +TAB_ARCH_LOONGARCH64 =3D 'LOONGARCH64'=0D =0D -ARCH_SET_FULL =3D {TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_ARM, TAB_ARCH_EBC= , TAB_ARCH_AARCH64, TAB_ARCH_RISCV64, TAB_ARCH_COMMON}=0D +ARCH_SET_FULL =3D {TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_ARM, TAB_ARCH_EBC= , TAB_ARCH_AARCH64, TAB_ARCH_RISCV64, TAB_ARCH_LOONGARCH64, TAB_ARCH_COMMON= }=0D =0D SUP_MODULE_BASE =3D 'BASE'=0D SUP_MODULE_SEC =3D 'SEC'=0D @@ -138,6 +139,7 @@ TAB_SOURCES_X64 =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_= X64 TAB_SOURCES_ARM =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_SOURCES_EBC =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_SOURCES_AARCH64 =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_SOURCES_LOONGARCH64 =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_LOONGARCH64= =0D =0D TAB_BINARIES =3D 'Binaries'=0D TAB_BINARIES_COMMON =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_COMMON=0D @@ -146,6 +148,7 @@ TAB_BINARIES_X64 =3D TAB_BINARIES + TAB_SPLIT + TAB_ARC= H_X64 TAB_BINARIES_ARM =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_BINARIES_EBC =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_BINARIES_AARCH64 =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_BINARIES_LOONGARCH64 =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_LOONGARCH= 64=0D =0D TAB_INCLUDES =3D 'Includes'=0D TAB_INCLUDES_COMMON =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_COMMON=0D @@ -154,6 +157,7 @@ TAB_INCLUDES_X64 =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARC= H_X64 TAB_INCLUDES_ARM =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_INCLUDES_EBC =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_INCLUDES_AARCH64 =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_INCLUDES_LOONGARCH64 =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_LOONGARCH= 64=0D =0D TAB_GUIDS =3D 'Guids'=0D TAB_GUIDS_COMMON =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_COMMON=0D @@ -162,6 +166,7 @@ TAB_GUIDS_X64 =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_X64 TAB_GUIDS_ARM =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_GUIDS_EBC =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_GUIDS_AARCH64 =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_GUIDS_LOONGARCH64 =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D =0D TAB_PROTOCOLS =3D 'Protocols'=0D TAB_PROTOCOLS_COMMON =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_COMMON=0D @@ -170,6 +175,7 @@ TAB_PROTOCOLS_X64 =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_A= RCH_X64 TAB_PROTOCOLS_ARM =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_PROTOCOLS_EBC =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_PROTOCOLS_AARCH64 =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_PROTOCOLS_LOONGARCH64 =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_LOONGAR= CH64=0D =0D TAB_PPIS =3D 'Ppis'=0D TAB_PPIS_COMMON =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_COMMON=0D @@ -178,6 +184,7 @@ TAB_PPIS_X64 =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_X64 TAB_PPIS_ARM =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_PPIS_EBC =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_PPIS_AARCH64 =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_PPIS_LOONGARCH64 =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D =0D TAB_LIBRARY_CLASSES =3D 'LibraryClasses'=0D TAB_LIBRARY_CLASSES_COMMON =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_= COMMON=0D @@ -186,6 +193,7 @@ TAB_LIBRARY_CLASSES_X64 =3D TAB_LIBRARY_CLASSES + TAB_S= PLIT + TAB_ARCH_X64 TAB_LIBRARY_CLASSES_ARM =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_ARM= =0D TAB_LIBRARY_CLASSES_EBC =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_EBC= =0D TAB_LIBRARY_CLASSES_AARCH64 =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH= _AARCH64=0D +TAB_LIBRARY_CLASSES_LOONGARCH64 =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_= ARCH_LOONGARCH64=0D =0D TAB_PACKAGES =3D 'Packages'=0D TAB_PACKAGES_COMMON =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_COMMON=0D @@ -194,6 +202,7 @@ TAB_PACKAGES_X64 =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARC= H_X64 TAB_PACKAGES_ARM =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_PACKAGES_EBC =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_PACKAGES_AARCH64 =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_PACKAGES_LOONGARCH64 =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_LOONGARCH= 64=0D =0D TAB_PCDS =3D 'Pcds'=0D TAB_PCDS_FIXED_AT_BUILD =3D 'FixedAtBuild'=0D @@ -221,6 +230,7 @@ TAB_PCDS_FIXED_AT_BUILD_X64 =3D TAB_PCDS + TAB_PCDS_FIX= ED_AT_BUILD + TAB_SPLIT + T TAB_PCDS_FIXED_AT_BUILD_ARM =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_S= PLIT + TAB_ARCH_ARM=0D TAB_PCDS_FIXED_AT_BUILD_EBC =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + TAB_S= PLIT + TAB_ARCH_EBC=0D TAB_PCDS_FIXED_AT_BUILD_AARCH64 =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + T= AB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_PCDS_FIXED_AT_BUILD_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD= + TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D =0D TAB_PCDS_PATCHABLE_IN_MODULE_NULL =3D TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MOD= ULE=0D TAB_PCDS_PATCHABLE_IN_MODULE_COMMON =3D TAB_PCDS + TAB_PCDS_PATCHABLE_IN_M= ODULE + TAB_SPLIT + TAB_ARCH_COMMON=0D @@ -229,6 +239,7 @@ TAB_PCDS_PATCHABLE_IN_MODULE_X64 =3D TAB_PCDS + TAB_PCD= S_PATCHABLE_IN_MODULE + TAB TAB_PCDS_PATCHABLE_IN_MODULE_ARM =3D TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODU= LE + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_PCDS_PATCHABLE_IN_MODULE_EBC =3D TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODU= LE + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_PCDS_PATCHABLE_IN_MODULE_AARCH64 =3D TAB_PCDS + TAB_PCDS_PATCHABLE_IN_= MODULE + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_PCDS_PATCHABLE_IN_MODULE_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_PATCHABLE= _IN_MODULE + TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D =0D TAB_PCDS_FEATURE_FLAG_NULL =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG=0D TAB_PCDS_FEATURE_FLAG_COMMON =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SP= LIT + TAB_ARCH_COMMON=0D @@ -237,6 +248,7 @@ TAB_PCDS_FEATURE_FLAG_X64 =3D TAB_PCDS + TAB_PCDS_FEATU= RE_FLAG + TAB_SPLIT + TAB_A TAB_PCDS_FEATURE_FLAG_ARM =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT= + TAB_ARCH_ARM=0D TAB_PCDS_FEATURE_FLAG_EBC =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT= + TAB_ARCH_EBC=0D TAB_PCDS_FEATURE_FLAG_AARCH64 =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_S= PLIT + TAB_ARCH_AARCH64=0D +TAB_PCDS_FEATURE_FLAG_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG + T= AB_SPLIT + TAB_ARCH_LOONGARCH64=0D =0D TAB_PCDS_DYNAMIC_EX_NULL =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX=0D TAB_PCDS_DYNAMIC_EX_DEFAULT_NULL =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX_DEFAUL= T=0D @@ -248,6 +260,7 @@ TAB_PCDS_DYNAMIC_EX_X64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC= _EX + TAB_SPLIT + TAB_ARCH_ TAB_PCDS_DYNAMIC_EX_ARM =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + T= AB_ARCH_ARM=0D TAB_PCDS_DYNAMIC_EX_EBC =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + T= AB_ARCH_EBC=0D TAB_PCDS_DYNAMIC_EX_AARCH64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT= + TAB_ARCH_AARCH64=0D +TAB_PCDS_DYNAMIC_EX_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_S= PLIT + TAB_ARCH_LOONGARCH64=0D =0D TAB_PCDS_DYNAMIC_NULL =3D TAB_PCDS + TAB_PCDS_DYNAMIC=0D TAB_PCDS_DYNAMIC_DEFAULT_NULL =3D TAB_PCDS + TAB_PCDS_DYNAMIC_DEFAULT=0D @@ -259,6 +272,7 @@ TAB_PCDS_DYNAMIC_X64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC + = TAB_SPLIT + TAB_ARCH_X64 TAB_PCDS_DYNAMIC_ARM =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARC= H_ARM=0D TAB_PCDS_DYNAMIC_EBC =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARC= H_EBC=0D TAB_PCDS_DYNAMIC_AARCH64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB= _ARCH_AARCH64=0D +TAB_PCDS_DYNAMIC_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT += TAB_ARCH_LOONGARCH64=0D =0D TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE =3D 'PcdLoadFixAddressPe= iCodePageNumber'=0D TAB_PCDS_PATCHABLE_LOAD_FIX_ADDRESS_PEI_PAGE_SIZE_DATA_TYPE =3D 'UINT32'=0D @@ -285,6 +299,7 @@ TAB_DEPEX_X64 =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_X64 TAB_DEPEX_ARM =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_DEPEX_EBC =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_DEPEX_AARCH64 =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_DEPEX_LOONGARCH64 =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D =0D TAB_SKUIDS =3D 'SkuIds'=0D TAB_DEFAULT_STORES =3D 'DefaultStores'=0D @@ -297,6 +312,7 @@ TAB_LIBRARIES_X64 =3D TAB_LIBRARIES + TAB_SPLIT + TAB_A= RCH_X64 TAB_LIBRARIES_ARM =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_LIBRARIES_EBC =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_LIBRARIES_AARCH64 =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_LIBRARIES_LOONGARCH64 =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_LOONGAR= CH64=0D =0D TAB_COMPONENTS =3D 'Components'=0D TAB_COMPONENTS_COMMON =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_COMMON=0D @@ -305,6 +321,7 @@ TAB_COMPONENTS_X64 =3D TAB_COMPONENTS + TAB_SPLIT + TAB= _ARCH_X64 TAB_COMPONENTS_ARM =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_ARM=0D TAB_COMPONENTS_EBC =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_EBC=0D TAB_COMPONENTS_AARCH64 =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_AARCH64=0D +TAB_COMPONENTS_LOONGARCH64 =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_LOONG= ARCH64=0D =0D TAB_BUILD_OPTIONS =3D 'BuildOptions'=0D =0D diff --git a/BaseTools/Source/Python/UPT/Library/DataType.py b/BaseTools/So= urce/Python/UPT/Library/DataType.py index 2033149aa6..0e47f35670 100644 --- a/BaseTools/Source/Python/UPT/Library/DataType.py +++ b/BaseTools/Source/Python/UPT/Library/DataType.py @@ -2,6 +2,7 @@ # This file is used to define class for data type structure=0D #=0D # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
=0D +# Portions Copyright (c) 2022, Loongson Technology Corporation Limited. Al= l rights reserved.=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D @@ -367,10 +368,11 @@ TAB_ARCH_IA32 =3D 'IA32' TAB_ARCH_X64 =3D 'X64'=0D TAB_ARCH_IPF =3D 'IPF'=0D TAB_ARCH_ARM =3D 'ARM'=0D +TAB_ARCH_LOONGARCH64 =3D 'LOONGARCH64'=0D TAB_ARCH_EBC =3D 'EBC'=0D =0D ARCH_LIST =3D \=0D -[TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_IPF, TAB_ARCH_ARM, TAB_ARCH_EBC]=0D +[TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_IPF, TAB_ARCH_ARM, TAB_ARCH_LOONGAR= CH64, TAB_ARCH_EBC]=0D =0D SUP_MODULE_BASE =3D 'BASE'=0D SUP_MODULE_SEC =3D 'SEC'=0D @@ -454,6 +456,7 @@ TAB_SOURCES_IA32 =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH= _IA32 TAB_SOURCES_X64 =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_X64=0D TAB_SOURCES_IPF =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_SOURCES_ARM =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_SOURCES_LOONGARCH64 =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_LOONGARCH64= =0D TAB_SOURCES_EBC =3D TAB_SOURCES + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_BINARIES =3D 'Binaries'=0D @@ -462,6 +465,7 @@ TAB_BINARIES_IA32 =3D TAB_BINARIES + TAB_SPLIT + TAB_AR= CH_IA32 TAB_BINARIES_X64 =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_X64=0D TAB_BINARIES_IPF =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_BINARIES_ARM =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_BINARIES_LOONGARCH64 =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_LOONGARCH= 64=0D TAB_BINARIES_EBC =3D TAB_BINARIES + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_INCLUDES =3D 'Includes'=0D @@ -470,6 +474,7 @@ TAB_INCLUDES_IA32 =3D TAB_INCLUDES + TAB_SPLIT + TAB_AR= CH_IA32 TAB_INCLUDES_X64 =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_X64=0D TAB_INCLUDES_IPF =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_INCLUDES_ARM =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_INCLUDES_LOONGARCH64 =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_LOONGARCH= 64=0D TAB_INCLUDES_EBC =3D TAB_INCLUDES + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_GUIDS =3D 'Guids'=0D @@ -478,6 +483,7 @@ TAB_GUIDS_IA32 =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_IA32 TAB_GUIDS_X64 =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_X64=0D TAB_GUIDS_IPF =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_GUIDS_ARM =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_GUIDS_LOONGARCH64 =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D TAB_GUIDS_EBC =3D TAB_GUIDS + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_PROTOCOLS =3D 'Protocols'=0D @@ -486,6 +492,7 @@ TAB_PROTOCOLS_IA32 =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_= ARCH_IA32 TAB_PROTOCOLS_X64 =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_X64=0D TAB_PROTOCOLS_IPF =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_PROTOCOLS_ARM =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_PROTOCOLS_LOONGARCH64 =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_LOONGAR= CH64=0D TAB_PROTOCOLS_EBC =3D TAB_PROTOCOLS + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_PPIS =3D 'Ppis'=0D @@ -494,6 +501,7 @@ TAB_PPIS_IA32 =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_IA32 TAB_PPIS_X64 =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_X64=0D TAB_PPIS_IPF =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_PPIS_ARM =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_PPIS_LOONGARCH64 =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D TAB_PPIS_EBC =3D TAB_PPIS + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_LIBRARY_CLASSES =3D 'LibraryClasses'=0D @@ -502,6 +510,7 @@ TAB_LIBRARY_CLASSES_IA32 =3D TAB_LIBRARY_CLASSES + TAB_= SPLIT + TAB_ARCH_IA32 TAB_LIBRARY_CLASSES_X64 =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_X64= =0D TAB_LIBRARY_CLASSES_IPF =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_IPF= =0D TAB_LIBRARY_CLASSES_ARM =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_ARM= =0D +TAB_LIBRARY_CLASSES_LOONGARCH64 =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_= ARCH_LOONGARCH64=0D TAB_LIBRARY_CLASSES_EBC =3D TAB_LIBRARY_CLASSES + TAB_SPLIT + TAB_ARCH_EBC= =0D =0D TAB_PACKAGES =3D 'Packages'=0D @@ -510,6 +519,7 @@ TAB_PACKAGES_IA32 =3D TAB_PACKAGES + TAB_SPLIT + TAB_AR= CH_IA32 TAB_PACKAGES_X64 =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_X64=0D TAB_PACKAGES_IPF =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_PACKAGES_ARM =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_PACKAGES_LOONGARCH64 =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_LOONGARCH= 64=0D TAB_PACKAGES_EBC =3D TAB_PACKAGES + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_PCDS =3D 'Pcds'=0D @@ -548,6 +558,8 @@ TAB_PCDS_FIXED_AT_BUILD_IPF =3D TAB_PCDS + TAB_PCDS_FIX= ED_AT_BUILD + \ TAB_SPLIT + TAB_ARCH_IPF=0D TAB_PCDS_FIXED_AT_BUILD_ARM =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + \=0D TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_PCDS_FIXED_AT_BUILD_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD= + \=0D +TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D TAB_PCDS_FIXED_AT_BUILD_EBC =3D TAB_PCDS + TAB_PCDS_FIXED_AT_BUILD + \=0D TAB_SPLIT + TAB_ARCH_EBC=0D =0D @@ -562,6 +574,8 @@ TAB_PCDS_PATCHABLE_IN_MODULE_IPF =3D TAB_PCDS + TAB_PCD= S_PATCHABLE_IN_MODULE + \ TAB_SPLIT + TAB_ARCH_IPF=0D TAB_PCDS_PATCHABLE_IN_MODULE_ARM =3D TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODU= LE + \=0D TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_PCDS_PATCHABLE_IN_MODULE_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_PATCHABLE= _IN_MODULE + \=0D +TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D TAB_PCDS_PATCHABLE_IN_MODULE_EBC =3D TAB_PCDS + TAB_PCDS_PATCHABLE_IN_MODU= LE + \=0D TAB_SPLIT + TAB_ARCH_EBC=0D =0D @@ -576,6 +590,8 @@ TAB_PCDS_FEATURE_FLAG_IPF =3D TAB_PCDS + TAB_PCDS_FEATU= RE_FLAG + TAB_SPLIT + \ TAB_ARCH_IPF=0D TAB_PCDS_FEATURE_FLAG_ARM =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT= + \=0D TAB_ARCH_ARM=0D +TAB_PCDS_FEATURE_FLAG_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG + T= AB_SPLIT + \=0D +TAB_ARCH_LOONGARCH64=0D TAB_PCDS_FEATURE_FLAG_EBC =3D TAB_PCDS + TAB_PCDS_FEATURE_FLAG + TAB_SPLIT= + \=0D TAB_ARCH_EBC=0D =0D @@ -593,6 +609,8 @@ TAB_PCDS_DYNAMIC_EX_IPF =3D TAB_PCDS + TAB_PCDS_DYNAMIC= _EX + TAB_SPLIT + \ TAB_ARCH_IPF=0D TAB_PCDS_DYNAMIC_EX_ARM =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + \= =0D TAB_ARCH_ARM=0D +TAB_PCDS_DYNAMIC_EX_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_S= PLIT + \=0D +TAB_ARCH_LOONGARCH64=0D TAB_PCDS_DYNAMIC_EX_EBC =3D TAB_PCDS + TAB_PCDS_DYNAMIC_EX + TAB_SPLIT + \= =0D TAB_ARCH_EBC=0D =0D @@ -606,6 +624,7 @@ TAB_PCDS_DYNAMIC_IA32 =3D TAB_PCDS + TAB_PCDS_DYNAMIC += TAB_SPLIT + TAB_ARCH_IA32 TAB_PCDS_DYNAMIC_X64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARC= H_X64=0D TAB_PCDS_DYNAMIC_IPF =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARC= H_IPF=0D TAB_PCDS_DYNAMIC_ARM =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARC= H_ARM=0D +TAB_PCDS_DYNAMIC_LOONGARCH64 =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT += TAB_ARCH_LOONGARCH64=0D TAB_PCDS_DYNAMIC_EBC =3D TAB_PCDS + TAB_PCDS_DYNAMIC + TAB_SPLIT + TAB_ARC= H_EBC=0D =0D TAB_PCD_DYNAMIC_TYPE_LIST =3D [TAB_PCDS_DYNAMIC_DEFAULT_NULL, \=0D @@ -646,6 +665,7 @@ TAB_DEPEX_IA32 =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_IA32 TAB_DEPEX_X64 =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_X64=0D TAB_DEPEX_IPF =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_DEPEX_ARM =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_DEPEX_LOONGARCH64 =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_LOONGARCH64=0D TAB_DEPEX_EBC =3D TAB_DEPEX + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_SKUIDS =3D 'SkuIds'=0D @@ -656,6 +676,7 @@ TAB_LIBRARIES_IA32 =3D TAB_LIBRARIES + TAB_SPLIT + TAB_= ARCH_IA32 TAB_LIBRARIES_X64 =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_X64=0D TAB_LIBRARIES_IPF =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_LIBRARIES_ARM =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_LIBRARIES_LOONGARCH64 =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_LOONGAR= CH64=0D TAB_LIBRARIES_EBC =3D TAB_LIBRARIES + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_COMPONENTS =3D 'Components'=0D @@ -664,6 +685,7 @@ TAB_COMPONENTS_IA32 =3D TAB_COMPONENTS + TAB_SPLIT + TA= B_ARCH_IA32 TAB_COMPONENTS_X64 =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_X64=0D TAB_COMPONENTS_IPF =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_IPF=0D TAB_COMPONENTS_ARM =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_ARM=0D +TAB_COMPONENTS_LOONGARCH64 =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_LOONG= ARCH64=0D TAB_COMPONENTS_EBC =3D TAB_COMPONENTS + TAB_SPLIT + TAB_ARCH_EBC=0D =0D TAB_BUILD_OPTIONS =3D 'BuildOptions'=0D diff --git a/BaseTools/Source/Python/build/buildoptions.py b/BaseTools/Sour= ce/Python/build/buildoptions.py index 39d92cff20..8334604b46 100644 --- a/BaseTools/Source/Python/build/buildoptions.py +++ b/BaseTools/Source/Python/build/buildoptions.py @@ -4,6 +4,7 @@ # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
=0D # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
= =0D # Copyright (c) 2018 - 2020, Hewlett Packard Enterprise Development, L.P.=
=0D +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights= reserved.
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -41,7 +42,7 @@ class MyOptionParser(): def GetOption(self):=0D Parser =3D OptionParser(description=3D__copyright__, version=3D__v= ersion__, prog=3D"build.exe", usage=3D"%prog [options] [all|fds|genc|genmak= e|clean|cleanall|cleanlib|modules|libraries|run]")=0D Parser.add_option("-a", "--arch", action=3D"append", dest=3D"Targe= tArch",=0D - help=3D"ARCHS is one of list: IA32, X64, ARM, AARCH64, RISCV64= or EBC, which overrides target.txt's TARGET_ARCH definition. To specify mo= re archs, please repeat this option.")=0D + help=3D"ARCHS is one of list: IA32, X64, ARM, AARCH64, RISCV64= , LOONGARCH64 or EBC, which overrides target.txt's TARGET_ARCH definition. = To specify more archs, please repeat this option.")=0D Parser.add_option("-p", "--platform", action=3D"callback", type=3D= "string", dest=3D"PlatformFile", callback=3DSingleCheckCallback,=0D help=3D"Build the platform specified by the DSC file name argu= ment, overriding target.txt's ACTIVE_PLATFORM definition.")=0D Parser.add_option("-m", "--module", action=3D"callback", type=3D"s= tring", dest=3D"ModuleFile", callback=3DSingleCheckCallback,=0D --=20 2.27.0