]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Basetools/GenFw: Allow AARCH64 builds to use the --prm flag
authorJose Marinho <jose.marinho@arm.com>
Fri, 29 Oct 2021 16:48:26 +0000 (17:48 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 Aug 2022 22:43:51 +0000 (22:43 +0000)
The GenFw invocation with the --prm flag was previously reserved for
X64.
AArch64 platforms, built with GCC5, can also deploy PRM modules, hence
the --prm flag is also applicable in builds targeting the AARCH64
architecture.

This commit enables the --prm flag to be used for EDK2 builds targeting
AARCH64.

Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
BaseTools/Source/C/GenFw/Elf64Convert.c

index 2aa9bfcc9460c0a68208808e036fc631ae14f90e..35e96dd05bc26f7212d0f80af1ecb998bcb993dd 100644 (file)
@@ -2,7 +2,7 @@
 Elf64 convert solution\r
 \r
 Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR>\r
-Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>\r
+Portions copyright (c) 2013-2022, ARM Ltd. All rights reserved.<BR>\r
 Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
 \r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -186,8 +186,8 @@ InitializeElf64 (
   }\r
 \r
   if (mExportFlag) {\r
-    if (mEhdr->e_machine != EM_X86_64) {\r
-      Error (NULL, 0, 3000, "Unsupported", "--prm option currently only supports X64 arch.");\r
+    if ((mEhdr->e_machine != EM_X86_64) && (mEhdr->e_machine != EM_AARCH64)) {\r
+      Error (NULL, 0, 3000, "Unsupported", "--prm option currently only supports X64 and AArch64 archs.");\r
       return FALSE;\r
     }\r
   }\r