2 # This file is subject to the terms and conditions of the GNU General Public
3 # License. See the file "COPYING" in the main directory of this archive
6 # Copyright (C) 2007,2012 Imagination Technologies Ltd.
10 suffix-
$(CONFIG_KERNEL_GZIP
) := gz
11 suffix-
$(CONFIG_KERNEL_BZIP2
) := bz2
12 suffix-
$(CONFIG_KERNEL_XZ
) := xz
13 suffix-
$(CONFIG_KERNEL_LZO
) := lzo
15 targets
+= vmlinux.bin
23 extra-y
+= vmlinux.bin
24 extra-y
+= vmlinux.bin.gz
25 extra-y
+= vmlinux.bin.bz2
26 extra-y
+= vmlinux.bin.xz
27 extra-y
+= vmlinux.bin.lzo
29 UIMAGE_LOADADDR
= $(CONFIG_PAGE_OFFSET
)
31 ifeq ($(CONFIG_FUNCTION_TRACER
),y
)
32 orig_cflags
:= $(KBUILD_CFLAGS
)
33 KBUILD_CFLAGS
= $(subst -pg
, , $(orig_cflags
))
36 $(obj
)/vmlinux.bin
: vmlinux FORCE
37 $(call if_changed
,objcopy
)
39 $(obj
)/vmlinux.bin.gz
: $(obj
)/vmlinux.bin FORCE
40 $(call if_changed
,gzip
)
42 $(obj
)/vmlinux.bin.bz2
: $(obj
)/vmlinux.bin FORCE
43 $(call if_changed
,bzip2
)
45 $(obj
)/vmlinux.bin.xz
: $(obj
)/vmlinux.bin FORCE
46 $(call if_changed
,xzkern
)
48 $(obj
)/vmlinux.bin.lzo
: $(obj
)/vmlinux.bin FORCE
49 $(call if_changed
,lzo
)
51 $(obj
)/uImage.gz
: $(obj
)/vmlinux.bin.gz FORCE
52 $(call if_changed
,uimage
,gzip
)
54 $(obj
)/uImage.bz2
: $(obj
)/vmlinux.bin.bz2 FORCE
55 $(call if_changed
,uimage
,bzip2
)
57 $(obj
)/uImage.xz
: $(obj
)/vmlinux.bin.xz FORCE
58 $(call if_changed
,uimage
,xz
)
60 $(obj
)/uImage.lzo
: $(obj
)/vmlinux.bin.lzo FORCE
61 $(call if_changed
,uimage
,lzo
)
63 $(obj
)/uImage.bin
: $(obj
)/vmlinux.bin FORCE
64 $(call if_changed
,uimage
,none
)
66 $(obj
)/uImage
: $(obj
)/uImage.
$(suffix-y
)
67 @ln
-sf
$(notdir $<) $@
68 @echo
' Image $@ is ready'