]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - arch/h8300/boot/compressed/Makefile
Merge remote-tracking branch 'mkp-scsi/4.5/scsi-fixes' into fixes
[mirror_ubuntu-zesty-kernel.git] / arch / h8300 / boot / compressed / Makefile
1 #
2 # linux/arch/sh/boot/compressed/Makefile
3 #
4 # create a compressed vmlinux image from the original vmlinux
5 #
6
7 targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
8
9 OBJECTS = $(obj)/head.o $(obj)/misc.o
10
11 #
12 # IMAGE_OFFSET is the load offset of the compression loader
13 # Assign dummy values if these 2 variables are not defined,
14 # in order to suppress error message.
15 #
16 CONFIG_MEMORY_START ?= 0x00400000
17 CONFIG_BOOT_LINK_OFFSET ?= 0x00280000
18 IMAGE_OFFSET := $(shell printf "0x%08x" $$(($(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET))))
19
20 LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
21 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -estartup -T $(obj)/vmlinux.lds \
22 --defsym output=$(CONFIG_MEMORY_START)
23
24 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
25 $(call if_changed,ld)
26 @:
27
28 $(obj)/vmlinux.bin: vmlinux FORCE
29 $(call if_changed,objcopy)
30
31 suffix-$(CONFIG_KERNEL_GZIP) := gzip
32 suffix-$(CONFIG_KERNEL_LZO) := lzo
33
34 $(obj)/vmlinux.bin.$(suffix-y): $(obj)/vmlinux.bin FORCE
35 $(call if_changed,$(suffix-y))
36
37 LDFLAGS_piggy.o := -r --format binary --oformat elf32-h8300-linux -T
38 OBJCOPYFLAGS := -O binary
39
40 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
41 $(call if_changed,ld)
42
43 CFLAGS_misc.o = -O0