Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[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.xip
12 extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma 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 '$(MACHINE)-$(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 # The mkimage tool wants 64bytes prepended to the image
37 quiet_cmd_mk_bin_xip = BIN     $@
38       cmd_mk_bin_xip = ( printf '%64s' | tr ' ' '\377' ; cat $< ) > $@
39 $(obj)/vmlinux.bin.xip: $(obj)/vmlinux.bin FORCE
40         $(call if_changed,mk_bin_xip)
41
42 $(obj)/vmImage.bin: $(obj)/vmlinux.bin
43         $(call if_changed,uimage,none)
44
45 $(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
46         $(call if_changed,uimage,bzip2)
47
48 $(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
49         $(call if_changed,uimage,gzip)
50
51 $(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
52         $(call if_changed,uimage,lzma)
53
54 $(obj)/vmImage.xip: $(obj)/vmlinux.bin.xip
55         $(call if_changed,uimage,none)
56
57 suffix-y                      := bin
58 suffix-$(CONFIG_KERNEL_GZIP)  := gz
59 suffix-$(CONFIG_KERNEL_BZIP2) := bz2
60 suffix-$(CONFIG_KERNEL_LZMA)  := lzma
61 suffix-$(CONFIG_ROMKERNEL)    := xip
62
63 $(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
64         @ln -sf $(notdir $<) $@
65
66 install:
67         sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"