diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-05-08 17:42:16 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-08 17:46:34 -0700 |
commit | 02a884c0fe7ec8459d00d34b7d4101af21fc4a86 (patch) | |
tree | 164783f84130482e52290af03d96ff8e887f8605 /arch/x86/boot/compressed/Makefile | |
parent | 36d3793c947f1ef7ba3d24eeeddc1be41adc5ab4 (diff) | |
download | kernel-crypto-02a884c0fe7ec8459d00d34b7d4101af21fc4a86.tar.gz kernel-crypto-02a884c0fe7ec8459d00d34b7d4101af21fc4a86.tar.xz kernel-crypto-02a884c0fe7ec8459d00d34b7d4101af21fc4a86.zip |
x86, boot: determine compressed code offset at compile time
Determine the compressed code offset (from the kernel runtime address)
at compile time. This allows some minor optimizations in
arch/x86/boot/compressed/head_*.S, but more importantly it makes this
value available to the build process, which will enable a future patch
to export the necessary linear memory footprint into the bzImage
header.
[ Impact: cleanup, future patch enabling ]
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot/compressed/Makefile')
-rw-r--r-- | arch/x86/boot/compressed/Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 7f24fdb584e..49c8a4c37d7 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -19,6 +19,8 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ LDFLAGS := -m elf_$(UTS_MACHINE) LDFLAGS_vmlinux := -T +hostprogs-y := mkpiggy + $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/piggy.o FORCE $(call if_changed,ld) @: @@ -50,6 +52,9 @@ suffix-$(CONFIG_KERNEL_GZIP) := gz suffix-$(CONFIG_KERNEL_BZIP2) := bz2 suffix-$(CONFIG_KERNEL_LZMA) := lzma -LDFLAGS_piggy.o := -r --format binary --oformat $(CONFIG_OUTPUT_FORMAT) -T -$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE - $(call if_changed,ld) +quiet_cmd_mkpiggy = MKPIGGY $@ + cmd_mkpiggy = $(obj)/mkpiggy $< > $@ || ( rm -f $@ ; false ) + +targets += piggy.S +$(obj)/piggy.S: $(obj)/vmlinux.bin.$(suffix-y) $(obj)/mkpiggy FORCE + $(call if_changed,mkpiggy) |