Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame^] | 1 | # |
| 2 | # linux/arch/sh64/boot/compressed/Makefile |
| 3 | # |
| 4 | # This file is subject to the terms and conditions of the GNU General Public |
| 5 | # License. See the file "COPYING" in the main directory of this archive |
| 6 | # for more details. |
| 7 | # |
| 8 | # Copyright (C) 2002 Stuart Menefy |
| 9 | # Copyright (C) 2004 Paul Mundt |
| 10 | # |
| 11 | # create a compressed vmlinux image from the original vmlinux |
| 12 | # |
| 13 | |
| 14 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ |
| 15 | head.o misc.o cache.o piggy.o vmlinux.lds |
| 16 | |
| 17 | EXTRA_AFLAGS := -traditional |
| 18 | |
| 19 | OBJECTS := $(obj)/head.o $(obj)/misc.o $(obj)/cache.o |
| 20 | |
| 21 | # |
| 22 | # ZIMAGE_OFFSET is the load offset of the compression loader |
| 23 | # (4M for the kernel plus 64K for this loader) |
| 24 | # |
| 25 | ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[$(CONFIG_MEMORY_START)+0x400000+0x10000]) |
| 26 | |
| 27 | LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \ |
| 28 | -T $(obj)/../../kernel/vmlinux.lds \ |
| 29 | --no-warn-mismatch |
| 30 | |
| 31 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE |
| 32 | $(call if_changed,ld) |
| 33 | @: |
| 34 | |
| 35 | $(obj)/vmlinux.bin: vmlinux FORCE |
| 36 | $(call if_changed,objcopy) |
| 37 | |
| 38 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE |
| 39 | $(call if_changed,gzip) |
| 40 | |
| 41 | LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T |
| 42 | OBJCOPYFLAGS += -R .empty_zero_page |
| 43 | |
| 44 | $(obj)/piggy.o: $(obj)/vmlinux.lds $(obj)/vmlinux.bin.gz FORCE |
| 45 | $(call if_changed,ld) |
| 46 | |