mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 03:32:13 +02:00
linux-yocto/6.12: riscv: Enable TUNE_FEATURES based KERNEL_FEATURES
Allow the risc-v TUNE_FEATURES to select specific ISA (kconfig) selections
in the kernel config via config fragments selected by KERNEL_FEATURES.
This allows the following items to be selected dynamically:
CONFIG_ARCH_RV32I
CONFIG_ARCH_RV64I
CONFIG_FPU
CONFIG_RISCV_ISA_C
CONFIG_RISCV_ISA_V
CONFIG_RISCV_ISA_ZBB
CONFIG_RISCV_ISA_ZICBOM
CONFIG_RISCV_ISA_ZICBOZ
CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
Note: Some ISA options, such as CONFIG_RISCV_ISA_C may be reenabled by other
options such as CONFIG_EFI. This is properly reported by the configuration
tooling.
(From OE-Core rev: 45a1b5aa6abc9007d0d87efc2d740b5564a209dd)
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
348ef80f27
commit
cd389a7461
@@ -37,6 +37,22 @@ KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'cfg/
|
||||
KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
|
||||
KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vfat', 'cfg/fs/vfat.scc', '', d)}"
|
||||
|
||||
KERNEL_FEATURES_RISCV = "\
|
||||
arch/riscv/tunes/riscv-isa-clear.scc \
|
||||
${@bb.utils.contains( 'TUNE_FEATURES', 'rv 32 i m a', 'arch/riscv/tunes/riscv-isa-rv32i.scc', '', d)} \
|
||||
${@bb.utils.contains( 'TUNE_FEATURES', 'rv 64 i m a', 'arch/riscv/tunes/riscv-isa-rv64i.scc', '', d)} \
|
||||
${@bb.utils.contains( 'TUNE_FEATURES', 'f d', 'arch/riscv/tunes/riscv-isa-fpu.scc', '', d)} \
|
||||
${@bb.utils.contains( 'TUNE_FEATURES', 'c', 'arch/riscv/tunes/riscv-isa-c.scc', '', d)} \
|
||||
${@bb.utils.contains( 'TUNE_FEATURES', 'v', 'arch/riscv/tunes/riscv-isa-v.scc', '', d)} \
|
||||
${@bb.utils.contains_any('TUNE_FEATURES', 'b zba', 'arch/riscv/tunes/riscv-isa-zba.scc', '', d)} \
|
||||
${@bb.utils.contains_any('TUNE_FEATURES', 'b zbb', 'arch/riscv/tunes/riscv-isa-zbb.scc', '', d)} \
|
||||
${@bb.utils.contains( 'TUNE_FEATURES', 'zbc', 'arch/riscv/tunes/riscv-isa-zbc.scc', '', d)} \
|
||||
${@bb.utils.contains( 'TUNE_FEATURES', 'zicbom', 'arch/riscv/tunes/riscv-isa-zicbom.scc', '', d)} \
|
||||
"
|
||||
|
||||
KERNEL_FEATURES:append:riscv32 = " ${KERNEL_FEATURES_RISCV}"
|
||||
KERNEL_FEATURES:append:riscv64 = " ${KERNEL_FEATURES_RISCV}"
|
||||
|
||||
# A KMACHINE is the mapping of a yocto $MACHINE to what is built
|
||||
# by the kernel. This is typically the branch that should be built,
|
||||
# and it can be specific to the machine or shared
|
||||
|
||||
Reference in New Issue
Block a user