[U-Boot] [PATCH] Allow boards to initialize the DT at runtime.

Simon Glass sjg at chromium.org
Wed Apr 5 10:29:02 UTC 2017


Hi Alex,

On 2 April 2017 at 02:25, Alex Deymo <deymo at google.com> wrote:
> In some boards like the Raspberry Pi the initial bootloader will pass
> a DT to the kernel. When using U-boot as such kernel, the board code in

Please use 'U-Boot' consistently.

> U-Boot should be able to provide U-boot with this, already assembled
> device tree blob.
>
> This patch introduces a new config option CONFIG_OF_BOARD to use instead
> of CONFIG_OF_EMBED or CONFIG_OF_SEPARATE which will initialize the DT
> from a board-specific funtion instead of bundling one with U-boot or as
> a separated file. This allows boards like the Raspberry Pi to reuse the
> device tree passed from the bootcode.bin and start.elf firmware
> files, included the run-time selected device tree overlays.

including

>
> Signed-off-by: Alex Deymo <deymo at google.com>
> ---
>  README                      |  8 +++++++-
>  board/raspberrypi/rpi/rpi.c | 10 ++++++++++
>  doc/README.fdt-control      |  4 ++++
>  dts/Kconfig                 |  8 ++++++++
>  include/fdtdec.h            |  6 ++++++
>  lib/fdtdec.c                |  3 +++
>  6 files changed, 38 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

This seems reasonable to me. My only concern is that when U-Boot is
updated the device tree may need to be updated also (e.g. to add a new
driver). But probably that happens anyway.

Where is the DT provided? Is it a separate file on the SD card?

- Simon


More information about the U-Boot mailing list