2 # linux/arch/unicore32/boot/compressed/Makefile
4 # create a compressed vmlinuz image from the original vmlinux
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
10 # Copyright (C) 2001~2010 GUAN Xue-tao
13 ccflags-y
:= -fpic
-fno-builtin
14 asflags-y
:= -Wa
,-march
=all
19 CFLAGS_font.o
:= -Dstatic
=
20 $(obj
)/font.c
: $(srctree
)/drivers
/video
/console
/font_8x8.c
24 suffix_
$(CONFIG_KERNEL_GZIP
) := gzip
25 suffix_
$(CONFIG_KERNEL_BZIP2
) := bz2
26 suffix_
$(CONFIG_KERNEL_LZO
) := lzo
27 suffix_
$(CONFIG_KERNEL_LZMA
) := lzma
29 $(obj
)/piggy.
$(suffix_y
): $(obj
)/..
/Image FORCE
30 $(call if_changed
,$(suffix_y
))
32 SEDFLAGS_piggy
= s
/DECOMP_SUFFIX
/$(suffix_y
)/
33 $(obj
)/piggy.S
: $(obj
)/piggy.S.in
34 @sed
"$(SEDFLAGS_piggy)" < $< > $@
36 $(obj
)/piggy.o
: $(obj
)/piggy.
$(suffix_y
) $(obj
)/piggy.S FORCE
38 targets
:= vmlinux vmlinux.lds font.o font.c head.o misc.o \
39 piggy.
$(suffix_y
) piggy.o piggy.S \
41 # Make sure files are removed during clean
42 extra-y
+= piggy.gzip piggy.bz2 piggy.lzo piggy.lzma
46 # Report unresolved symbol references
47 LDFLAGS_vmlinux
+= --no-undefined
48 # Delete all temporary local symbols
50 # Next argument is a linker script
54 $(obj
)/vmlinux
: $(obj
)/vmlinux.lds
$(obj
)/head.o
$(obj
)/piggy.o \
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
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)" < $< > $@