^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # arch/arm64/Makefile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) # This file is included by the global makefile so that you can add your own
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) # architecture-specific flags and dependencies.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) # This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) # License. See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) # for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) # Copyright (C) 1995-2001 by Russell King
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) LDFLAGS_vmlinux :=--no-undefined -X --no-warn-rwx-segments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) ifeq ($(CONFIG_RELOCATABLE), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) # Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) # for relative relocs, since this leads to better Image compression
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) # with the relocation offsets always being zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) LDFLAGS_vmlinux += -shared -Bsymbolic -z notext \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) $(call ld-option, --no-apply-dynamic-relocs)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) ifeq ($(call ld-option, --fix-cortex-a53-843419),)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) $(warning ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) LDFLAGS_vmlinux += --fix-cortex-a53-843419
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) ifneq ($(CONFIG_ARM64_LSE_ATOMICS), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) $(warning LSE atomics not supported by binutils)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) cc_has_k_constraint := $(call try-run,echo \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 'int main(void) { \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) asm volatile("and w0, w0, %w0" :: "K" (4294967295)); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) return 0; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) }' | $(CC) -S -x c -o "$$TMP" -,,-DCONFIG_CC_HAS_K_CONSTRAINT=1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) ifeq ($(CONFIG_BROKEN_GAS_INST),y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) $(warning Detected assembler with broken .inst; disassembly will be unreliable)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) KBUILD_CFLAGS += -mgeneral-regs-only \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) $(compat_vdso) $(cc_has_k_constraint)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) KBUILD_CFLAGS += $(call cc-disable-warning, psabi)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) KBUILD_AFLAGS += $(compat_vdso)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) KBUILD_CFLAGS += $(call cc-option,-mabi=lp64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) KBUILD_AFLAGS += $(call cc-option,-mabi=lp64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) # Avoid generating .eh_frame* sections.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) KBUILD_AFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) prepare: stack_protector_prepare
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) stack_protector_prepare: prepare0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) $(eval KBUILD_CFLAGS += -mstack-protector-guard=sysreg \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) -mstack-protector-guard-reg=sp_el0 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) -mstack-protector-guard-offset=$(shell \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) awk '{if ($$2 == "TSK_STACK_CANARY") print $$3;}' \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) include/generated/asm-offsets.h))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) # Ensure that if the compiler supports branch protection we default it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) # off, this will be overridden if we are using branch protection.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) branch-prot-flags-y += $(call cc-option,-mbranch-protection=none)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) ifeq ($(CONFIG_ARM64_PTR_AUTH),y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) branch-prot-flags-$(CONFIG_CC_HAS_SIGN_RETURN_ADDRESS) := -msign-return-address=all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) # We enable additional protection for leaf functions as there is some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) # narrow potential for ROP protection benefits and no substantial
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) # performance impact has been observed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) ifeq ($(CONFIG_ARM64_BTI_KERNEL),y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) branch-prot-flags-$(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI) := -mbranch-protection=pac-ret+leaf+bti
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) branch-prot-flags-$(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET) := -mbranch-protection=pac-ret+leaf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) # -march=armv8.3-a enables the non-nops instructions for PAC, to avoid the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) # compiler to generate them and consequently to break the single image contract
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) # we pass it only to the assembler. This option is utilized only in case of non
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) # integrated assemblers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) ifeq ($(CONFIG_AS_HAS_PAC), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) asm-arch := armv8.3-a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) KBUILD_CFLAGS += $(branch-prot-flags-y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) ifeq ($(CONFIG_AS_HAS_ARMV8_4), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) # make sure to pass the newest target architecture to -march.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) asm-arch := armv8.4-a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) ifeq ($(CONFIG_AS_HAS_ARMV8_5), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) # make sure to pass the newest target architecture to -march.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) asm-arch := armv8.5-a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) ifdef asm-arch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) KBUILD_CFLAGS += -Wa,-march=$(asm-arch) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) -DARM64_ASM_ARCH='"$(asm-arch)"'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) ifeq ($(CONFIG_SHADOW_CALL_STACK), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) KBUILD_CFLAGS += -ffixed-x18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) KBUILD_CPPFLAGS += -mbig-endian
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) CHECKFLAGS += -D__AARCH64EB__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) # Prefer the baremetal ELF build target, but not all toolchains include
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) # it so fall back to the standard linux version if needed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) KBUILD_LDFLAGS += -EB $(call ld-option, -maarch64elfb, -maarch64linuxb -z norelro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) UTS_MACHINE := aarch64_be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) KBUILD_CPPFLAGS += -mlittle-endian
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) CHECKFLAGS += -D__AARCH64EL__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) # Same as above, prefer ELF but fall back to linux target if needed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) KBUILD_LDFLAGS += -EL $(call ld-option, -maarch64elf, -maarch64linux -z norelro)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) UTS_MACHINE := aarch64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) ifeq ($(CONFIG_LD_IS_LLD), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) KBUILD_LDFLAGS += -z norelro
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) CHECKFLAGS += -D__aarch64__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) CC_FLAGS_FTRACE := -fpatchable-function-entry=2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) # Default value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) head-y := arch/arm64/kernel/head.o
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) ifeq ($(CONFIG_KASAN_SW_TAGS), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) KASAN_SHADOW_SCALE_SHIFT := 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) else ifeq ($(CONFIG_KASAN_GENERIC), y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) KASAN_SHADOW_SCALE_SHIFT := 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) core-y += arch/arm64/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) libs-y := arch/arm64/lib/ $(libs-y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) # Default target when executing plain make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) boot := arch/arm64/boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) KBUILD_IMAGE := $(boot)/Image
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) # Don't compile Image in mixed build with "all" target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) ifndef KBUILD_MIXED_TREE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) all: Image.gz
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) Image: vmlinux
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) Image.%: Image
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) zinstall install:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) $(Q)$(MAKE) $(build)=$(boot) $@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) PHONY += vdso_install
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) vdso_install:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) $(if $(CONFIG_COMPAT_VDSO), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso32 $@)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) # We use MRPROPER_FILES and CLEAN_FILES now
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) archclean:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) $(Q)$(MAKE) $(clean)=$(boot)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) ifeq ($(KBUILD_EXTMOD),)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) # We need to generate vdso-offsets.h before compiling certain files in kernel/.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) # In order to do that, we should use the archprepare target, but we can't since
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) # asm-offsets.h is included in some files used to generate vdso-offsets.h, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) # asm-offsets.h is built in prepare0, for which archprepare is a dependency.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) # Therefore we need to generate the header after prepare0 has been made, hence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) # this hack.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) prepare: vdso_prepare
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) vdso_prepare: prepare0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso include/generated/vdso-offsets.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) $(if $(CONFIG_COMPAT_VDSO),$(Q)$(MAKE) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) $(build)=arch/arm64/kernel/vdso32 \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) include/generated/vdso32-offsets.h)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) define archhelp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) echo ' install - Install uncompressed kernel'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) echo ' zinstall - Install compressed kernel'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) echo ' Install using (your) ~/bin/installkernel or'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) echo ' (distribution) /sbin/installkernel or'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) echo ' install to $$(INSTALL_PATH) and run lilo'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) endef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) MAKE_MODULES ?= y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) %.img:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) ifeq ("$(CONFIG_MODULES)$(MAKE_MODULES)$(srctree)","yy$(objtree)")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) $(Q)$(MAKE) rockchip/$*.dtb Image.lz4 modules
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) $(Q)$(MAKE) rockchip/$*.dtb Image.lz4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) $(Q)$(srctree)/scripts/mkimg --dtb $*.dtb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) CLEAN_DIRS += out
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) CLEAN_FILES += boot.img kernel.img resource.img zboot.img