2 # arch/arm/boot/Makefile
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies.
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
11 # Copyright (C) 1995-2002 Russell King
15 include $(srctree)/$(MACHINE)/Makefile.boot
17 include $(srctree)/arch/arm/boot/dts/Makefile
19 # Note: the following conditions must always be true:
20 # ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
21 # PARAMS_PHYS must be within 4MB of ZRELADDR
22 # INITRD_PHYS must be in RAM
23 ZRELADDR := $(zreladdr-y)
24 PARAMS_PHYS := $(params_phys-y)
25 INITRD_PHYS := $(initrd_phys-y)
27 export ZRELADDR INITRD_PHYS PARAMS_PHYS
29 targets := Image zImage xipImage bootpImage uImage
31 ifeq ($(CONFIG_XIP_KERNEL),y)
33 $(obj)/xipImage: vmlinux FORCE
34 $(call if_changed,objcopy)
35 @$(kecho) ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))'
37 $(obj)/Image $(obj)/zImage: FORCE
38 @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'
39 @echo 'Only the xipImage target is available in this case'
44 $(obj)/xipImage: FORCE
45 @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)'
48 $(obj)/Image: vmlinux FORCE
49 $(call if_changed,objcopy)
50 @$(kecho) ' Kernel: $@ is ready'
52 $(obj)/compressed/vmlinux: $(obj)/Image FORCE
53 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
55 $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
56 $(call if_changed,objcopy)
57 @$(kecho) ' Kernel: $@ is ready'
62 UIMAGE_LOADADDR=$(LOADADDR)
64 ifeq ($(CONFIG_ZBOOT_ROM),y)
65 UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
67 UIMAGE_LOADADDR=$(ZRELADDR)
71 check_for_multiple_loadaddr = \
72 if [ $(words $(UIMAGE_LOADADDR)) -ne 1 ]; then \
73 echo 'multiple (or no) load addresses: $(UIMAGE_LOADADDR)'; \
74 echo 'This is incompatible with uImages'; \
75 echo 'Specify LOADADDR on the commandline to build an uImage'; \
79 $(obj)/uImage: $(obj)/zImage FORCE
80 @$(check_for_multiple_loadaddr)
81 $(call if_changed,uimage)
82 @$(kecho) ' Image $@ is ready'
84 $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
85 $(Q)$(MAKE) $(build)=$(obj)/bootp $@
88 $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
89 $(call if_changed,objcopy)
90 @$(kecho) ' Kernel: $@ is ready'
94 @test "$(INITRD_PHYS)" != "" || \
95 (echo This machine does not support INITRD; exit -1)
96 @test "$(INITRD)" != "" || \
97 (echo You must specify INITRD; exit -1)
100 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
101 $(obj)/Image System.map "$(INSTALL_PATH)"
103 zinstall: $(obj)/zImage
104 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
105 $(obj)/zImage System.map "$(INSTALL_PATH)"
107 uinstall: $(obj)/uImage
108 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
109 $(obj)/uImage System.map "$(INSTALL_PATH)"
112 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
113 $(obj)/zImage System.map "$(INSTALL_PATH)"
116 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
117 $(obj)/Image System.map "$(INSTALL_PATH)"
119 subdir- := bootp compressed dts