18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci# 38c2ecf20Sopenharmony_ci# linux/arch/parisc/boot/compressed/Makefile 48c2ecf20Sopenharmony_ci# 58c2ecf20Sopenharmony_ci# create a compressed self-extracting vmlinux image from the original vmlinux 68c2ecf20Sopenharmony_ci# 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciKCOV_INSTRUMENT := n 98c2ecf20Sopenharmony_ciGCOV_PROFILE := n 108c2ecf20Sopenharmony_ciUBSAN_SANITIZE := n 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_citargets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 138c2ecf20Sopenharmony_citargets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4 148c2ecf20Sopenharmony_citargets += misc.o piggy.o sizes.h head.o real2.o firmware.o 158c2ecf20Sopenharmony_citargets += real2.S firmware.c 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciKBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER 188c2ecf20Sopenharmony_ciKBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING 198c2ecf20Sopenharmony_ciKBUILD_CFLAGS += -fno-strict-aliasing 208c2ecf20Sopenharmony_ciKBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks -fno-builtin-printf 218c2ecf20Sopenharmony_ciKBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os 228c2ecf20Sopenharmony_ciifndef CONFIG_64BIT 238c2ecf20Sopenharmony_ciKBUILD_CFLAGS += -mfast-indirect-calls 248c2ecf20Sopenharmony_ciendif 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ciOBJECTS += $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o $(obj)/piggy.o 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciLDFLAGS_vmlinux := -X -e startup --as-needed -T 298c2ecf20Sopenharmony_ci$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(LIBGCC) 308c2ecf20Sopenharmony_ci $(call if_changed,ld) 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_cised-sizes := -e 's/^\([0-9a-fA-F]*\) . \(__bss_start\|_end\|parisc_kernel_start\)$$/\#define SZ\2 0x\1/p' 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciquiet_cmd_sizes = GEN $@ 358c2ecf20Sopenharmony_ci cmd_sizes = $(NM) $< | sed -n $(sed-sizes) > $@ 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci$(obj)/sizes.h: vmlinux 388c2ecf20Sopenharmony_ci $(call if_changed,sizes) 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ciAFLAGS_head.o += -I$(objtree)/$(obj) -DBOOTLOADER 418c2ecf20Sopenharmony_ci$(obj)/head.o: $(obj)/sizes.h 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ciCFLAGS_misc.o += -I$(objtree)/$(obj) 448c2ecf20Sopenharmony_ci$(obj)/misc.o: $(obj)/sizes.h 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci$(obj)/firmware.o: $(obj)/firmware.c 478c2ecf20Sopenharmony_ci$(obj)/firmware.c: $(srctree)/arch/$(SRCARCH)/kernel/firmware.c 488c2ecf20Sopenharmony_ci $(call cmd,shipped) 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ciAFLAGS_real2.o += -DBOOTLOADER 518c2ecf20Sopenharmony_ci$(obj)/real2.o: $(obj)/real2.S 528c2ecf20Sopenharmony_ci$(obj)/real2.S: $(srctree)/arch/$(SRCARCH)/kernel/real2.S 538c2ecf20Sopenharmony_ci $(call cmd,shipped) 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci$(obj)/misc.o: $(obj)/sizes.h 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ciCPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER 588c2ecf20Sopenharmony_ci$(obj)/vmlinux.lds: $(obj)/sizes.h 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciOBJCOPYFLAGS_vmlinux.bin := -R .comment -R .note -S 618c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin: vmlinux FORCE 628c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_civmlinux.bin.all-y := $(obj)/vmlinux.bin 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_GZIP) := gz 678c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_BZIP2) := bz2 688c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_LZ4) := lz4 698c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_LZMA) := lzma 708c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_LZO) := lzo 718c2ecf20Sopenharmony_cisuffix-$(CONFIG_KERNEL_XZ) := xz 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) 748c2ecf20Sopenharmony_ci $(call if_changed,gzip) 758c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) 768c2ecf20Sopenharmony_ci $(call if_changed,bzip2) 778c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y) 788c2ecf20Sopenharmony_ci $(call if_changed,lz4) 798c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) 808c2ecf20Sopenharmony_ci $(call if_changed,lzma) 818c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) 828c2ecf20Sopenharmony_ci $(call if_changed,lzo) 838c2ecf20Sopenharmony_ci$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) 848c2ecf20Sopenharmony_ci $(call if_changed,xzkern) 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ciLDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T 878c2ecf20Sopenharmony_ci$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) 888c2ecf20Sopenharmony_ci $(call if_changed,ld) 89