Back to home page

LXR

 
 

    


0001 #
0002 # linux/arch/s390/boot/compressed/Makefile
0003 #
0004 # create a compressed vmlinux image from the original vmlinux
0005 #
0006 
0007 KCOV_INSTRUMENT := n
0008 
0009 targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
0010 targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
0011 targets += misc.o piggy.o sizes.h head.o
0012 
0013 KBUILD_CFLAGS := -m64 -D__KERNEL__ -O2
0014 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
0015 KBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks -msoft-float
0016 KBUILD_CFLAGS += $(call cc-option,-mpacked-stack)
0017 KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
0018 
0019 GCOV_PROFILE := n
0020 UBSAN_SANITIZE := n
0021 
0022 OBJECTS := $(addprefix $(objtree)/arch/s390/kernel/, head.o sclp.o ebcdic.o als.o)
0023 OBJECTS += $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o
0024 
0025 LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T
0026 $(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS)
0027         $(call if_changed,ld)
0028 
0029 sed-sizes := -e 's/^\([0-9a-fA-F]*\) . \(__bss_start\|_end\)$$/\#define SZ\2 0x\1/p'
0030 
0031 quiet_cmd_sizes = GEN $@
0032       cmd_sizes = $(NM) $< | sed -n $(sed-sizes) > $@
0033 
0034 $(obj)/sizes.h: vmlinux
0035         $(call if_changed,sizes)
0036 
0037 AFLAGS_head.o += -I$(objtree)/$(obj)
0038 $(obj)/head.o: $(obj)/sizes.h
0039 
0040 CFLAGS_misc.o += -I$(objtree)/$(obj)
0041 $(obj)/misc.o: $(obj)/sizes.h
0042 
0043 OBJCOPYFLAGS_vmlinux.bin :=  -R .comment -S
0044 $(obj)/vmlinux.bin: vmlinux
0045         $(call if_changed,objcopy)
0046 
0047 vmlinux.bin.all-y := $(obj)/vmlinux.bin
0048 
0049 suffix-$(CONFIG_KERNEL_GZIP)  := gz
0050 suffix-$(CONFIG_KERNEL_BZIP2) := bz2
0051 suffix-$(CONFIG_KERNEL_LZ4)  := lz4
0052 suffix-$(CONFIG_KERNEL_LZMA)  := lzma
0053 suffix-$(CONFIG_KERNEL_LZO)  := lzo
0054 suffix-$(CONFIG_KERNEL_XZ)  := xz
0055 
0056 $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y)
0057         $(call if_changed,gzip)
0058 $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y)
0059         $(call if_changed,bzip2)
0060 $(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y)
0061         $(call if_changed,lz4)
0062 $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y)
0063         $(call if_changed,lzma)
0064 $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y)
0065         $(call if_changed,lzo)
0066 $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y)
0067         $(call if_changed,xzkern)
0068 
0069 LDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T
0070 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y)
0071         $(call if_changed,ld)