boot/uboot: introduce BR2_TARGET_UBOOT_FORMAT_DTB
authorDrew Fustini <drew@beagleboard.org>
Wed, 16 Jun 2021 05:03:39 +0000 (22:03 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 18 Jul 2021 19:22:21 +0000 (21:22 +0200)
If U-Boot CONFIG_OF_SEPARATE is defined [1], then the device tree will
be built and placed in a u-boot.dtb file alongside u-boot.bin.

When BR2_TARGET_UBOOT_FORMAT_DTB is enabled, buildroot will copy
u-boot.dtb to $(BINARIES_DIR).

This is useful for RISC-V platforms that want to build OpenSBI with an
external DTB by using FW_FDT_PATH [2].

[1] https://github.com/u-boot/u-boot/blob/master/doc/README.fdt-control
[2] https://github.com/riscv/opensbi/blob/master/docs/firmware/fw.md

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Drew Fustini <drew@beagleboard.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
boot/uboot/Config.in
boot/uboot/uboot.mk

index 58e0a858030aeb540e7d97850ba8ff931087ebbb..0854fb13cc7f6b5e3a7b3fe4be2a094db5b2bc7a 100644 (file)
@@ -252,6 +252,9 @@ config BR2_TARGET_UBOOT_FORMAT_BIN
        bool "u-boot.bin"
        default y
 
+config BR2_TARGET_UBOOT_FORMAT_DTB
+       bool "u-boot.dtb"
+
 config BR2_TARGET_UBOOT_FORMAT_DTB_BIN
        bool "u-boot-dtb.bin"
 
index a8a8bedc0175ec98f0f31edb9ca5a749974f5ee4..9c2261963d72d579fa913b4acc641c9bf7f31240 100644 (file)
@@ -48,6 +48,10 @@ ifeq ($(BR2_TARGET_UBOOT_FORMAT_BIN),y)
 UBOOT_BINS += u-boot.bin
 endif
 
+ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB),y)
+UBOOT_BINS += u-boot.dtb
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
 UBOOT_BINS += u-boot
 # To make elf usable for debuging on ARC use special target