2 # linux/arch/sh/boot/compressed/Makefile
4 # create a compressed vmlinux image from the original vmlinux
7 targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
8 EXTRA_AFLAGS := -traditional
10 OBJECTS = $(obj)/head.o $(obj)/misc.o
12 ifdef CONFIG_SH_STANDARD_BIOS
13 OBJECTS += $(obj)/../../kernel/sh_bios.o
17 # IMAGE_OFFSET is the load offset of the compression loader
19 IMAGE_OFFSET := $(shell printf "0x%8x" $$[0x80000000+$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
21 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds.s
23 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
27 $(obj)/vmlinux.bin: vmlinux FORCE
28 $(call if_changed,objcopy)
30 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
31 $(call if_changed,gzip)
33 LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
34 OBJCOPYFLAGS += -R .empty_zero_page
36 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE