]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: BaseTools changes for RISC-V platform.
authorAbner Chang <abner.chang@hpe.com>
Thu, 23 Apr 2020 13:52:31 +0000 (21:52 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 29 Apr 2020 02:52:08 +0000 (02:52 +0000)
Python code changes for building EDK2 RISC-V platform.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Co-authored-by: Gilbert Chen <gilbert.chen@hpe.com>
Co-authored-by: Daniel Helmut Schaefer <daniel.schaefer@hpe.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Gilbert Chen <gilbert.chen@hpe.com>
BaseTools/Source/Python/Common/DataType.py
BaseTools/Source/Python/build/buildoptions.py

index 8d80b410892946c8b862e060b0bf5f630b409825..fb88f20cc4709a5362d205e100fa349639ff6de8 100644 (file)
@@ -3,6 +3,7 @@
 #\r
 # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>\r
+# Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 ##\r
@@ -52,7 +53,9 @@ TAB_ARCH_ARM = 'ARM'
 TAB_ARCH_EBC = 'EBC'\r
 TAB_ARCH_AARCH64 = 'AARCH64'\r
 \r
-ARCH_SET_FULL = {TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_ARM, TAB_ARCH_EBC, TAB_ARCH_AARCH64, TAB_ARCH_COMMON}\r
+TAB_ARCH_RISCV64 = 'RISCV64'\r
+\r
+ARCH_SET_FULL = {TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_ARM, TAB_ARCH_EBC, TAB_ARCH_AARCH64, TAB_ARCH_RISCV64, TAB_ARCH_COMMON}\r
 \r
 SUP_MODULE_BASE = 'BASE'\r
 SUP_MODULE_SEC = 'SEC'\r
index 61ab2db9a4c3f0038086db2476ab0de9f8b6d0d7..094af4e2a8dd5cf577e2b19d03e267cfd7b591c6 100644 (file)
@@ -3,7 +3,7 @@
 #\r
 #  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>\r
 #  Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>\r
-#  Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>\r
+#  Copyright (c) 2018 - 2020, Hewlett Packard Enterprise Development, L.P.<BR>\r
 #\r
 #  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
@@ -40,8 +40,8 @@ class MyOptionParser():
 \r
     def GetOption(self):\r
         Parser = OptionParser(description=__copyright__, version=__version__, prog="build.exe", usage="%prog [options] [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run]")\r
-        Parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32', 'X64', 'EBC', 'ARM', 'AARCH64'], dest="TargetArch",\r
-            help="ARCHS is one of list: IA32, X64, ARM, AARCH64 or EBC, which overrides target.txt's TARGET_ARCH definition. To specify more archs, please repeat this option.")\r
+        Parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32', 'X64', 'EBC', 'ARM', 'AARCH64', 'RISCV64'], dest="TargetArch",\r
+            help="ARCHS is one of list: IA32, X64, ARM, AARCH64, RISCV64 or EBC, which overrides target.txt's TARGET_ARCH definition. To specify more archs, please repeat this option.")\r
         Parser.add_option("-p", "--platform", action="callback", type="string", dest="PlatformFile", callback=SingleCheckCallback,\r
             help="Build the platform specified by the DSC file name argument, overriding target.txt's ACTIVE_PLATFORM definition.")\r
         Parser.add_option("-m", "--module", action="callback", type="string", dest="ModuleFile", callback=SingleCheckCallback,\r