u-boot: Dynamic RISC-V ISA configuration

Allow the risc-v TUNE_FEATURES to select specific ISA (kconfig) selections
via config fragments.

This allows the following items to be selected dynamically:

    CONFIG_RISCV_ISA_C
    CONFIG_RISCV_ISA_F
    CONFIG_RISCV_ISA_D
    CONFIG_RISCV_ISA_ZBB
    CONFIG_RISCV_ISA_A
    CONFIG_RISCV_ISA_ZICBOM

(From OE-Core rev: 8322bb3c894bc030ef37d807fb87dd9df5df1444)

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:
Mark Hatle 2025-07-02 16:44:19 -05:00 committed by Richard Purdie
parent 36b74344c4
commit f46982ebca
8 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1 @@
CONFIG_RISCV_ISA_A=y

View File

@ -0,0 +1 @@
CONFIG_RISCV_ISA_C=y

View File

@ -0,0 +1,6 @@
# CONFIG_RISCV_ISA_C is not set
# CONFIG_RISCV_ISA_F is not set
# CONFIG_RISCV_ISA_D is not set
# CONFIG_RISCV_ISA_ZBB is not set
# CONFIG_RISCV_ISA_A is not set
# CONFIG_RISCV_ISA_ZICBOM is not set

View File

@ -0,0 +1 @@
CONFIG_RISCV_ISA_D=y

View File

@ -0,0 +1 @@
CONFIG_RISCV_ISA_F=y

View File

@ -0,0 +1 @@
CONFIG_RISCV_ISA_ZBB=y

View File

@ -0,0 +1 @@
CONFIG_RISCV_ISA_ZICBOM=y

View File

@ -16,6 +16,18 @@ SRCREV = "34820924edbc4ec7803eb89d9852f4b870fa760a"
SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}"
SRC_URI_RISCV = "\
file://u-boot-riscv-isa_clear.cfg \
${@bb.utils.contains ("TUNE_FEATURES", "a", "file://u-boot-riscv-isa_a.cfg", "", d)} \
${@bb.utils.contains ("TUNE_FEATURES", "f", "file://u-boot-riscv-isa_f.cfg", "", d)} \
${@bb.utils.contains ("TUNE_FEATURES", "d", "file://u-boot-riscv-isa_d.cfg", "", d)} \
${@bb.utils.contains_any("TUNE_FEATURES", "b zbb", "file://u-boot-riscv-isa_zbb.cfg", "", d)} \
${@bb.utils.contains ("TUNE_FEATURES", "zicbom", "file://u-boot-riscv-isa_zicbom.cfg", "", d)} \
"
SRC_URI:append:riscv32 = "${SRC_URI_RISCV}"
SRC_URI:append:riscv64 = "${SRC_URI_RISCV}"
B = "${WORKDIR}/build"
inherit pkgconfig