From 3a2cda9e84861278736df18db4a1f279af217e33 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Wed, 2 Jul 2025 16:44:21 -0500 Subject: [PATCH] kernel.bbclass: State riscv required tune_features for Linux Required: rv32ima_zicsr_zifencei rv64ima_zicsr_zifencei See the arch/riscv/Makefile: riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima riscv-march-$(CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI) := $(riscv-march-y)_zicsr_zifencei (From OE-Core rev: 1dcefb02d7940476e4214c98f4cb9c5885015164) Signed-off-by: Mark Hatle Signed-off-by: Antonin Godard Signed-off-by: Richard Purdie --- meta/classes-recipe/kernel.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index 2d9943c8a0..eb03424dfc 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass @@ -4,10 +4,14 @@ # SPDX-License-Identifier: MIT # -inherit linux-kernel-base kernel-module-split +inherit linux-kernel-base kernel-module-split features_check COMPATIBLE_HOST = ".*-linux" +# Linux has a minimum ISA requires on riscv, see arch/riscv/Makefile +REQUIRED_TUNE_FEATURES:riscv32 = "rv 32 i m a zicsr zifencei" +REQUIRED_TUNE_FEATURES:riscv64 = "rv 64 i m a zicsr zifencei" + KERNEL_PACKAGE_NAME ??= "kernel" KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"