MIPS: SB1250: Include correct header and fix a warning
[linux-2.6/linux-mips.git] / arch / blackfin / boot / Makefile
blobd1b3d6051fdfaf4a43f7cb72392c49787d634719
2 # arch/blackfin/boot/Makefile
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.
9 MKIMAGE := $(srctree)/scripts/mkuboot.sh
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
14 UIMAGE_OPTS-y :=
15 UIMAGE_OPTS-$(CONFIG_RAMKERNEL) += -a $(CONFIG_BOOT_LOAD)
16 UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -a $(CONFIG_ROM_BASE) -x
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 $< $@
24 $(obj)/vmlinux.bin: vmlinux FORCE
25 $(call if_changed,objcopy)
27 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
28 $(call if_changed,gzip)
30 $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
31 $(call if_changed,bzip2)
33 $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
34 $(call if_changed,lzma)
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)
42 $(obj)/vmImage.bin: $(obj)/vmlinux.bin
43 $(call if_changed,uimage,none)
45 $(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
46 $(call if_changed,uimage,bzip2)
48 $(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
49 $(call if_changed,uimage,gzip)
51 $(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
52 $(call if_changed,uimage,lzma)
54 $(obj)/vmImage.xip: $(obj)/vmlinux.bin.xip
55 $(call if_changed,uimage,none)
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
63 $(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
64 @ln -sf $(notdir $<) $@
66 install:
67 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"