From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web12.1833.1587436781853902770 for ; Mon, 20 Apr 2020 19:39:41 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0380a9ba4c=abner.chang@hpe.com) Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03L2dfdE011810; Tue, 21 Apr 2020 02:39:41 GMT Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0a-002e3701.pphosted.com with ESMTP id 30g782e378-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Apr 2020 02:39:40 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id 616B161; Tue, 21 Apr 2020 02:38:35 +0000 (UTC) Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id BC45C4D; Tue, 21 Apr 2020 02:38:33 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Gilbert Chen , Daniel Helmut Schaefer , Leif Lindholm , Bob Feng , Liming Gao Subject: [PATCH v3 1/3] BaseTools: BaseTools changes for RISC-V platform. Date: Tue, 21 Apr 2020 10:00:15 +0800 Message-Id: <20200421020017.16072-2-abner.chang@hpe.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200421020017.16072-1-abner.chang@hpe.com> References: <20200421020017.16072-1-abner.chang@hpe.com> MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-20_09:2020-04-20,2020-04-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=1 malwarescore=0 priorityscore=1501 impostorscore=0 phishscore=0 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004210019 Content-Transfer-Encoding: quoted-printable Python code changes for building EDK2 RISC-V platform. Signed-off-by: Abner Chang Co-authored-by: Gilbert Chen Co-authored-by: Daniel Helmut Schaefer Reviewed-by: Leif Lindholm Cc: Bob Feng Cc: Liming Gao Cc: Leif Lindholm Cc: Gilbert Chen --- BaseTools/Source/Python/Common/DataType.py | 5 ++++- BaseTools/Source/Python/build/buildoptions.py | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/= Python/Common/DataType.py index 8d80b41089..fb88f20cc4 100644 --- a/BaseTools/Source/Python/Common/DataType.py +++ b/BaseTools/Source/Python/Common/DataType.py @@ -3,6 +3,7 @@ #=0D # 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 # SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D ##=0D @@ -52,7 +53,9 @@ TAB_ARCH_ARM =3D 'ARM' TAB_ARCH_EBC =3D 'EBC'=0D TAB_ARCH_AARCH64 =3D 'AARCH64'=0D =0D -ARCH_SET_FULL =3D {TAB_ARCH_IA32, TAB_ARCH_X64, TAB_ARCH_ARM, TAB_ARCH_EBC= , TAB_ARCH_AARCH64, TAB_ARCH_COMMON}=0D +TAB_ARCH_RISCV64 =3D 'RISCV64'=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 =0D SUP_MODULE_BASE =3D 'BASE'=0D SUP_MODULE_SEC =3D 'SEC'=0D diff --git a/BaseTools/Source/Python/build/buildoptions.py b/BaseTools/Sour= ce/Python/build/buildoptions.py index 61ab2db9a4..094af4e2a8 100644 --- a/BaseTools/Source/Python/build/buildoptions.py +++ b/BaseTools/Source/Python/build/buildoptions.py @@ -3,7 +3,7 @@ #=0D # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
=0D # Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
= =0D -# Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.
=0D +# Copyright (c) 2018 - 2020, Hewlett Packard Enterprise Development, L.P.=
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -40,8 +40,8 @@ class MyOptionParser(): =0D 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", type=3D"choic= e", choices=3D['IA32', 'X64', 'EBC', 'ARM', 'AARCH64'], dest=3D"TargetArch"= ,=0D - help=3D"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.")=0D + Parser.add_option("-a", "--arch", action=3D"append", type=3D"choic= e", choices=3D['IA32', 'X64', 'EBC', 'ARM', 'AARCH64', 'RISCV64'], dest=3D"= TargetArch",=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 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.25.0