2 # arch/arm/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
8 # Copyright (C) 1995-2002 Russell King
11 MKIMAGE := $(srctree)/scripts/mkuboot.sh
14 include $(srctree)/$(MACHINE)/Makefile.boot
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)
25 export ZRELADDR INITRD_PHYS PARAMS_PHYS
27 targets := Image zImage xipImage bootpImage uImage
29 ifeq ($(CONFIG_XIP_KERNEL),y)
31 $(obj)/xipImage: vmlinux FORCE
32 $(call if_changed,objcopy)
33 @echo ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))'
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'
42 $(obj)/xipImage: FORCE
43 @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)'
46 $(obj)/Image: vmlinux FORCE
47 $(call if_changed,objcopy)
48 @echo ' Kernel: $@ is ready'
50 $(obj)/compressed/vmlinux: $(obj)/Image FORCE
51 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
53 $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
54 $(call if_changed,objcopy)
55 @echo ' Kernel: $@ is ready'
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 $< $@
64 $(obj)/uImage: $(obj)/zImage FORCE
65 $(call if_changed,uimage)
66 @echo ' Image $@ is ready'
68 $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
69 $(Q)$(MAKE) $(build)=$(obj)/bootp $@
72 $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
73 $(call if_changed,objcopy)
74 @echo ' Kernel: $@ is ready'
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)
84 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
85 $(obj)/Image System.map "$(INSTALL_PATH)"
87 zinstall: $(obj)/zImage
88 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
89 $(obj)/zImage System.map "$(INSTALL_PATH)"
91 subdir- := bootp compressed