From nobody Sat Feb 7 09:04: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+74085+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+74085+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1618370889; cv=none; d=zohomail.com; s=zohoarc; b=PlZWMbiRKXSz/ymIOHajTuE8ZEvdBFWF8M9O3FdCxlwr66YmEW1z6yaAnq3D06lw72Kfg9BtOMIS+LhqeKkDH+H+SBNvnB4K09WOCNXcNEGyA8oB7rcHRsXS4Kr/nwoLstPVmueW4yed6WVh4RN5kvqDwgs0IeUqR8UOhNPpHgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618370889; 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=jMN1QWzpuVIsVzEjdgs0QO33ceYSzUOKUTJwNaDeUgI=; b=aVO+6PsZmXbcS0ZGRG0HhyNA2cb6hSYBZOBsy6dJJuX6fAXGk2ENVjPptxK+fuklu7H+EjIASvqcfm9V+4QrvIAb14AJM2+cY1B08he1K/HTR+gTRccsuysfZiRcdtAb2XOsScjAqWr2VFLI5dajUVe8mlduGlWnWsB7PzWNplA= 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+74085+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 161837088990443.86884665365187; Tue, 13 Apr 2021 20:28:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id U0baYY1788612xQZQL8pycpu; Tue, 13 Apr 2021 20:28:09 -0700 X-Received: from mga02.intel.com (mga02.intel.com []) by mx.groups.io with SMTP id smtpd.web10.8064.1618370888171322791 for ; Tue, 13 Apr 2021 20:28:08 -0700 IronPort-SDR: dovu8CFP0GNZJgAMB/CT5BlLKomFeO5ef/k+t3NZiJ7ljSe3+NGhUmujmTcPPm2BOsv8wkhPcq 6dn/V6H8lAtw== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="181679512" X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="181679512" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 20:28:07 -0700 IronPort-SDR: e7f/y2nBhAsjlLiSofUBHPlicuP8MB/R/S1DTs1cyKw7GOPBHKZuhi9oPEvvGlIue1ukAM67vh EpQ10NpMnOdg== X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="418124859" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.255.231.15]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 20:28:07 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen , Andrew Fish , Abner Chang Subject: [edk2-devel] [Patch v2 4/4] BaseTools/Source/Python: Remove CPU architecture assumptions Date: Tue, 13 Apr 2021 20:27:58 -0700 Message-Id: <20210414032758.1818-5-michael.d.kinney@intel.com> In-Reply-To: <20210414032758.1818-1-michael.d.kinney@intel.com> References: <20210414032758.1818-1-michael.d.kinney@intel.com> MIME-Version: 1.0 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,michael.d.kinney@intel.com X-Gm-Message-State: w8NOLZjq9ktevQ90JIKtSMzIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1618370889; bh=RtlmrfBkfNpWgtO5/XuTizIWYmjTANiEQocoqfr1Qpk=; h=Cc:Date:From:Reply-To:Subject:To; b=mTjSJsYDrY2a5GzL3uFJS82N+ztmClJu6GAeRCXnrZUDzgULvF/hiXBgFaNKLMjzWK2 1/LHPvRHRNjL853omIt1M85GjmxGQzm+ujZSaXYUxp58WxmAoZLTDFfj2SCO4qKtHGZyC F0p5ExyMA648KTBlQElzY173SDAirYCHMoQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3308 The EDK II Build Specifications do not restrict the set of CPU architectures that can be supported. Remove places in the EDK II that assume a fixed set of CPU architectures. Remove build breaks in the following tools when a check against a fixed set of CPU architectures is made. * Build * GenFds * TargetTool Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Andrew Fish Cc: Abner Chang Signed-off-by: Michael D Kinney Reviewed-by: Bob Feng --- BaseTools/Source/Python/GenFds/FdfParser.py | 4 +--- BaseTools/Source/Python/TargetTool/TargetTool.py | 4 ++-- BaseTools/Source/Python/build/buildoptions.py | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index ea2401b0e4fc..5c8263f9bcc9 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1,7 +1,7 @@ ## @file # parse FDF file # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2015, Hewlett Packard Enterprise Development, L.P.
# # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -3504,8 +3504,6 @@ class FdfParser: raise Warning.Expected("'.'", self.FileName, self.CurrentLineN= umber) =20 Arch =3D self._SkippedChars.rstrip(TAB_SPLIT) - if Arch.upper() not in ARCH_SET_FULL: - raise Warning("Unknown Arch '%s'" % Arch, self.FileName, self.= CurrentLineNumber) =20 ModuleType =3D self._GetModuleType() =20 diff --git a/BaseTools/Source/Python/TargetTool/TargetTool.py b/BaseTools/S= ource/Python/TargetTool/TargetTool.py index 8e0ca387c356..71222e3cc899 100644 --- a/BaseTools/Source/Python/TargetTool/TargetTool.py +++ b/BaseTools/Source/Python/TargetTool/TargetTool.py @@ -1,7 +1,7 @@ ## @file # Target Tool Parser # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -197,7 +197,7 @@ def RangeCheckCallback(option, opt_str, value, parser): =20 def MyOptionParser(): parser =3D OptionParser(version=3D__version__, prog=3D"TargetTool.exe"= , usage=3D__usage__, description=3D__copyright__) - parser.add_option("-a", "--arch", action=3D"append", type=3D"choice", = choices=3D['IA32', 'X64', 'EBC', 'ARM', 'AARCH64', '0'], dest=3D"TARGET_ARC= H", + parser.add_option("-a", "--arch", action=3D"append", dest=3D"TARGET_AR= CH", help=3D"ARCHS is one of list: IA32, X64, ARM, AARCH64 or EBC, whic= h replaces target.txt's TARGET_ARCH definition. To specify more archs, plea= se repeat this option. 0 will clear this setting in target.txt and can't co= mbine with other value.") parser.add_option("-p", "--platform", action=3D"callback", type=3D"str= ing", dest=3D"DSCFILE", callback=3DSingleCheckCallback, help=3D"Specify a DSC file, which replace target.txt's ACTIVE_PLAT= FORM definition. 0 will clear this setting in target.txt and can't combine = with other value.") diff --git a/BaseTools/Source/Python/build/buildoptions.py b/BaseTools/Sour= ce/Python/build/buildoptions.py index 094af4e2a8dd..39d92cff209d 100644 --- a/BaseTools/Source/Python/build/buildoptions.py +++ b/BaseTools/Source/Python/build/buildoptions.py @@ -2,7 +2,7 @@ # build a platform or a module # # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# Copyright (c) 2018 - 2020, Hewlett Packard Enterprise Development, L.P.=
# # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -40,7 +40,7 @@ class MyOptionParser(): =20 def GetOption(self): 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]") - Parser.add_option("-a", "--arch", action=3D"append", type=3D"choic= e", choices=3D['IA32', 'X64', 'EBC', 'ARM', 'AARCH64', 'RISCV64'], dest=3D"= TargetArch", + Parser.add_option("-a", "--arch", action=3D"append", dest=3D"Targe= tArch", 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.") Parser.add_option("-p", "--platform", action=3D"callback", type=3D= "string", dest=3D"PlatformFile", callback=3DSingleCheckCallback, help=3D"Build the platform specified by the DSC file name argu= ment, overriding target.txt's ACTIVE_PLATFORM definition.") --=20 2.31.1.windows.1 -=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 (#74085): https://edk2.groups.io/g/devel/message/74085 Mute This Topic: https://groups.io/mt/82083400/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-