summaryrefslogtreecommitdiff
path: root/payloads/external/edk2/tools_def.txt
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2024-09-13 16:33:01 +0100
committerMaximilian Brune <maximilian.brune@9elements.com>2024-10-08 11:17:08 +0000
commit9c15a9b7ae2efa35063c5d4c83124381b657e298 (patch)
treefc4feb06d49284e45fefe34e368a9a91ab6820fd /payloads/external/edk2/tools_def.txt
parent5610ca3aaa1c8dc480801e6c3f5125780b641fb3 (diff)
payloads/edk2: Fix image alignment
Currently, building edk2 with coreboot will show multiple error prints: !!!!!!!! Image Section Alignment(0x40) does not match Required Alignment (0x1000) !!!!!!!! Adjust the definations so these are aligned to 0x1000. Change-Id: I881bfd1eec55454e444909b845a342a94ba8904b Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84353 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Diffstat (limited to 'payloads/external/edk2/tools_def.txt')
-rw-r--r--payloads/external/edk2/tools_def.txt20
1 files changed, 10 insertions, 10 deletions
diff --git a/payloads/external/edk2/tools_def.txt b/payloads/external/edk2/tools_def.txt
index b9a67ebec9..69b7933a66 100644
--- a/payloads/external/edk2/tools_def.txt
+++ b/payloads/external/edk2/tools_def.txt
@@ -73,13 +73,13 @@ DEFINE COREBOOT_ARM64_OBJCOPY = ENV(OBJCOPY_arm64)
*_COREBOOT_IA32_NASM_FLAGS = -f elf32
DEBUG_COREBOOT_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os
- DEBUG_COREBOOT_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
+ DEBUG_COREBOOT_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386 -z common-page-size=0x1000
RELEASE_COREBOOT_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os -Wno-unused-but-set-variable
-RELEASE_COREBOOT_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
+RELEASE_COREBOOT_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386 -z common-page-size=0x1000
NOOPT_COREBOOT_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -O0
- NOOPT_COREBOOT_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 -O0
+ NOOPT_COREBOOT_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 -O0 -z common-page-size=0x1000
##################
# COREBOOT X64 definitions
@@ -105,13 +105,13 @@ RELEASE_COREBOOT_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os
*_COREBOOT_X64_NASM_FLAGS = -f elf64
DEBUG_COREBOOT_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os
- DEBUG_COREBOOT_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
+ DEBUG_COREBOOT_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os -z common-page-size=0x1000
RELEASE_COREBOOT_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Os -Wno-unused-but-set-variable
-RELEASE_COREBOOT_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
+RELEASE_COREBOOT_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os -z common-page-size=0x1000
NOOPT_COREBOOT_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -O0
- NOOPT_COREBOOT_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -O0
+ NOOPT_COREBOOT_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -O0 -z common-page-size=0x1000
##################
# COREBOOT ARM definitions
@@ -139,13 +139,13 @@ RELEASE_COREBOOT_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
*_COREBOOT_ARM_CC_XIPFLAGS = DEF(GCC5_ARM_CC_XIPFLAGS)
DEBUG_COREBOOT_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -O0
- DEBUG_COREBOOT_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS)
+ DEBUG_COREBOOT_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -z common-page-size=0x1000
RELEASE_COREBOOT_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable
-RELEASE_COREBOOT_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm
+RELEASE_COREBOOT_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm -z common-page-size=0x1000
NOOPT_COREBOOT_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -O0
- NOOPT_COREBOOT_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -O0
+ NOOPT_COREBOOT_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -O0 -z common-page-size=0x1000
##################
# COREBOOT AARCH64 definitions
@@ -176,7 +176,7 @@ RELEASE_COREBOOT_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(W
DEBUG_COREBOOT_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
RELEASE_COREBOOT_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -mcmodel=tiny -fomit-frame-pointer
-RELEASE_COREBOOT_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64
+RELEASE_COREBOOT_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -z common-page-size=0x1000
NOOPT_COREBOOT_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0 -mcmodel=small
NOOPT_COREBOOT_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 -O0