forked from linuxboot/heads
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate EDK2 into separate module and pin Linuxboot commit
Making EDK2 into a module will aid in allowing it to be rebuilt (linuxboot#359) and patched by the build system and to be reproducible (linuxboot#403). It also provides somewhat of logical separation from Linuxboot. Further, Linuxboot builds have not been working with HEADS for a while because it hasn't been pinned to a commit, and therefore it changes as the repository is updated. This commit pins Linuxboot to a commit that has shown to work. Linuxboot commit: f0ea0af8609e235631f1fcb65a4f7eb69f28ea26 EDK2 commit: b7c299e4799012e8a20958a68693ab95b7626aa9
- Loading branch information
Showing
5 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# EDK2 is required by Linuxboot. | ||
modules-$(CONFIG_LINUXBOOT) += edk2 | ||
|
||
edk2_version := b7c299e4799012e8a20958a68693ab95b7626aa9 | ||
edk2_hash := 78f48f46414b019b5fcd2d7049fd79e955d25f2965123d0bbdf7226564db33e5 | ||
edk2_tar := edk2-$(edk2_version).tar.gz | ||
edk2_dir := edk2-$(edk2_version) | ||
edk2_url := https://github.com/linuxboot/edk2/archive/$(edk2_version).tar.gz | ||
edk2_depends := $(musl_dep) | ||
|
||
# Use musl for compilation to avoid errors with GCC and create a dummy | ||
# .git file so Linuxboot doesn't try to clone EDK2 again. | ||
edk2_configure := \ | ||
cd $(build)/$(edk2_dir) \ | ||
&& source edksetup.sh \ | ||
&& sed -i \ | ||
's|DEFINE GCC5_$(CONFIG_EDK2_PLATFORM)_PREFIX = ENV(GCC5_BIN)|DEFINE GCC5_$(CONFIG_EDK2_PLATFORM)_PREFIX = $(CROSS)|' \ | ||
Conf/tools_def.txt \ | ||
&& touch .git | ||
|
||
# EDK2 will be built via the Linuxboot module, so no build target here. | ||
edk2_target := nothing || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...es/edk2-b7c299e4799012e8a20958a68693ab95b7626aa9/0000-no-var-length-arrays-warnings.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile | ||
index 27aa28b2fa..8a0633977b 100644 | ||
--- a/BaseTools/Source/C/Makefiles/header.makefile | ||
+++ b/BaseTools/Source/C/Makefiles/header.makefile | ||
@@ -49,7 +49,7 @@ ifeq ($(DARWIN),Darwin) | ||
# assume clang or clang compatible flags on OS X | ||
BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g | ||
else | ||
-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g | ||
+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-vla-parameter -Wno-stringop-truncation -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g | ||
endif | ||
BUILD_LFLAGS = | ||
BUILD_CXXFLAGS = -Wno-unused-result |
13 changes: 13 additions & 0 deletions
13
patches/edk2-b7c299e4799012e8a20958a68693ab95b7626aa9/0001-no-misleading-indentation.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template | ||
index d8fde02ea3..bb5ee93703 100755 | ||
--- a/BaseTools/Conf/tools_def.template | ||
+++ b/BaseTools/Conf/tools_def.template | ||
@@ -4503,7 +4503,7 @@ DEFINE GCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 | ||
DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii | ||
DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii | ||
|
||
-DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings | ||
+DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -Wno-misleading-indentation -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings | ||
DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables | ||
DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables | ||
DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 |