18c2ecf20Sopenharmony_ci# 28c2ecf20Sopenharmony_ci# arch/arm/boot/Makefile 38c2ecf20Sopenharmony_ci# 48c2ecf20Sopenharmony_ci# This file is included by the global makefile so that you can add your own 58c2ecf20Sopenharmony_ci# architecture-specific flags and dependencies. 68c2ecf20Sopenharmony_ci# 78c2ecf20Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public 88c2ecf20Sopenharmony_ci# License. See the file "COPYING" in the main directory of this archive 98c2ecf20Sopenharmony_ci# for more details. 108c2ecf20Sopenharmony_ci# 118c2ecf20Sopenharmony_ci# Copyright (C) 1995-2002 Russell King 128c2ecf20Sopenharmony_ci# 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciOBJCOPYFLAGS :=-O binary -R .comment -S 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciifneq ($(MACHINE),) 178c2ecf20Sopenharmony_ciinclude $(MACHINE)/Makefile.boot 188c2ecf20Sopenharmony_ciendif 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci# Note: the following conditions must always be true: 218c2ecf20Sopenharmony_ci# ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET) 228c2ecf20Sopenharmony_ci# PARAMS_PHYS must be within 4MB of ZRELADDR 238c2ecf20Sopenharmony_ci# INITRD_PHYS must be in RAM 248c2ecf20Sopenharmony_ciZRELADDR := $(zreladdr-y) 258c2ecf20Sopenharmony_ciPARAMS_PHYS := $(params_phys-y) 268c2ecf20Sopenharmony_ciINITRD_PHYS := $(initrd_phys-y) 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciexport ZRELADDR INITRD_PHYS PARAMS_PHYS 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_citargets := Image zImage xipImage bootpImage uImage 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciifeq ($(CONFIG_XIP_KERNEL),y) 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_cicmd_deflate_xip_data = $(CONFIG_SHELL) -c \ 358c2ecf20Sopenharmony_ci '$(srctree)/$(src)/deflate_xip_data.sh $< $@' 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciifeq ($(CONFIG_XIP_DEFLATED_DATA),y) 388c2ecf20Sopenharmony_ciquiet_cmd_mkxip = XIPZ $@ 398c2ecf20Sopenharmony_cicmd_mkxip = $(cmd_objcopy) && $(cmd_deflate_xip_data) 408c2ecf20Sopenharmony_cielse 418c2ecf20Sopenharmony_ciquiet_cmd_mkxip = $(quiet_cmd_objcopy) 428c2ecf20Sopenharmony_cicmd_mkxip = $(cmd_objcopy) 438c2ecf20Sopenharmony_ciendif 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci$(obj)/xipImage: vmlinux FORCE 468c2ecf20Sopenharmony_ci $(call if_changed,mkxip) 478c2ecf20Sopenharmony_ci @$(kecho) ' Physical Address of xipImage: $(CONFIG_XIP_PHYS_ADDR)' 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci$(obj)/Image $(obj)/zImage: FORCE 508c2ecf20Sopenharmony_ci @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)' 518c2ecf20Sopenharmony_ci @echo 'Only the xipImage target is available in this case' 528c2ecf20Sopenharmony_ci @false 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_cielse 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci$(obj)/xipImage: FORCE 578c2ecf20Sopenharmony_ci @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)' 588c2ecf20Sopenharmony_ci @false 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci$(obj)/Image: vmlinux FORCE 618c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ci$(obj)/compressed/vmlinux: $(obj)/Image FORCE 648c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci$(obj)/zImage: $(obj)/compressed/vmlinux FORCE 678c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ciendif 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ciifneq ($(LOADADDR),) 728c2ecf20Sopenharmony_ci UIMAGE_LOADADDR=$(LOADADDR) 738c2ecf20Sopenharmony_cielse 748c2ecf20Sopenharmony_ci ifeq ($(CONFIG_ZBOOT_ROM),y) 758c2ecf20Sopenharmony_ci UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT) 768c2ecf20Sopenharmony_ci else 778c2ecf20Sopenharmony_ci UIMAGE_LOADADDR=$(ZRELADDR) 788c2ecf20Sopenharmony_ci endif 798c2ecf20Sopenharmony_ciendif 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_cicheck_for_multiple_loadaddr = \ 828c2ecf20Sopenharmony_ciif [ $(words $(UIMAGE_LOADADDR)) -ne 1 ]; then \ 838c2ecf20Sopenharmony_ci echo 'multiple (or no) load addresses: $(UIMAGE_LOADADDR)'; \ 848c2ecf20Sopenharmony_ci echo 'This is incompatible with uImages'; \ 858c2ecf20Sopenharmony_ci echo 'Specify LOADADDR on the commandline to build an uImage'; \ 868c2ecf20Sopenharmony_ci false; \ 878c2ecf20Sopenharmony_cifi 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci$(obj)/uImage: $(obj)/zImage FORCE 908c2ecf20Sopenharmony_ci @$(check_for_multiple_loadaddr) 918c2ecf20Sopenharmony_ci $(call if_changed,uimage) 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci$(obj)/bootp/bootp: $(obj)/zImage initrd FORCE 948c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=$(obj)/bootp $@ 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci$(obj)/bootpImage: $(obj)/bootp/bootp FORCE 978c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ciPHONY += initrd install zinstall uinstall 1008c2ecf20Sopenharmony_ciinitrd: 1018c2ecf20Sopenharmony_ci @test "$(INITRD_PHYS)" != "" || \ 1028c2ecf20Sopenharmony_ci (echo This machine does not support INITRD; exit -1) 1038c2ecf20Sopenharmony_ci @test "$(INITRD)" != "" || \ 1048c2ecf20Sopenharmony_ci (echo You must specify INITRD; exit -1) 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ciinstall: 1078c2ecf20Sopenharmony_ci $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ 1088c2ecf20Sopenharmony_ci $(obj)/Image System.map "$(INSTALL_PATH)" 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_cizinstall: 1118c2ecf20Sopenharmony_ci $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ 1128c2ecf20Sopenharmony_ci $(obj)/zImage System.map "$(INSTALL_PATH)" 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ciuinstall: 1158c2ecf20Sopenharmony_ci $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ 1168c2ecf20Sopenharmony_ci $(obj)/uImage System.map "$(INSTALL_PATH)" 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_cisubdir- := bootp compressed dts 119