Lines Matching +full:- +full:boot
2 # architecture-specific flags and dependencies.
9 LDFLAGS_vmlinux := -z norelro
11 LDFLAGS_vmlinux += -shared -Bsymbolic -z notext
12 KBUILD_CFLAGS += -fPIE
15 LDFLAGS_vmlinux += --no-relax
16 KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
18 CC_FLAGS_FTRACE := -fpatchable-function-entry=8,4
20 CC_FLAGS_FTRACE := -fpatchable-function-entry=4,2
25 KBUILD_CFLAGS_MODULE += -mcmodel=medany
33 KBUILD_CFLAGS += -mabi=lp64
34 KBUILD_AFLAGS += -mabi=lp64
36 KBUILD_LDFLAGS += -melf64lriscv
38 KBUILD_RUSTFLAGS += -Ctarget-cpu=generic-rv64 --target=riscv64imac-unknown-none-elf \
39 -Cno-redzone
44 KBUILD_CFLAGS += -mabi=ilp32
45 KBUILD_AFLAGS += -mabi=ilp32
46 KBUILD_LDFLAGS += -melf32lriscv
50 KBUILD_CFLAGS += -mno-relax
51 KBUILD_AFLAGS += -mno-relax
53 KBUILD_CFLAGS += -Wa,-mno-relax
54 KBUILD_AFLAGS += -Wa,-mno-relax
56 # LLVM has an issue with target-features and LTO: https://github.com/llvm/llvm-project/issues/59350
58 # be incorrect: https://github.com/llvm/llvm-project/issues/65090
60 KBUILD_LDFLAGS += -mllvm -mattr=+c -mllvm -mattr=+relax
64 KBUILD_LDFLAGS += --no-relax-gp
68 riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
69 riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
70 riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
71 riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
72 riscv-march-$(CONFIG_RISCV_ISA_V) := $(riscv-march-y)v
75 KBUILD_RUSTFLAGS += -Ctarget-feature=-c
79 KBUILD_CFLAGS += -Wa,-misa-spec=2.2
80 KBUILD_AFLAGS += -Wa,-misa-spec=2.2
82 riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei
86 riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZACAS) := $(riscv-march-y)_zacas
89 riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZABHA) := $(riscv-march-y)_zabha
92 # matching non-v and non-multi-letter extensions out with the filter ([^v_]*)
93 KBUILD_CFLAGS += -march=$(shell echo $(riscv-march-y) | sed -E 's/(rv32ima|rv64ima)fd([^v_]*)v?/\1\…
95 KBUILD_AFLAGS += -march=$(riscv-march-y)
97 # For C code built with floating-point support, exclude V but keep F and D.
98 CC_FLAGS_FPU := -march=$(shell echo $(riscv-march-y) | sed -E 's/(rv32ima|rv64ima)([^v_]*)v?/\1\2/…
100 KBUILD_CFLAGS += -mno-save-restore
103 KBUILD_CFLAGS += -mcmodel=medlow
106 KBUILD_CFLAGS += -mcmodel=medany
110 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
112 # The RISC-V attributes frequently cause compatibility issues and provide no
114 KBUILD_CFLAGS += $(call cc-option,-mno-riscv-attribute)
115 KBUILD_AFLAGS += $(call cc-option,-mno-riscv-attribute)
116 KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mno-arch-attr)
117 KBUILD_AFLAGS += $(call as-option,-Wa$(comma)-mno-arch-attr)
119 KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
120 KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)
122 # GCC versions that support the "-mstrict-align" option default to allowing
124 # RISC-V ISA, they're emulated by machine mode traps on all extant
127 KBUILD_CFLAGS += $(call cc-option,-mstrict-align)
133 $(eval KBUILD_CFLAGS += -mstack-protector-guard=tls \
134 -mstack-protector-guard-reg=tp \
135 -mstack-protector-guard-offset=$(shell \
137 $(objtree)/include/generated/asm-offsets.h))
141 CHECKFLAGS += -D__riscv -D__riscv_xlen=$(BITS)
144 boot := arch/riscv/boot macro
146 KBUILD_IMAGE := $(boot)/xipImage
149 KBUILD_IMAGE := $(boot)/loader.bin
152 KBUILD_IMAGE := $(boot)/Image.gz
154 KBUILD_IMAGE := $(boot)/vmlinuz.efi
159 boot := arch/riscv/boot macro
160 boot-image-y := Image
161 boot-image-$(CONFIG_KERNEL_BZIP2) := Image.bz2
162 boot-image-$(CONFIG_KERNEL_GZIP) := Image.gz
163 boot-image-$(CONFIG_KERNEL_LZ4) := Image.lz4
164 boot-image-$(CONFIG_KERNEL_LZMA) := Image.lzma
165 boot-image-$(CONFIG_KERNEL_LZO) := Image.lzo
166 boot-image-$(CONFIG_KERNEL_ZSTD) := Image.zst
167 boot-image-$(CONFIG_KERNEL_XZ) := Image.xz
169 boot-image-$(CONFIG_ARCH_CANAAN) := loader.bin
171 boot-image-$(CONFIG_EFI_ZBOOT) := vmlinuz.efi
172 boot-image-$(CONFIG_XIP_KERNEL) := xipImage
173 KBUILD_IMAGE := $(boot)/$(boot-image-y)
175 libs-y += arch/riscv/lib/
176 libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
182 $(Q)$(MAKE) $(build)=arch/riscv/kernel/vdso include/generated/vdso-offsets.h
184 $(build)=arch/riscv/kernel/compat_vdso include/generated/compat_vdso-offsets.h)
189 vdso-install-y += arch/riscv/kernel/vdso/vdso.so.dbg
190 vdso-install-$(CONFIG_COMPAT) += arch/riscv/kernel/compat_vdso/compat_vdso.so.dbg
200 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
201 @$(kecho) ' Kernel: $(boot)/$@ is ready'
210 $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/riscv/configs/32-bit.config \
211 -f $(srctree)/Makefile randconfig
215 $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/riscv/configs/64-bit.config \
216 -f $(srctree)/Makefile randconfig
220 $(Q)$(MAKE) -f $(srctree)/Makefile defconfig 32-bit.config
224 $(Q)$(MAKE) -f $(srctree)/Makefile nommu_virt_defconfig 32-bit.config
227 echo ' Image - Uncompressed kernel image (arch/riscv/boot/Image)'
228 echo ' Image.gz - Compressed kernel image (arch/riscv/boot/Image.gz)'
229 echo ' Image.bz2 - Compressed kernel image (arch/riscv/boot/Image.bz2)'
230 echo ' Image.lz4 - Compressed kernel image (arch/riscv/boot/Image.lz4)'
231 echo ' Image.lzma - Compressed kernel image (arch/riscv/boot/Image.lzma)'
232 echo ' Image.lzo - Compressed kernel image (arch/riscv/boot/Image.lzo)'
233 echo ' Image.zst - Compressed kernel image (arch/riscv/boot/Image.zst)'
234 echo ' Image.xz - Compressed kernel image (arch/riscv/boot/Image.xz)'
235 echo ' vmlinuz.efi - Compressed EFI kernel image (arch/riscv/boot/vmlinuz.efi)'
237 echo ' xipImage - Execute-in-place kernel image (arch/riscv/boot/xipImage)'
239 echo ' install - Install kernel using (your) ~/bin/$(INSTALLKERNEL) or'