@@ -111,7 +111,8 @@ config BR2_TARGET_OPENSBI_UBOOT_PAYLOAD
config BR2_TARGET_OPENSBI_FW_FDT_PATH
bool "Include U-Boot DTB in OpenSBI Payload"
- depends on BR2_TARGET_OPENSBI_UBOOT_PAYLOAD
+ depends on BR2_TARGET_OPENSBI_PLAT != ""
+ depends on BR2_TARGET_UBOOT
select BR2_TARGET_UBOOT_FORMAT_DTB
help
Build OpenSBI with FW_FDT_PATH set to
@@ -47,10 +47,11 @@ endif
ifeq ($(BR2_TARGET_OPENSBI_UBOOT_PAYLOAD),y)
OPENSBI_DEPENDENCIES += uboot
OPENSBI_MAKE_ENV += FW_PAYLOAD_PATH="$(BINARIES_DIR)/u-boot.bin"
+endif
+
ifeq ($(BR2_TARGET_OPENSBI_FW_FDT_PATH),y)
OPENSBI_MAKE_ENV += FW_FDT_PATH="$(BINARIES_DIR)/u-boot.dtb"
endif
-endif
define OPENSBI_BUILD_CMDS
$(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D)
Currently, Buildroot requires the installation of fw_payload.bin to pass FW_FDT_PATH as a compile-time parameter. According to OpenSBI documentation[1], all firmware types can have an embedded flattened device tree. This commit removes the dependency on fw_payload.bin, allowing users to include the U-Boot flattened device tree using FW_FDT_PATH without installing fw_payload. [1] https://github.com/riscv-software-src/opensbi/blob/master/docs/firmware/fw.md Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com> --- boot/opensbi/Config.in | 3 ++- boot/opensbi/opensbi.mk | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) --- base-commit: 1e9261d9b6388dc382e59f44174f1806d326ad15 change-id: 20241029-extract-fw_fdt_path-87cb8e4be2bb Best regards,