1# 2# arch/arm/boot/Makefile 3# 4# This file is included by the global makefile so that you can add your own 5# architecture-specific flags and dependencies. 6# 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 14OBJCOPYFLAGS :=-O binary -R .comment -S 15 16ifneq ($(MACHINE),) 17include $(MACHINE)/Makefile.boot 18endif 19 20# Note: the following conditions must always be true: 21# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) 22# PARAMS_PHYS must be within 4MB of ZRELADDR 23# INITRD_PHYS must be in RAM 24ZRELADDR := $(zreladdr-y) 25PARAMS_PHYS := $(params_phys-y) 26INITRD_PHYS := $(initrd_phys-y) 27 28export ZRELADDR INITRD_PHYS PARAMS_PHYS 29 30targets := Image zImage xipImage bootpImage uImage 31 32ifeq ($(CONFIG_XIP_KERNEL),y) 33 34$(obj)/xipImage: vmlinux FORCE 35 $(call if_changed,objcopy) 36 @$(kecho) ' Physical Address of xipImage: $(CONFIG_XIP_PHYS_ADDR)' 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) 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) 57 58endif 59 60ifneq ($(LOADADDR),) 61 UIMAGE_LOADADDR=$(LOADADDR) 62else 63 ifeq ($(CONFIG_ZBOOT_ROM),y) 64 UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) 65 else 66 UIMAGE_LOADADDR=$(ZRELADDR) 67 endif 68endif 69 70check_for_multiple_loadaddr = \ 71if [ $(words $(UIMAGE_LOADADDR)) -ne 1 ]; then \ 72 echo 'multiple (or no) load addresses: $(UIMAGE_LOADADDR)'; \ 73 echo 'This is incompatible with uImages'; \ 74 echo 'Specify LOADADDR on the commandline to build an uImage'; \ 75 false; \ 76fi 77 78$(obj)/uImage: $(obj)/zImage FORCE 79 @$(check_for_multiple_loadaddr) 80 $(call if_changed,uimage) 81 82$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE 83 $(Q)$(MAKE) $(build)=$(obj)/bootp $@ 84 85$(obj)/bootpImage: $(obj)/bootp/bootp FORCE 86 $(call if_changed,objcopy) 87 88PHONY += initrd install zinstall uinstall 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 95install: 96 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ 97 $(obj)/Image System.map "$(INSTALL_PATH)" 98 99zinstall: 100 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ 101 $(obj)/zImage System.map "$(INSTALL_PATH)" 102 103uinstall: 104 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ 105 $(obj)/uImage System.map "$(INSTALL_PATH)" 106 107subdir- := bootp compressed dts 108