[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ImageBuilder][PATCH] uboot-script-gen: add debug option to print final dt "chosen" node



On Mon, 17 Mar 2025, Grygorii Strashko wrote:
> Add debug DBG_FDT_PRINT_CHOSEN config file option which adds
> print of DT "chosen" node at the end of generated U-boot script.
> 
> This is useful for debug and development purposes.
> 
> Example:
>   ...
>   setenv fdt_high 0xffffffffffffffff
>   fdt print /chosen
>   booti 0x43000000 - 0x43200000
> 
> Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

> ---
>  README.md                | 8 ++++++++
>  scripts/uboot-script-gen | 5 +++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/README.md b/README.md
> index 4ba430ce74c5..5b75018ea956 100644
> --- a/README.md
> +++ b/README.md
> @@ -396,3 +396,11 @@ disk\_image supports these additional parameters on the
> config file:
>  disk_image also generates on the fly a xl config file for each domU and
>  adds them to the dom0 rootfs partition under /etc/xen. It makes it
>  easier to start those domUs from dom0.
> +
> +
> +## Debug
> +
> +This section defines config file debug options
> +
> +- DBG_FDT_PRINT_CHOSEN specifies that U-Boot script command to print DT
> "chosen"
> +  node will be added to the boot script.
> diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
> index 0607542b1872..74e3b076910c 100755
> --- a/scripts/uboot-script-gen
> +++ b/scripts/uboot-script-gen
> @@ -1357,6 +1357,11 @@ device_tree_editing $device_tree_addr
>  # disable device tree reloation
>  echo "setenv fdt_high 0xffffffffffffffff" >> $UBOOT_SOURCE
>  +if test "$DBG_FDT_PRINT_CHOSEN"
> +then
> +    echo "fdt print /chosen" >> $UBOOT_SOURCE
> +fi
> +
>  # append extra u-boot commands (fixups) to script before boot command
>  if test "$APPEND_EXTRA_CMDS"
>  then
> -- 
> 2.34.1
> 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.