1# 2# linux/arch/sh/boot/compressed/Makefile 3# 4# create a compressed vmlinux image from the original vmlinux 5# 6 7targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o \ 8 piggy.o vmlinux.lds 9EXTRA_AFLAGS := -traditional 10 11OBJECTS = $(obj)/head.o $(obj)/misc.o 12 13# 14# IMAGE_OFFSET is the load offset of the compression loader 15# 16#IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+0x2000]) 17#IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_MEMORY_START)+0x00400000]) 18 19LDFLAGS_vmlinux := -T 20 21$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(obj)/piggy.o FORCE 22 $(call if_changed,ld) 23 @: 24 25$(obj)/vmlinux.bin: vmlinux FORCE 26 $(call if_changed,objcopy) 27 28$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 29 $(call if_changed,gzip) 30 31CFLAGS_misc.o += -fpic 32 33ifdef CONFIG_MMU 34LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r-linux -T 35else 36LDFLAGS_piggy.o := -r --format binary --oformat elf32-m32r -T 37endif 38 39OBJCOPYFLAGS += -R .empty_zero_page 40 41$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE 42 $(call if_changed,ld) 43