summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2025-07-02 16:44:23 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-10 10:47:31 +0100
commitcd389a7461e804142d438d5c36a19bd9fff36e5b (patch)
tree4bf98546cd66b3c9dee0043120ba9d40e1588c2c
parent348ef80f275d36e965bc1f656a170bbce23f224a (diff)
downloadpoky-cd389a7461e804142d438d5c36a19bd9fff36e5b.tar.gz
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>
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 389329030d..4d0a726bb6 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -37,6 +37,22 @@ KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'cfg/
37KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}" 37KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}"
38KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vfat', 'cfg/fs/vfat.scc', '', d)}" 38KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vfat', 'cfg/fs/vfat.scc', '', d)}"
39 39
40KERNEL_FEATURES_RISCV = "\
41 arch/riscv/tunes/riscv-isa-clear.scc \
42 ${@bb.utils.contains( 'TUNE_FEATURES', 'rv 32 i m a', 'arch/riscv/tunes/riscv-isa-rv32i.scc', '', d)} \
43 ${@bb.utils.contains( 'TUNE_FEATURES', 'rv 64 i m a', 'arch/riscv/tunes/riscv-isa-rv64i.scc', '', d)} \
44 ${@bb.utils.contains( 'TUNE_FEATURES', 'f d', 'arch/riscv/tunes/riscv-isa-fpu.scc', '', d)} \
45 ${@bb.utils.contains( 'TUNE_FEATURES', 'c', 'arch/riscv/tunes/riscv-isa-c.scc', '', d)} \
46 ${@bb.utils.contains( 'TUNE_FEATURES', 'v', 'arch/riscv/tunes/riscv-isa-v.scc', '', d)} \
47 ${@bb.utils.contains_any('TUNE_FEATURES', 'b zba', 'arch/riscv/tunes/riscv-isa-zba.scc', '', d)} \
48 ${@bb.utils.contains_any('TUNE_FEATURES', 'b zbb', 'arch/riscv/tunes/riscv-isa-zbb.scc', '', d)} \
49 ${@bb.utils.contains( 'TUNE_FEATURES', 'zbc', 'arch/riscv/tunes/riscv-isa-zbc.scc', '', d)} \
50 ${@bb.utils.contains( 'TUNE_FEATURES', 'zicbom', 'arch/riscv/tunes/riscv-isa-zicbom.scc', '', d)} \
51 "
52
53KERNEL_FEATURES:append:riscv32 = " ${KERNEL_FEATURES_RISCV}"
54KERNEL_FEATURES:append:riscv64 = " ${KERNEL_FEATURES_RISCV}"
55
40# A KMACHINE is the mapping of a yocto $MACHINE to what is built 56# A KMACHINE is the mapping of a yocto $MACHINE to what is built
41# by the kernel. This is typically the branch that should be built, 57# by the kernel. This is typically the branch that should be built,
42# and it can be specific to the machine or shared 58# and it can be specific to the machine or shared