提交 183ab05f 编写于 作者: V Vasily Gorbik 提交者: Martin Schwidefsky

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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 8e533fdd
...@@ -23,16 +23,12 @@ LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T ...@@ -23,16 +23,12 @@ LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OBJECTS) $(obj)/vmlinux: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OBJECTS)
$(call if_changed,ld) $(call if_changed,ld)
TRIM_HEAD_SIZE := 0x100000 # 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'
sed-sizes := -e 's/^\([0-9a-fA-F]*\) . \(__bss_start\|_end\)$$/\#define SZ\2 (0x\1 - $(TRIM_HEAD_SIZE))/p'
quiet_cmd_sizes = GEN $@ quiet_cmd_sizes = GEN $@
cmd_sizes = $(NM) $< | sed -n $(sed-sizes) > $@ 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 $(obj)/sizes.h: vmlinux
$(call if_changed,sizes) $(call if_changed,sizes)
...@@ -42,13 +38,10 @@ $(obj)/head.o: $(obj)/sizes.h ...@@ -42,13 +38,10 @@ $(obj)/head.o: $(obj)/sizes.h
CFLAGS_misc.o += -I$(objtree)/$(obj) CFLAGS_misc.o += -I$(objtree)/$(obj)
$(obj)/misc.o: $(obj)/sizes.h $(obj)/misc.o: $(obj)/sizes.h
OBJCOPYFLAGS_vmlinux.bin.full := -R .comment -S OBJCOPYFLAGS_vmlinux.bin := -R .comment -S
$(obj)/vmlinux.bin.full: vmlinux $(obj)/vmlinux.bin: vmlinux
$(call if_changed,objcopy) $(call if_changed,objcopy)
$(obj)/vmlinux.bin: $(obj)/vmlinux.bin.full
$(call if_changed,trim_head)
vmlinux.bin.all-y := $(obj)/vmlinux.bin vmlinux.bin.all-y := $(obj)/vmlinux.bin
suffix-$(CONFIG_KERNEL_GZIP) := .gz suffix-$(CONFIG_KERNEL_GZIP) := .gz
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/page.h> #include <asm/page.h>
__HEAD __HEAD
.org 0x100000
ENTRY(startup_continue) ENTRY(startup_continue)
tm __LC_STFLE_FAC_LIST+5,0x80 # LPP available ? tm __LC_STFLE_FAC_LIST+5,0x80 # LPP available ?
jz 0f jz 0f
......
...@@ -30,7 +30,7 @@ PHDRS { ...@@ -30,7 +30,7 @@ PHDRS {
SECTIONS SECTIONS
{ {
. = 0x00000000; . = 0x100000;
.text : { .text : {
/* Text and read-only data */ /* Text and read-only data */
HEAD_TEXT HEAD_TEXT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册