Commit 8282cd64 authored by Vasily Gorbik's avatar Vasily Gorbik Committed by Martin Schwidefsky
Browse files

s390/boot: make head.S and als.c be part of the decompressor only



Since uncompressed kernel image does not have to be bootable anymore,
move head.S, head_kdump.S and als.c to boot/ folder and compile them
in just in the decompressor.

Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent bd79d663
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -113,8 +113,7 @@ export KBUILD_CFLAGS_DECOMPRESSOR

OBJCOPYFLAGS	:= -O binary

head-y		:= arch/s390/kernel/head.o
head-y		+= arch/s390/kernel/head64.o
head-y		:= arch/s390/kernel/head64.o

# See arch/s390/Kbuild for content of core part of the kernel
core-y		+= arch/s390/
+30 −3
Original line number Diff line number Diff line
@@ -3,15 +3,42 @@
# Makefile for the linux s390-specific parts of the memory manager.
#

targets := bzImage
KCOV_INSTRUMENT := n
GCOV_PROFILE := n
UBSAN_SANITIZE := n

KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR)
KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR)

#
# Use -march=z900 for als.c to be able to print an error
# message if the kernel is started on a machine which is too old
#
ifneq ($(CC_FLAGS_MARCH),-march=z900)
AFLAGS_REMOVE_head.o	+= $(CC_FLAGS_MARCH)
AFLAGS_head.o		+= -march=z900
CFLAGS_REMOVE_als.o	+= $(CC_FLAGS_MARCH)
CFLAGS_als.o		+= -march=z900
endif

obj-y	:= head.o als.o
targets	:= bzImage startup.a $(obj-y)
subdir-	:= compressed

OBJECTS := $(addprefix $(obj)/,$(obj-y))

$(obj)/bzImage: $(obj)/compressed/vmlinux FORCE
	$(call if_changed,objcopy)

$(obj)/compressed/vmlinux: FORCE
$(obj)/compressed/vmlinux: $(obj)/startup.a FORCE
	$(Q)$(MAKE) $(build)=$(obj)/compressed $@

quiet_cmd_ar = AR      $@
      cmd_ar = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(filter-out FORCE, $^)

$(obj)/startup.a: $(OBJECTS) FORCE
	$(call if_changed,ar)

install: $(CONFIGURE) $(obj)/bzImage
	sh -x  $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \
	      System.map "$(INSTALL_PATH)"
+0 −1
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@
#include <asm/facility.h>
#include <asm/lowcore.h>
#include <asm/sclp.h>
#include "entry.h"

/*
 * The code within this file will be called very early. It may _not_
+2 −2
Original line number Diff line number Diff line
@@ -16,12 +16,12 @@ targets += misc.o piggy.o sizes.h head.o
KBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR)
KBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR)

OBJECTS := $(addprefix $(objtree)/arch/s390/kernel/, head.o ebcdic.o als.o)
OBJECTS := $(objtree)/arch/s390/kernel/ebcdic.o
OBJECTS += $(objtree)/drivers/s390/char/sclp_early_core.o
OBJECTS += $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o

LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS)
$(obj)/vmlinux: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OBJECTS)
	$(call if_changed,ld)

TRIM_HEAD_SIZE := 0x100000
+0 −0

File moved.

Loading