diff options
author | Mark Hatle <mark.hatle@amd.com> | 2025-07-02 16:44:19 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-07 22:12:50 +0100 |
commit | 7c354e6e24267ff1a6733315d3c78d4ce119c32a (patch) | |
tree | 54c8bf886b7f1c9fe7009ce844d4a8fdde70dfdb | |
parent | f4f2cdb39b5b69185dee26dd28a018bae3e9aff5 (diff) | |
download | poky-7c354e6e24267ff1a6733315d3c78d4ce119c32a.tar.gz |
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: de890297b392fcf7f5bd2d25d3c173373b93dd36)
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>
8 files changed, 24 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_a.cfg b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_a.cfg new file mode 100644 index 0000000000..fc45b64480 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_a.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_RISCV_ISA_A=y | |||
diff --git a/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_c.cfg b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_c.cfg new file mode 100644 index 0000000000..1cb459f636 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_c.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_RISCV_ISA_C=y | |||
diff --git a/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_clear.cfg b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_clear.cfg new file mode 100644 index 0000000000..ce90da23ce --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_clear.cfg | |||
@@ -0,0 +1,6 @@ | |||
1 | # CONFIG_RISCV_ISA_C is not set | ||
2 | # CONFIG_RISCV_ISA_F is not set | ||
3 | # CONFIG_RISCV_ISA_D is not set | ||
4 | # CONFIG_RISCV_ISA_ZBB is not set | ||
5 | # CONFIG_RISCV_ISA_A is not set | ||
6 | # CONFIG_RISCV_ISA_ZICBOM is not set | ||
diff --git a/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_d.cfg b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_d.cfg new file mode 100644 index 0000000000..fd25fa4e89 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_d.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_RISCV_ISA_D=y | |||
diff --git a/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_f.cfg b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_f.cfg new file mode 100644 index 0000000000..dfa9876f82 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_f.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_RISCV_ISA_F=y | |||
diff --git a/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_zbb.cfg b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_zbb.cfg new file mode 100644 index 0000000000..2b71b016f8 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_zbb.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_RISCV_ISA_ZBB=y | |||
diff --git a/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_zicbom.cfg b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_zicbom.cfg new file mode 100644 index 0000000000..96daf04b20 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/u-boot-riscv-isa_zicbom.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_RISCV_ISA_ZICBOM=y | |||
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc index 617f5a60bb..8600d4bab6 100644 --- a/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc | |||
@@ -16,6 +16,18 @@ SRCREV = "34820924edbc4ec7803eb89d9852f4b870fa760a" | |||
16 | 16 | ||
17 | SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}" | 17 | SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}" |
18 | 18 | ||
19 | SRC_URI_RISCV = "\ | ||
20 | file://u-boot-riscv-isa_clear.cfg \ | ||
21 | ${@bb.utils.contains ("TUNE_FEATURES", "a", "file://u-boot-riscv-isa_a.cfg", "", d)} \ | ||
22 | ${@bb.utils.contains ("TUNE_FEATURES", "f", "file://u-boot-riscv-isa_f.cfg", "", d)} \ | ||
23 | ${@bb.utils.contains ("TUNE_FEATURES", "d", "file://u-boot-riscv-isa_d.cfg", "", d)} \ | ||
24 | ${@bb.utils.contains_any("TUNE_FEATURES", "b zbb", "file://u-boot-riscv-isa_zbb.cfg", "", d)} \ | ||
25 | ${@bb.utils.contains ("TUNE_FEATURES", "zicbom", "file://u-boot-riscv-isa_zicbom.cfg", "", d)} \ | ||
26 | " | ||
27 | |||
28 | SRC_URI:append:riscv32 = "${SRC_URI_RISCV}" | ||
29 | SRC_URI:append:riscv64 = "${SRC_URI_RISCV}" | ||
30 | |||
19 | B = "${WORKDIR}/build" | 31 | B = "${WORKDIR}/build" |
20 | 32 | ||
21 | inherit pkgconfig | 33 | inherit pkgconfig |