[PATCH] dm: core: Deal with __symbols__ in devicetree

Simon Glass sjg at chromium.org
Mon Jul 24 16:53:36 CEST 2023


Hi,

On Wed, 12 Jul 2023 at 12:58, Simon Glass <sjg at chromium.org> wrote:
>
> This node is 'special' and doesn't have a compatible string. Deal with
> it is as a special case.
>
> Reported-by: Sahaj Sarup <sahaj.sarup at linaro.org>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  drivers/core/root.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/core/root.c b/drivers/core/root.c
> index 6775fb0b657..bf163cc16a9 100644
> --- a/drivers/core/root.c
> +++ b/drivers/core/root.c
> @@ -13,6 +13,7 @@
>  #include <fdtdec.h>
>  #include <log.h>
>  #include <malloc.h>
> +#include <spl.h>
>  #include <asm-generic/sections.h>
>  #include <asm/global_data.h>
>  #include <linux/libfdt.h>
> @@ -285,6 +286,9 @@ static int dm_scan_fdt_node(struct udevice *parent, ofnode parent_node,
>                         pr_debug("   - ignoring disabled device\n");
>                         continue;
>                 }
> +               if (spl_phase() > PHASE_SPL &&
> +                   !strcmp("__symbols__", node_name))
> +                       continue;
>                 err = lists_bind_fdt(parent, node, NULL, NULL, pre_reloc_only);
>                 if (err && !ret) {
>                         ret = err;
> --
> 2.41.0.255.g8b1d071c50-goog
>

Does this fix the problem that was reported?

Regards,
Simon


More information about the U-Boot mailing list