Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[pandora-kernel.git] / arch / blackfin / boot / Makefile
1 #
2 # arch/blackfin/boot/Makefile
3 #
4 # This file is subject to the terms and conditions of the GNU General Public
5 # License.  See the file "COPYING" in the main directory of this archive
6 # for more details.
7 #
8
9 MKIMAGE := $(srctree)/scripts/mkuboot.sh
10
11 targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.lzo vmImage.xip
12 extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip
13
14 UIMAGE_OPTS-y :=
15 UIMAGE_OPTS-$(CONFIG_RAMKERNEL) += -a $(CONFIG_BOOT_LOAD)
16 UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -a $(CONFIG_ROM_BASE) -x
17
18 quiet_cmd_uimage = UIMAGE  $@
19       cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
20                    -C $(2) -n '$(CPU_REV)-$(KERNELRELEASE)' \
21                    -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
22                    $(UIMAGE_OPTS-y) -d $< $@
23
24 $(obj)/vmlinux.bin: vmlinux FORCE
25         $(call if_changed,objcopy)
26
27 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
28         $(call if_changed,gzip)
29
30 $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
31         $(call if_changed,bzip2)
32
33 $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
34         $(call if_changed,lzma)
35
36 $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
37         $(call if_changed,lzo)
38
39 # The mkimage tool wants 64bytes prepended to the image
40 quiet_cmd_mk_bin_xip = BIN     $@
41       cmd_mk_bin_xip = ( printf '%64s' | tr ' ' '\377' ; cat $< ) > $@
42 $(obj)/vmlinux.bin.xip: $(obj)/vmlinux.bin FORCE
43         $(call if_changed,mk_bin_xip)
44
45 $(obj)/vmImage.bin: $(obj)/vmlinux.bin
46         $(call if_changed,uimage,none)
47
48 $(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
49         $(call if_changed,uimage,bzip2)
50
51 $(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
52         $(call if_changed,uimage,gzip)
53
54 $(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
55         $(call if_changed,uimage,lzma)
56
57 $(obj)/vmImage.lzo: $(obj)/vmlinux.bin.lzo
58         $(call if_changed,uimage,lzo)
59
60 $(obj)/vmImage.xip: $(obj)/vmlinux.bin.xip
61         $(call if_changed,uimage,none)
62
63 suffix-y                      := bin
64 suffix-$(CONFIG_KERNEL_GZIP)  := gz
65 suffix-$(CONFIG_KERNEL_BZIP2) := bz2
66 suffix-$(CONFIG_KERNEL_LZMA)  := lzma
67 suffix-$(CONFIG_KERNEL_LZO)   := lzo
68 suffix-$(CONFIG_ROMKERNEL)    := xip
69
70 $(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
71         @ln -sf $(notdir $<) $@
72
73 install:
74         sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"