How to build U-Boot with a custom out-of-tree device tree

Simon Glass sjg at chromium.org
Mon Apr 20 21:33:11 CEST 2026


Hi Johannes,

On Tue, 21 Apr 2026 at 00:40, Johannes Krottmayer <krotti83 at proton.me> wrote:
>
> Hi Simon!
>
> Thanks for your answer.
>
> On 4/20/26 2:51 AM, Simon Glass wrote:
> > Hi Johannes,
> >
> > On Sun, 19 Apr 2026 at 02:40, Johannes Krottmayer <krotti83 at proton.me> wrote:
> >>
> >> Hello,
> >>
> >> This question is generic and also valid for none RISC-V boards.
> >> I think it's maybe already asked, but didn't find any useful
> >> information this time. My question is, is it possible to pass
> >> a specific device tree blob to the build system from U-Boot?
> >>
> >> Example: RISC-V board Starfive VisionFive 2 8GiB variant
> >>
> >> The default in-source-tree device tree from the VisionFive 2 has
> >> only 4GiB RAM. I own the 8GiB (RAM-IC BiWin BMWZCX32H2A-64G-X)
> >> variant. So therefore can I pass the device tree blob directly
> >> to U-Boot's build system without modifying CONFIG_DEFAULT_DEVICE_TREE
> >> in the device configuration? Exists there an environment variable?
> >>
> >> Want to use U-Boot's EFI subsystem as loader for bare-metal
> >> environments. And I think when I want to get the
>  memory map
> >> via EFI there will with the default device tree only <4GiB free
> >> usable memory shown, although there are 8GiB.
> >
> > You can build with: make DEVICE_TREE=...
> >
> > See dts/Makefile for the logic.
> >
>
> Didn't figured out how it works with the variable DEVICE_TREE
> yet.
>
> But I found the variable EXT_DTB in your described Makefile.
> Have tried it now with a precompiled device tree and it works
> fine.
>
> make EXT_DTB=/path/to/custom_board.dtb

Oh yes, since it is not in the normal directory you need to use that.
I should have pointed to the documentation:

https://docs.u-boot.org/en/latest/develop/devicetree/control.html#configuration

Regards,
Simon


More information about the U-Boot mailing list