Hi Rasmus, On 2026-05-29T19:46:18, Rasmus Villemoes <[email protected]> wrote: > image-fit.c: introduce CONTROL_DTB_AS_FIT config knob > > Having scripts embedded one way or the other in the U-Boot binary > means they are automatically verified/trusted by whatever mechanism > verifies U-Boot. > > Writing those scripts in the built-in environment leads to > backslatitis and missing or wrong quoting and is generally not very > readable or maintainable. > > Maintaining scripts in external files allows one > to have both syntax highlighting and to some extent apply shellcheck > on it (though U-Boot's shell is of course not quite POSIX sh, so some > '#shellcheck disable' directives are needed). Getting those into the > U-Boot binary is then a matter of having a suitable .dtsi file such as > > / { > images { > default = 'boot'; > boot { > [...] > > boot/Kconfig | 13 +++++++++++++ > boot/image-fit.c | 21 +++++++++++++++------ > 2 files changed, 28 insertions(+), 6 deletions(-)
> diff --git a/boot/image-fit.c b/boot/image-fit.c > @@ -1676,6 +1686,10 @@ int fit_check_format(const void *fit, ulong size) > + /* For the control DTB to act as a FIT image, we only require an > /images node. */ > + if (CONFIG_IS_ENABLED(CONTROL_DTB_AS_FIT) && fit == gd_fdt_blob()) > + return fit_check_images_node(fit); Please wrap this comment to 80 columns Reviewed-by: Simon Glass <[email protected]> Regards, Simon

