18c2ecf20Sopenharmony_ci# 28c2ecf20Sopenharmony_ci# arch/sh/boot/Makefile 38c2ecf20Sopenharmony_ci# 48c2ecf20Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public 58c2ecf20Sopenharmony_ci# License. See the file "COPYING" in the main directory of this archive 68c2ecf20Sopenharmony_ci# for more details. 78c2ecf20Sopenharmony_ci# 88c2ecf20Sopenharmony_ci# Copyright (C) 1999 Stuart Menefy 98c2ecf20Sopenharmony_ci# 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci# 128c2ecf20Sopenharmony_ci# Assign safe dummy values if these variables are not defined, 138c2ecf20Sopenharmony_ci# in order to suppress error message. 148c2ecf20Sopenharmony_ci# 158c2ecf20Sopenharmony_ciCONFIG_PAGE_OFFSET ?= 0x80000000 168c2ecf20Sopenharmony_ciCONFIG_MEMORY_START ?= 0x0c000000 178c2ecf20Sopenharmony_ciCONFIG_BOOT_LINK_OFFSET ?= 0x00800000 188c2ecf20Sopenharmony_ciCONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 198c2ecf20Sopenharmony_ciCONFIG_ENTRY_OFFSET ?= 0x00001000 208c2ecf20Sopenharmony_ciCONFIG_PHYSICAL_START ?= $(CONFIG_MEMORY_START) 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cisuffix-y := bin 238c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_GZIP) := gz 248c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_BZIP2) := bz2 258c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_LZMA) := lzma 268c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_XZ) := xz 278c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_LZO) := lzo 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_citargets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \ 308c2ecf20Sopenharmony_ci uImage.bz2 uImage.lzma uImage.xz uImage.lzo uImage.bin 318c2ecf20Sopenharmony_ciextra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ 328c2ecf20Sopenharmony_ci vmlinux.bin.xz vmlinux.bin.lzo 338c2ecf20Sopenharmony_cisubdir- := compressed romimage 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci$(obj)/zImage: $(obj)/compressed/vmlinux FORCE 368c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 378c2ecf20Sopenharmony_ci @echo ' Kernel: $@ is ready' 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci$(obj)/compressed/vmlinux: FORCE 408c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci$(obj)/romImage: $(obj)/romimage/vmlinux FORCE 438c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 448c2ecf20Sopenharmony_ci @echo ' Kernel: $@ is ready' 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci$(obj)/romimage/vmlinux: $(obj)/zImage FORCE 478c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=$(obj)/romimage $@ 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciKERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \ 508c2ecf20Sopenharmony_ci $$[$(CONFIG_PHYSICAL_START) & 0x1fffffff]') 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciKERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ 538c2ecf20Sopenharmony_ci $$[$(CONFIG_PAGE_OFFSET) + \ 548c2ecf20Sopenharmony_ci $(KERNEL_MEMORY) + \ 558c2ecf20Sopenharmony_ci $(CONFIG_ZERO_PAGE_OFFSET)]') 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ciKERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \ 588c2ecf20Sopenharmony_ci $$[$(CONFIG_PAGE_OFFSET) + \ 598c2ecf20Sopenharmony_ci $(KERNEL_MEMORY) + \ 608c2ecf20Sopenharmony_ci $(CONFIG_ZERO_PAGE_OFFSET) + $(CONFIG_ENTRY_OFFSET)]') 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ciUIMAGE_LOADADDR = $(KERNEL_LOAD) 638c2ecf20Sopenharmony_ciUIMAGE_ENTRYADDR = $(KERNEL_ENTRY) 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin: vmlinux FORCE 668c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 698c2ecf20Sopenharmony_ci $(call if_changed,gzip) 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE 728c2ecf20Sopenharmony_ci $(call if_changed,bzip2) 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE 758c2ecf20Sopenharmony_ci $(call if_changed,lzma) 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE 788c2ecf20Sopenharmony_ci $(call if_changed,xzkern) 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE 818c2ecf20Sopenharmony_ci $(call if_changed,lzo) 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 848c2ecf20Sopenharmony_ci $(call if_changed,uimage,bzip2) 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz 878c2ecf20Sopenharmony_ci $(call if_changed,uimage,gzip) 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma 908c2ecf20Sopenharmony_ci $(call if_changed,uimage,lzma) 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci$(obj)/uImage.xz: $(obj)/vmlinux.bin.xz 938c2ecf20Sopenharmony_ci $(call if_changed,uimage,xz) 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci$(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo 968c2ecf20Sopenharmony_ci $(call if_changed,uimage,lzo) 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ci$(obj)/uImage.bin: $(obj)/vmlinux.bin 998c2ecf20Sopenharmony_ci $(call if_changed,uimage,none) 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ciOBJCOPYFLAGS_vmlinux.srec := -I binary -O srec 1028c2ecf20Sopenharmony_ci$(obj)/vmlinux.srec: $(obj)/compressed/vmlinux 1038c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ciOBJCOPYFLAGS_uImage.srec := -I binary -O srec 1068c2ecf20Sopenharmony_ci$(obj)/uImage.srec: $(obj)/uImage 1078c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci$(obj)/uImage: $(obj)/uImage.$(suffix-y) 1108c2ecf20Sopenharmony_ci @ln -sf $(notdir $<) $@ 1118c2ecf20Sopenharmony_ci @echo ' Image $@ is ready' 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ciexport CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \ 1148c2ecf20Sopenharmony_ci CONFIG_PHYSICAL_START CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET \ 1158c2ecf20Sopenharmony_ci KERNEL_MEMORY suffix-y 116