Skip to content

Commit

Permalink
BaseTools: BaseTools changes for RISC-V platform.
Browse files Browse the repository at this point in the history
Python code changes for building EDK2 RISC-V platform.

Signed-off-by: Abner Chang <[email protected]>
Co-authored-by: Gilbert Chen <[email protected]>
Co-authored-by: Daniel Helmut Schaefer <[email protected]>
Reviewed-by: Leif Lindholm <[email protected]>
Reviewed-by: Bob Feng <[email protected]>

Cc: Bob Feng <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Leif Lindholm <[email protected]>
Cc: Gilbert Chen <[email protected]>
  • Loading branch information
Abner Chang authored and mergify[bot] committed Apr 29, 2020
1 parent 178938b commit f60d5ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion BaseTools/Source/Python/Common/DataType.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
# Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent

##
Expand Down Expand Up @@ -52,7 +53,9 @@
TAB_ARCH_EBC = 'EBC'
TAB_ARCH_AARCH64 = 'AARCH64'

ARCH_SET_FULL = {TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_ARM, TAB_ARCH_EBC, TAB_ARCH_AARCH64, TAB_ARCH_COMMON}
TAB_ARCH_RISCV64 = 'RISCV64'

ARCH_SET_FULL = {TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_ARM, TAB_ARCH_EBC, TAB_ARCH_AARCH64, TAB_ARCH_RISCV64, TAB_ARCH_COMMON}

SUP_MODULE_BASE = 'BASE'
SUP_MODULE_SEC = 'SEC'
Expand Down
6 changes: 3 additions & 3 deletions BaseTools/Source/Python/build/buildoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>
# Copyright (c) 2018 - 2020, Hewlett Packard Enterprise Development, L.P.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
Expand Down Expand Up @@ -40,8 +40,8 @@ def __init__(self):

def GetOption(self):
Parser = OptionParser(description=__copyright__, version=__version__, prog="build.exe", usage="%prog [options] [all|fds|genc|genmake|clean|cleanall|cleanlib|modules|libraries|run]")
Parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32', 'X64', 'EBC', 'ARM', 'AARCH64'], dest="TargetArch",
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.")
Parser.add_option("-a", "--arch", action="append", type="choice", choices=['IA32', 'X64', 'EBC', 'ARM', 'AARCH64', 'RISCV64'], dest="TargetArch",
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.")
Parser.add_option("-p", "--platform", action="callback", type="string", dest="PlatformFile", callback=SingleCheckCallback,
help="Build the platform specified by the DSC file name argument, overriding target.txt's ACTIVE_PLATFORM definition.")
Parser.add_option("-m", "--module", action="callback", type="string", dest="ModuleFile", callback=SingleCheckCallback,
Expand Down

0 comments on commit f60d5ca

Please sign in to comment.