On Thu, 09 Oct 2025 16:50:52 +0200 "Kory Maincent (TI.com)" <[email protected]> wrote:
> Add support for scanning and applying extension board devicetree > overlays during PXE boot. After loading the main board devicetree, > the system now scans for available extension boards and applies their > overlays automatically. > > This enables dynamic hardware configuration for systems with extension > boards during boot scenarios which are using pxe_utils. > > Signed-off-by: Kory Maincent (TI.com) <[email protected]> ... > + > + alist_for_each(extension, extension_list) { > + char *overlay_file; > + ulong size; > + > + len = dir_len + strlen(extension->overlay); > + overlay_file = calloc(1, len); > + if (!overlay_file) > + goto cleanup; > + > + snprintf(overlay_file, len, "%s%s", overlay_dir, > + extension->overlay); > + > + /* Load extension overlay file */ > + ret = get_relfile_envaddr(ctx, overlay_file, > + "extension_overlay_addr", > + (enum > bootflow_img_t)IH_TYPE_FLATDT, > + &size); > + if (ret < 0) { Just figured out that it would be nice to have a warning here if the file is not loaded or found: printf("Failed loading overlay %s\n", overlay_file); > + free(overlay_file); > + continue; > + } > + > + ret = extension_apply(working_fdt, size); > + if (ret) { > + free(overlay_file); > + continue; > + } > + free(overlay_file); > + } -- Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com

