]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/unicore32/boot/compressed/Makefile
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[mirror_ubuntu-artful-kernel.git] / arch / unicore32 / boot / compressed / Makefile
1 #
2 # linux/arch/unicore32/boot/compressed/Makefile
3 #
4 # create a compressed vmlinuz image from the original vmlinux
5 #
6 # This file is subject to the terms and conditions of the GNU General Public
7 # License. See the file "COPYING" in the main directory of this archive
8 # for more details.
9 #
10 # Copyright (C) 2001~2010 GUAN Xue-tao
11 #
12
13 ccflags-y := -fpic -fno-builtin
14 asflags-y := -Wa,-march=all
15
16 OBJS := misc.o
17
18 # font.c and font.o
19 CFLAGS_font.o := -Dstatic=
20 $(obj)/font.c: $(srctree)/lib/fonts/font_8x8.c
21 $(call cmd,shipped)
22
23 # piggy.S and piggy.o
24 suffix_$(CONFIG_KERNEL_GZIP) := gzip
25 suffix_$(CONFIG_KERNEL_BZIP2) := bz2
26 suffix_$(CONFIG_KERNEL_LZO) := lzo
27 suffix_$(CONFIG_KERNEL_LZMA) := lzma
28
29 $(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE
30 $(call if_changed,$(suffix_y))
31
32 SEDFLAGS_piggy = s/DECOMP_SUFFIX/$(suffix_y)/
33 $(obj)/piggy.S: $(obj)/piggy.S.in
34 @sed "$(SEDFLAGS_piggy)" < $< > $@
35
36 $(obj)/piggy.o: $(obj)/piggy.$(suffix_y) $(obj)/piggy.S FORCE
37
38 targets := vmlinux vmlinux.lds font.o font.c head.o misc.o \
39 piggy.$(suffix_y) piggy.o piggy.S \
40
41 # Make sure files are removed during clean
42 extra-y += piggy.gzip piggy.bz2 piggy.lzo piggy.lzma
43
44 # ?
45 LDFLAGS_vmlinux += -p
46 # Report unresolved symbol references
47 LDFLAGS_vmlinux += --no-undefined
48 # Delete all temporary local symbols
49 LDFLAGS_vmlinux += -X
50 # Next argument is a linker script
51 LDFLAGS_vmlinux += -T
52
53 # For uidivmod
54 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head.o $(obj)/piggy.o \
55 $(obj)/misc.o FORCE
56 $(call if_changed,ld)
57 @:
58
59 # We now have a PIC decompressor implementation. Decompressors running
60 # from RAM should not define ZTEXTADDR. Decompressors running directly
61 # from ROM or Flash must define ZTEXTADDR (preferably via the config)
62 ZTEXTADDR := 0x03000000
63 ZBSSADDR := ALIGN(4)
64
65 SEDFLAGS_lds = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
66 $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/unicore32/boot/Makefile $(KCONFIG_CONFIG)
67 @sed "$(SEDFLAGS_lds)" < $< > $@
68