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 11MKIMAGE := $(srctree)/scripts/mkuboot.sh 12 13ifneq ($(MACHINE),) 14include $(srctree)/$(MACHINE)/Makefile.boot 15endif 16 17# Note: the following conditions must always be true: 18# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) 19# PARAMS_PHYS must be within 4MB of ZRELADDR 20# INITRD_PHYS must be in RAM 21ZRELADDR := $(zreladdr-y) 22PARAMS_PHYS := $(params_phys-y) 23INITRD_PHYS := $(initrd_phys-y) 24 25export ZRELADDR INITRD_PHYS PARAMS_PHYS 26 27targets := Image zImage xipImage bootpImage uImage 28 29ifeq ($(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 40else 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 57endif 58 59quiet_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 77initrd: 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 83install: $(obj)/Image 84 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ 85 $(obj)/Image System.map "$(INSTALL_PATH)" 86 87zinstall: $(obj)/zImage 88 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ 89 $(obj)/zImage System.map "$(INSTALL_PATH)" 90 91subdir- := bootp compressed 92