From nobody Mon Nov 25 08:53:54 2024 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+73820+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+73820+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1617863577; cv=none; d=zohomail.com; s=zohoarc; b=RaxIn7sOom3LB8FnWPr8k6LSRHil5Um1mGQXLqjX23Xgu1MGC/3OzsTIgm+/Q5ZJcZ3kWZyr9ikdy45qqmvrQoZLKiJSfaEfiJq2LNbPmvwDkNfnkyMXk/4uvhatJ2UoXPlm7Cwv56hbgpeTUvDWRNyOIFES2Z3jEkfgnG7/PaM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617863577; 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=2+4FjOxEwqeVhXfbx4VS9nY1VqBlYINB5fMmF51Ldw0=; b=JLh++jxOAKo7NdjjaRjKFwrvsBLtVXZ9pi8ajYGH0NTustTm+Guhbm6FmMGX80pwVFzhFKp++XlFVQOzhRgsx6KzPpJeDs2E7OGOACIEfn3+JOHIleP6pyf57yOQnc057QWdD/j1VR2W9Z8kahmJ86+H0/+e0kF5+t0dwHbuGPg= 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+73820+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 1617863577480240.6424291932267; Wed, 7 Apr 2021 23:32:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 9dU0YY1788612xQoRalzdmwQ; Wed, 07 Apr 2021 23:32:57 -0700 X-Received: from mga06.intel.com (mga06.intel.com []) by mx.groups.io with SMTP id smtpd.web11.4376.1617863574613824727 for ; Wed, 07 Apr 2021 23:32:55 -0700 IronPort-SDR: stjIQQTOJ/7eoKcDc8zbtTEVq0H3lW/mMIIaA/WKDGwtezB2t+BnpSyKta68t0xzSIbM6GVnoj I2tszQ5mnrQg== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="254810024" X-IronPort-AV: E=Sophos;i="5.82,205,1613462400"; d="scan'208";a="254810024" X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 23:32:53 -0700 IronPort-SDR: nrhDvnP/uT+dCP+HTwG0yx3l7djj8iH3NjQ2WYpZme0Whr2yUnBNw6//HusU21mKrMRbqzqG3C P1i9/e/YTDmw== X-IronPort-AV: E=Sophos;i="5.82,205,1613462400"; d="scan'208";a="530488475" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.252.133.10]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 23:32:49 -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 3/3] BaseTools/Source: Remove CPU architecture assumptions Date: Wed, 7 Apr 2021 23:32:40 -0700 Message-Id: <20210408063240.877-4-michael.d.kinney@intel.com> In-Reply-To: <20210408063240.877-1-michael.d.kinney@intel.com> References: <20210408063240.877-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: NEZCGIvahJaVtHWGMHpzydRpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1617863577; bh=pCVS7yyb3v7CfYqxnhrpZHRof5GMXNLpFHHSAWcdjD0=; h=Cc:Date:From:Reply-To:Subject:To; b=sWRWO4jI/p54yI50JB0WzLSkILShNKtx/Rc39tvVrN7r9x6E82NaG8LlZyBa0xJXOZa ITOxDUsPPzD0yWM3DKWM0l+0hBz8djZ3ip49XZRK4QClEumOtkeVOmaVmfqMpCJv7dKwr aO8cju8UXmzIXuRD5mBxqGOmCo2wUk+2HK0= 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 * GenFw Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Andrew Fish Cc: Abner Chang Signed-off-by: Michael D Kinney Acked-by: Abner Chang --- BaseTools/Source/C/GenFw/Elf32Convert.c | 5 ++--- BaseTools/Source/C/GenFw/Elf64Convert.c | 5 ++--- BaseTools/Source/Python/GenFds/FdfParser.py | 4 +--- BaseTools/Source/Python/TargetTool/TargetTool.py | 4 ++-- BaseTools/Source/Python/build/buildoptions.py | 4 ++-- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/G= enFw/Elf32Convert.c index 7f351287a93c..2485b2cb7ad9 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -1,7 +1,7 @@ /** @file Elf32 Convert solution =20 -Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2013, ARM Ltd. All rights reserved.
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. Al= l rights reserved.
=20 @@ -143,8 +143,7 @@ InitializeElf32 ( return FALSE; } if (!((mEhdr->e_machine =3D=3D EM_386) || (mEhdr->e_machine =3D=3D EM_AR= M) || (mEhdr->e_machine =3D=3D EM_RISCV))) { - Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 machi= ne."); - return FALSE; + Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 mac= hine."); } if (mEhdr->e_version !=3D EV_CURRENT) { Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURREN= T (%d)", (unsigned) mEhdr->e_version, EV_CURRENT); diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/G= enFw/Elf64Convert.c index 4ed6b4477ea9..d097db863243 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -1,7 +1,7 @@ /** @file Elf64 convert solution =20 -Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. Al= l rights reserved.
=20 @@ -162,8 +162,7 @@ InitializeElf64 ( return FALSE; } if (!((mEhdr->e_machine =3D=3D EM_X86_64) || (mEhdr->e_machine =3D=3D EM= _AARCH64) || (mEhdr->e_machine =3D=3D EM_RISCV64))) { - Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 machi= ne."); - return FALSE; + Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 mac= hine."); } if (mEhdr->e_version !=3D EV_CURRENT) { Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURREN= T (%d)", (unsigned) mEhdr->e_version, EV_CURRENT); 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 (#73820): https://edk2.groups.io/g/devel/message/73820 Mute This Topic: https://groups.io/mt/81936017/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-