Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
[deliverable/linux.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 \
8 vmlinux.bin.bz2 vmlinux.bin.lzma \
9 head_$(BITS).o misc.o piggy.o
10
11 OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
12
13 ifdef CONFIG_SH_STANDARD_BIOS
14 OBJECTS += $(obj)/../../kernel/sh_bios.o
15 endif
16
17 #
18 # IMAGE_OFFSET is the load offset of the compression loader
19 #
20 IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
21 $$[$(CONFIG_PAGE_OFFSET) + \
22 $(KERNEL_MEMORY) + \
23 $(CONFIG_BOOT_LINK_OFFSET)]')
24
25 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
26
27 ifeq ($(CONFIG_MCOUNT),y)
28 ORIG_CFLAGS := $(KBUILD_CFLAGS)
29 KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
30 endif
31
32 LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
33 -T $(obj)/../../kernel/vmlinux.lds
34
35 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
36 $(call if_changed,ld)
37 @:
38
39 $(obj)/vmlinux.bin: vmlinux FORCE
40 $(call if_changed,objcopy)
41
42 vmlinux.bin.all-y := $(obj)/vmlinux.bin
43
44 $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
45 $(call if_changed,gzip)
46 $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
47 $(call if_changed,bzip2)
48 $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
49 $(call if_changed,lzma)
50
51 OBJCOPYFLAGS += -R .empty_zero_page
52
53 LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
54
55 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
56 $(call if_changed,ld)
This page took 0.031129 seconds and 6 git commands to generate.