diff options
author | Roy Franz <roy.franz@linaro.org> | 2015-09-23 23:17:54 -0400 |
---|---|---|
committer | ard <ard.biesheuvel@linaro.org> | 2015-12-14 04:38:21 -0500 |
commit | 81a0bc39ea1960bbf8ece6a895d7cfd2d9efa28a (patch) | |
tree | 58f4c5c73cc4292b242dce2e0018511f9e18e39e /drivers/firmware/efi/libstub/Makefile | |
parent | da58fb6571bf40e5b2287d6aa3bbca04965f5677 (diff) |
ARM: add UEFI stub support
This patch adds EFI stub support for the ARM Linux kernel.
The EFI stub operates similarly to the x86 and arm64 stubs: it is a
shim between the EFI firmware and the normal zImage entry point, and
sets up the environment that the zImage is expecting. This includes
optionally loading the initrd and device tree from the system partition
based on the kernel command line.
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/Makefile')
-rw-r--r-- | drivers/firmware/efi/libstub/Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 3c0467d3688c..8cf9ccbf42d5 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile | |||
@@ -34,6 +34,7 @@ $(obj)/lib-%.o: $(srctree)/lib/%.c FORCE | |||
34 | lib-$(CONFIG_EFI_ARMSTUB) += arm-stub.o fdt.o string.o \ | 34 | lib-$(CONFIG_EFI_ARMSTUB) += arm-stub.o fdt.o string.o \ |
35 | $(patsubst %.c,lib-%.o,$(arm-deps)) | 35 | $(patsubst %.c,lib-%.o,$(arm-deps)) |
36 | 36 | ||
37 | lib-$(CONFIG_ARM) += arm32-stub.o | ||
37 | lib-$(CONFIG_ARM64) += arm64-stub.o | 38 | lib-$(CONFIG_ARM64) += arm64-stub.o |
38 | CFLAGS_arm64-stub.o := -DTEXT_OFFSET=$(TEXT_OFFSET) | 39 | CFLAGS_arm64-stub.o := -DTEXT_OFFSET=$(TEXT_OFFSET) |
39 | 40 | ||
@@ -67,3 +68,11 @@ quiet_cmd_stubcopy = STUBCPY $@ | |||
67 | $(OBJDUMP) -r $@ | grep $(STUBCOPY_RELOC-y) \ | 68 | $(OBJDUMP) -r $@ | grep $(STUBCOPY_RELOC-y) \ |
68 | && (echo >&2 "$@: absolute symbol references not allowed in the EFI stub"; \ | 69 | && (echo >&2 "$@: absolute symbol references not allowed in the EFI stub"; \ |
69 | rm -f $@; /bin/false); else /bin/false; fi | 70 | rm -f $@; /bin/false); else /bin/false; fi |
71 | |||
72 | # | ||
73 | # ARM discards the .data section because it disallows r/w data in the | ||
74 | # decompressor. So move our .data to .data.efistub, which is preserved | ||
75 | # explicitly by the decompressor linker script. | ||
76 | # | ||
77 | STUBCOPY_FLAGS-$(CONFIG_ARM) += --rename-section .data=.data.efistub | ||
78 | STUBCOPY_RELOC-$(CONFIG_ARM) := R_ARM_ABS | ||