[U-Boot] [PATCH v3] cmd, fdt: add subcommand "get" to fdt header

Simon Glass sjg at chromium.org
Fri Nov 16 00:07:54 UTC 2018


On 14 November 2018 at 21:06, Heiko Schocher <hs at denx.de> wrote:
> store fdt header member with name <member> in U-Boot
> Environment variable with name <var>.
>
> for example to get the total length of the fdt and store
> it in filesize, call:
>
> fdt header get filesize totalsize
>
> For membernames look into fdt header definition at
> scripts/dtc/libfdt/libfdt.h
>
> Signed-off-by: Heiko Schocher <hs at denx.de>
> ---
>
> Changes in v3:
> - add comments from Marek
>   simplify for loop, use fdtp[i] -> drop ftdip++
>
> Changes in v2:
> - add obviously missing "static const char *"
>
>  cmd/fdt.c | 40 +++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 39 insertions(+), 1 deletion(-)

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

Should we have a test case for this?


More information about the U-Boot mailing list