Linux-2.6.12-rc2
[pandora-kernel.git] / arch / arm / boot / Makefile
1 #
2 # arch/arm/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 # Copyright (C) 1995-2002 Russell King
9 #
10
11 MKIMAGE         := $(srctree)/scripts/mkuboot.sh
12
13 ifneq ($(MACHINE),)
14 include $(srctree)/$(MACHINE)/Makefile.boot
15 endif
16
17 # Note: the following conditions must always be true:
18 #   ZRELADDR == virt_to_phys(TEXTADDR)
19 #   PARAMS_PHYS must be within 4MB of ZRELADDR
20 #   INITRD_PHYS must be in RAM
21 ZRELADDR    := $(zreladdr-y)
22 PARAMS_PHYS := $(params_phys-y)
23 INITRD_PHYS := $(initrd_phys-y)
24
25 export ZRELADDR INITRD_PHYS PARAMS_PHYS
26
27 targets := Image zImage xipImage bootpImage uImage
28
29 ifeq ($(CONFIG_XIP_KERNEL),y)
30
31 $(obj)/xipImage: vmlinux FORCE
32         $(call if_changed,objcopy)
33         @echo '  Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))'
34
35 $(obj)/Image $(obj)/zImage: FORCE
36         @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'
37         @echo 'Only the xipImage target is available in this case'
38         @false
39
40 else
41
42 $(obj)/xipImage: FORCE
43         @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)'
44         @false
45
46 $(obj)/Image: vmlinux FORCE
47         $(call if_changed,objcopy)
48         @echo '  Kernel: $@ is ready'
49
50 $(obj)/compressed/vmlinux: $(obj)/Image FORCE
51         $(Q)$(MAKE) $(build)=$(obj)/compressed $@
52
53 $(obj)/zImage:  $(obj)/compressed/vmlinux FORCE
54         $(call if_changed,objcopy)
55         @echo '  Kernel: $@ is ready'
56
57 endif
58
59 quiet_cmd_uimage = UIMAGE  $@
60       cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
61                    -C none -a $(ZRELADDR) -e $(ZRELADDR) \
62                    -n 'Linux-$(KERNELRELEASE)' -d $< $@
63
64 $(obj)/uImage:  $(obj)/zImage FORCE
65         $(call if_changed,uimage)
66         @echo '  Image $@ is ready'
67
68 $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
69         $(Q)$(MAKE) $(build)=$(obj)/bootp $@
70         @:
71
72 $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
73         $(call if_changed,objcopy)
74         @echo '  Kernel: $@ is ready'
75
76 .PHONY: initrd FORCE
77 initrd:
78         @test "$(INITRD_PHYS)" != "" || \
79         (echo This machine does not support INITRD; exit -1)
80         @test "$(INITRD)" != "" || \
81         (echo You must specify INITRD; exit -1)
82
83 install: $(obj)/Image
84         $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
85         $(obj)/Image System.map "$(INSTALL_PATH)"
86
87 zinstall: $(obj)/zImage
88         $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
89         $(obj)/zImage System.map "$(INSTALL_PATH)"
90
91 subdir-     := bootp compressed