aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/boot/compressed/Makefile
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-06-27 17:10:14 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-07-02 11:24:58 +0200
commit183ab05ff285555c56b7f00bb4fd52d80a9513fb (patch)
treede41bc46e49ae9c232a7402ac5d68ea78b2356ac /arch/s390/boot/compressed/Makefile
parents390: remove unused _ehead symbol (diff)
downloadlinux-dev-183ab05ff285555c56b7f00bb4fd52d80a9513fb.tar.xz
linux-dev-183ab05ff285555c56b7f00bb4fd52d80a9513fb.zip
s390: get rid of the first mb of uncompressed image
Instead of generating uncompressed kernel image starting at 0, filling first mb with zeros (with ".org 0x100000") and then trimming it off from vmlinux.bin before compression, simply generate a kernel image starting from 0x100000. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/boot/compressed/Makefile')
-rw-r--r--arch/s390/boot/compressed/Makefile15
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/s390/boot/compressed/Makefile b/arch/s390/boot/compressed/Makefile
index 9d3bd7d066e9..04609478d18b 100644
--- a/arch/s390/boot/compressed/Makefile
+++ b/arch/s390/boot/compressed/Makefile
@@ -23,16 +23,12 @@ LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OBJECTS)
$(call if_changed,ld)
-TRIM_HEAD_SIZE := 0x100000
-
-sed-sizes := -e 's/^\([0-9a-fA-F]*\) . \(__bss_start\|_end\)$$/\#define SZ\2 (0x\1 - $(TRIM_HEAD_SIZE))/p'
+# extract required uncompressed vmlinux symbols and adjust them to reflect offsets inside vmlinux.bin
+sed-sizes := -e 's/^\([0-9a-fA-F]*\) . \(__bss_start\|_end\)$$/\#define SZ\2 (0x\1 - 0x100000)/p'
quiet_cmd_sizes = GEN $@
cmd_sizes = $(NM) $< | sed -n $(sed-sizes) > $@
-quiet_cmd_trim_head = TRIM $@
- cmd_trim_head = tail -c +$$(($(TRIM_HEAD_SIZE) + 1)) $< > $@
-
$(obj)/sizes.h: vmlinux
$(call if_changed,sizes)
@@ -42,13 +38,10 @@ $(obj)/head.o: $(obj)/sizes.h
CFLAGS_misc.o += -I$(objtree)/$(obj)
$(obj)/misc.o: $(obj)/sizes.h
-OBJCOPYFLAGS_vmlinux.bin.full := -R .comment -S
-$(obj)/vmlinux.bin.full: vmlinux
+OBJCOPYFLAGS_vmlinux.bin := -R .comment -S
+$(obj)/vmlinux.bin: vmlinux
$(call if_changed,objcopy)
-$(obj)/vmlinux.bin: $(obj)/vmlinux.bin.full
- $(call if_changed,trim_head)
-
vmlinux.bin.all-y := $(obj)/vmlinux.bin
suffix-$(CONFIG_KERNEL_GZIP) := .gz