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 \
8 head_32.o misc_32.o piggy.o
9 EXTRA_AFLAGS := -traditional
11 OBJECTS = $(obj)/head_32.o $(obj)/misc_32.o
13 ifdef CONFIG_SH_STANDARD_BIOS
14 OBJECTS += $(obj)/../../kernel/sh_bios.o
18 # IMAGE_OFFSET is the load offset of the compression loader
20 IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
21 $$[$(CONFIG_PAGE_OFFSET) + \
22 $(CONFIG_MEMORY_START) + \
23 $(CONFIG_BOOT_LINK_OFFSET)]')
25 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
27 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
29 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
33 $(obj)/vmlinux.bin: vmlinux FORCE
34 $(call if_changed,objcopy)
36 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
37 $(call if_changed,gzip)
39 LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
40 OBJCOPYFLAGS += -R .empty_zero_page
42 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE