]> bbs.cooldavid.org Git - net-next-2.6.git/blob - arch/sh/boot/compressed/Makefile
sh: Make PAGE_OFFSET configurable.
[net-next-2.6.git] / arch / sh / 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 EXTRA_AFLAGS    := -traditional
9
10 OBJECTS = $(obj)/head.o $(obj)/misc.o
11
12 ifdef CONFIG_SH_STANDARD_BIOS
13 OBJECTS += $(obj)/../../kernel/sh_bios.o
14 endif
15
16 #
17 # IMAGE_OFFSET is the load offset of the compression loader
18 # Assign dummy values if these 2 variables are not defined,
19 # in order to suppress error message.
20 #
21 CONFIG_PAGE_OFFSET      ?= 0x80000000
22 CONFIG_MEMORY_START     ?= 0x0c000000
23 CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
24 IMAGE_OFFSET := $(shell printf "0x%8x" $$[$(CONFIG_PAGE_OFFSET)+$(CONFIG_MEMORY_START)+$(CONFIG_BOOT_LINK_OFFSET)])
25
26 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
27
28 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
29         $(call if_changed,ld)
30         @:
31
32 $(obj)/vmlinux.bin: vmlinux FORCE
33         $(call if_changed,objcopy)
34
35 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
36         $(call if_changed,gzip)
37
38 LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
39 OBJCOPYFLAGS += -R .empty_zero_page
40
41 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
42         $(call if_changed,ld)