-
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.
efi: efistub: Convert into static library
This patch changes both x86 and arm64 efistub implementations from #including shared .c files under drivers/firmware/efi to building shared code as a static library. The x86 code uses a stub built into the boot executable which uncompresses the kernel at boot time. In this case, the library is linked into the decompressor. In the arm64 case, the stub is part of the kernel proper so the library is linked into the kernel proper as well. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
- Loading branch information
Ard Biesheuvel
authored and
Matt Fleming
committed
Jul 18, 2014
1 parent
bd66947
commit f4f75ad
Showing
13 changed files
with
39 additions
and
11 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
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
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
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
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,26 @@ | ||
# | ||
# The stub may be linked into the kernel proper or into a separate boot binary, | ||
# but in either case, it executes before the kernel does (with MMU disabled) so | ||
# things like ftrace and stack-protector are likely to cause trouble if left | ||
# enabled, even if doing so doesn't break the build. | ||
# | ||
cflags-$(CONFIG_X86_32) := -march=i386 | ||
cflags-$(CONFIG_X86_64) := -mcmodel=small | ||
cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ | ||
-fPIC -fno-strict-aliasing -mno-red-zone \ | ||
-mno-mmx -mno-sse -DDISABLE_BRANCH_PROFILING | ||
|
||
cflags-$(CONFIG_ARM64) := $(subst -pg,,$(KBUILD_CFLAGS)) | ||
cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \ | ||
-fno-builtin -fpic -mno-single-pic-base | ||
|
||
KBUILD_CFLAGS := $(cflags-y) \ | ||
$(call cc-option,-ffreestanding) \ | ||
$(call cc-option,-fno-stack-protector) | ||
|
||
GCOV_PROFILE := n | ||
|
||
lib-y := efi-stub-helper.o | ||
lib-$(CONFIG_EFI_ARMSTUB) += arm-stub.o fdt.o | ||
|
||
CFLAGS_fdt.o += -I$(srctree)/scripts/dtc/libfdt/ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.