diff options
| author | Mark Hatle <mark.hatle@amd.com> | 2025-07-02 16:44:23 -0500 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-07-24 12:36:37 -0700 |
| commit | 652d4c17b83c83a036a20cb618a9c6a262096a7a (patch) | |
| tree | 60085a9fdbcf8509d76f1ffc39fe45ad724eaba0 | |
| parent | 361e35893a4bef842fc73b5a296a714655cf26c1 (diff) | |
| download | poky-652d4c17b83c83a036a20cb618a9c6a262096a7a.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: 9296d038106aebfb66e3a76c4444597e2e1a2263)
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>
(cherry picked from commit 45a1b5aa6abc9007d0d87efc2d740b5564a209dd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/recipes-kernel/linux/linux-yocto.inc | 16 |
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/ | |||
| 37 | KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}" | 37 | KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'numa', 'features/numa/numa.scc', '', d)}" |
| 38 | KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vfat', 'cfg/fs/vfat.scc', '', d)}" | 38 | KERNEL_FEATURES:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'vfat', 'cfg/fs/vfat.scc', '', d)}" |
| 39 | 39 | ||
| 40 | KERNEL_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 | |||
| 53 | KERNEL_FEATURES:append:riscv32 = " ${KERNEL_FEATURES_RISCV}" | ||
| 54 | KERNEL_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 |
