Merge remote-tracking branch 'kspp/for-next/kspp'
[deliverable/linux.git] / arch / arm / boot / Makefile
CommitLineData
1da177e4
LT
1#
2# arch/arm/boot/Makefile
3#
4f193362
PS
4# This file is included by the global makefile so that you can add your own
5# architecture-specific flags and dependencies.
6#
1da177e4
LT
7# This file is subject to the terms and conditions of the GNU General Public
8# License. See the file "COPYING" in the main directory of this archive
9# for more details.
10#
11# Copyright (C) 1995-2002 Russell King
12#
13
3cb59581
MR
14OBJCOPYFLAGS :=-O binary -R .comment -S
15
1da177e4 16ifneq ($(MACHINE),)
7aacad53 17include $(MACHINE)/Makefile.boot
1da177e4
LT
18endif
19
20# Note: the following conditions must always be true:
9e84ed63 21# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
1da177e4
LT
22# PARAMS_PHYS must be within 4MB of ZRELADDR
23# INITRD_PHYS must be in RAM
9e84ed63 24ZRELADDR := $(zreladdr-y)
1da177e4
LT
25PARAMS_PHYS := $(params_phys-y)
26INITRD_PHYS := $(initrd_phys-y)
27
9e84ed63 28export ZRELADDR INITRD_PHYS PARAMS_PHYS
1da177e4
LT
29
30targets := Image zImage xipImage bootpImage uImage
31
32ifeq ($(CONFIG_XIP_KERNEL),y)
33
34$(obj)/xipImage: vmlinux FORCE
35 $(call if_changed,objcopy)
c6bbfbb7 36 @$(kecho) ' Physical Address of xipImage: $(CONFIG_XIP_PHYS_ADDR)'
1da177e4
LT
37
38$(obj)/Image $(obj)/zImage: FORCE
39 @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'
40 @echo 'Only the xipImage target is available in this case'
41 @false
42
43else
44
45$(obj)/xipImage: FORCE
46 @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)'
47 @false
48
49$(obj)/Image: vmlinux FORCE
50 $(call if_changed,objcopy)
1da177e4
LT
51
52$(obj)/compressed/vmlinux: $(obj)/Image FORCE
53 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
54
55$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
56 $(call if_changed,objcopy)
1da177e4
LT
57
58endif
59
e3393645
SW
60ifneq ($(LOADADDR),)
61 UIMAGE_LOADADDR=$(LOADADDR)
0f980146 62else
e3393645
SW
63 ifeq ($(CONFIG_ZBOOT_ROM),y)
64 UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
65 else
66 UIMAGE_LOADADDR=$(ZRELADDR)
67 endif
0f980146
UKK
68endif
69
cd227fbf 70check_for_multiple_loadaddr = \
938f94cd
OJ
71if [ $(words $(UIMAGE_LOADADDR)) -ne 1 ]; then \
72 echo 'multiple (or no) load addresses: $(UIMAGE_LOADADDR)'; \
cd227fbf
SH
73 echo 'This is incompatible with uImages'; \
74 echo 'Specify LOADADDR on the commandline to build an uImage'; \
75 false; \
76fi
77
1da177e4 78$(obj)/uImage: $(obj)/zImage FORCE
cd227fbf 79 @$(check_for_multiple_loadaddr)
1da177e4 80 $(call if_changed,uimage)
1da177e4
LT
81
82$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
83 $(Q)$(MAKE) $(build)=$(obj)/bootp $@
1da177e4
LT
84
85$(obj)/bootpImage: $(obj)/bootp/bootp FORCE
86 $(call if_changed,objcopy)
1da177e4 87
bc5ce155 88PHONY += initrd install zinstall uinstall
1da177e4
LT
89initrd:
90 @test "$(INITRD_PHYS)" != "" || \
91 (echo This machine does not support INITRD; exit -1)
92 @test "$(INITRD)" != "" || \
93 (echo You must specify INITRD; exit -1)
94
19514fc6
RR
95install:
96 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
1da177e4
LT
97 $(obj)/Image System.map "$(INSTALL_PATH)"
98
19514fc6
RR
99zinstall:
100 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
1da177e4
LT
101 $(obj)/zImage System.map "$(INSTALL_PATH)"
102
19514fc6
RR
103uinstall:
104 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \
a65d2922
RK
105 $(obj)/uImage System.map "$(INSTALL_PATH)"
106
9e25fe6b 107subdir- := bootp compressed dts
This page took 0.865703 seconds and 5 git commands to generate.