18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci# 38c2ecf20Sopenharmony_ci# Makefile for the linux s390-specific parts of the memory manager. 48c2ecf20Sopenharmony_ci# 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciKCOV_INSTRUMENT := n 78c2ecf20Sopenharmony_ciGCOV_PROFILE := n 88c2ecf20Sopenharmony_ciUBSAN_SANITIZE := n 98c2ecf20Sopenharmony_ciKASAN_SANITIZE := n 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciKBUILD_AFLAGS := $(KBUILD_AFLAGS_DECOMPRESSOR) 128c2ecf20Sopenharmony_ciKBUILD_CFLAGS := $(KBUILD_CFLAGS_DECOMPRESSOR) 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci# 158c2ecf20Sopenharmony_ci# Use minimum architecture for als.c to be able to print an error 168c2ecf20Sopenharmony_ci# message if the kernel is started on a machine which is too old 178c2ecf20Sopenharmony_ci# 188c2ecf20Sopenharmony_ciifndef CONFIG_CC_IS_CLANG 198c2ecf20Sopenharmony_ciCC_FLAGS_MARCH_MINIMUM := -march=z900 208c2ecf20Sopenharmony_cielse 218c2ecf20Sopenharmony_ciCC_FLAGS_MARCH_MINIMUM := -march=z10 228c2ecf20Sopenharmony_ciendif 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciifneq ($(CC_FLAGS_MARCH),$(CC_FLAGS_MARCH_MINIMUM)) 258c2ecf20Sopenharmony_ciAFLAGS_REMOVE_head.o += $(CC_FLAGS_MARCH) 268c2ecf20Sopenharmony_ciAFLAGS_head.o += $(CC_FLAGS_MARCH_MINIMUM) 278c2ecf20Sopenharmony_ciAFLAGS_REMOVE_mem.o += $(CC_FLAGS_MARCH) 288c2ecf20Sopenharmony_ciAFLAGS_mem.o += $(CC_FLAGS_MARCH_MINIMUM) 298c2ecf20Sopenharmony_ciCFLAGS_REMOVE_als.o += $(CC_FLAGS_MARCH) 308c2ecf20Sopenharmony_ciCFLAGS_als.o += $(CC_FLAGS_MARCH_MINIMUM) 318c2ecf20Sopenharmony_ciCFLAGS_REMOVE_sclp_early_core.o += $(CC_FLAGS_MARCH) 328c2ecf20Sopenharmony_ciCFLAGS_sclp_early_core.o += $(CC_FLAGS_MARCH_MINIMUM) 338c2ecf20Sopenharmony_ciendif 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciCFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciobj-y := head.o als.o startup.o mem_detect.o ipl_parm.o ipl_report.o 388c2ecf20Sopenharmony_ciobj-y += string.o ebcdic.o sclp_early_core.o mem.o ipl_vmparm.o cmdline.o 398c2ecf20Sopenharmony_ciobj-y += version.o pgm_check_info.o ctype.o text_dma.o 408c2ecf20Sopenharmony_ciobj-$(findstring y, $(CONFIG_PROTECTED_VIRTUALIZATION_GUEST) $(CONFIG_PGSTE)) += uv.o 418c2ecf20Sopenharmony_ciobj-$(CONFIG_RELOCATABLE) += machine_kexec_reloc.o 428c2ecf20Sopenharmony_ciobj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o 438c2ecf20Sopenharmony_citargets := bzImage startup.a section_cmp.boot.data section_cmp.boot.preserved.data $(obj-y) 448c2ecf20Sopenharmony_cisubdir- := compressed 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ciOBJECTS := $(addprefix $(obj)/,$(obj-y)) 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciquiet_cmd_section_cmp = SECTCMP $* 498c2ecf20Sopenharmony_cidefine cmd_section_cmp 508c2ecf20Sopenharmony_ci s1=`$(OBJDUMP) -t -j "$*" "$<" | sort | \ 518c2ecf20Sopenharmony_ci sed -n "/0000000000000000/! s/.*\s$*\s\+//p" | sha256sum`; \ 528c2ecf20Sopenharmony_ci s2=`$(OBJDUMP) -t -j "$*" "$(word 2,$^)" | sort | \ 538c2ecf20Sopenharmony_ci sed -n "/0000000000000000/! s/.*\s$*\s\+//p" | sha256sum`; \ 548c2ecf20Sopenharmony_ci if [ "$$s1" != "$$s2" ]; then \ 558c2ecf20Sopenharmony_ci echo "error: section $* differs between $< and $(word 2,$^)" >&2; \ 568c2ecf20Sopenharmony_ci exit 1; \ 578c2ecf20Sopenharmony_ci fi; \ 588c2ecf20Sopenharmony_ci touch $@ 598c2ecf20Sopenharmony_ciendef 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci$(obj)/bzImage: $(obj)/compressed/vmlinux $(obj)/section_cmp.boot.data $(obj)/section_cmp.boot.preserved.data FORCE 628c2ecf20Sopenharmony_ci $(call if_changed,objcopy) 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci$(obj)/section_cmp%: vmlinux $(obj)/compressed/vmlinux FORCE 658c2ecf20Sopenharmony_ci $(call if_changed,section_cmp) 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci$(obj)/compressed/vmlinux: $(obj)/startup.a FORCE 688c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci$(obj)/startup.a: $(OBJECTS) FORCE 718c2ecf20Sopenharmony_ci $(call if_changed,ar) 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ciinstall: 748c2ecf20Sopenharmony_ci sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \ 758c2ecf20Sopenharmony_ci System.map "$(INSTALL_PATH)" 76