Binman entry 'u-boot-any' not found in list

Alper Nebi Yasak alpernebiyasak at gmail.com
Mon Oct 31 16:46:05 CET 2022


On 31/10/2022 15:56, Roger Quadros wrote:> On 31/10/2022 05:40, Neha
Malcom Francis wrote:
>> On 30/10/22 07:13, Simon Glass wrote:
>>> On Fri, 28 Oct 2022 at 04:58, Fabio Estevam <festevam at gmail.com> wrote:
>>>> [Adding Alper - binmam maintainer and Oliver, who faced the same issue on imx8]

(Sorry I've been unavailable here for longer than I hoped for. Still
trying to get some other work into Debian before their freeze.)

>>>> On Fri, Oct 28, 2022 at 7:56 AM Neha Malcom Francis <n-francis at ti.com> wrote:
>>>>>
>>>>> Hi!
>>>>>
>>>>> U-Boot build for J721E with binman enabled on the latest tip of the
>>>>> master branch throws an error when I try to use u-boot-spl-nodtb entry
>>>>> in my dtsi.
>>>>>
>>>>> What I'm trying to do is, to show I've made a small example
>>>>> (https://github.com/nehamalcom/u-boot/commit/f53dc83944f7774008afbb24fff42904862e9efe)
>>>>> that is:
>>>>>
>>>>> &binman {
>>>>>          foo {
>>>>>                  filename = "foo.bin";
>>>>>                  u-boot-spl-nodtb {
>>>>>                  };
>>>>>          };
>>>>> };
>>>>>
>>>>> which throws the error
>>>>> (https://gist.github.com/nehamalcom/4d855db7e4d5bd03aa29099b0e915e53):
>>>>>
>>>>> binman: Section '/binman/foo': Symbol '_binman_u_boot_any_prop_image_pos'
>>>>>      in entry '/binman/foo/u-boot-spl-nodtb': Entry 'u-boot-any' not
>>>>> found in list (u-boot-spl-nodtb,main-section)
>>>>>
>>>>>
>>>>> This can be traced to the WriteSymbols() in etype/u_boot_spl_nodtb.py.
>>>>> On commenting out this function since it's not necessary in our
>>>>> use-case, the build was successful
>>>>> (https://github.com/nehamalcom/u-boot/commit/5666721860e1d2f759440a00c4aee8b6e89b54b3)
>>>>>
>>>>> Why is binman not picking up on the "any" and choosing u-boot-spl-nodtb
>>>>> from the list?

Binman is trying to embed into the SPL the position/size of U-Boot (its
next phase), but there's no U-Boot proper entry in the same binman
image, so it can't. Try disabling CONFIG_SPL_BINMAN_UBOOT_SYMBOLS to
stop writing these symbols since you said you don't need them, see
[1][2] merged since v2022.04 or so.

You can try putting everything into a monolithic binman image, but that
proved difficult to do for i.MX8M, so I added that config and disabled
it there. Maybe it should be disabled by default.


[1] spl: binman: Split binman symbols support from enabling binman
https://lore.kernel.org/u-boot/20220618121316.12061-5-alpernebiyasak@gmail.com/

[2] spl: binman: Disable u_boot_any symbols for i.MX8M boards
https://lore.kernel.org/u-boot/20220618121316.12061-8-alpernebiyasak@gmail.com/

>>>
>>> You might need this patch?
>>>
>>> https://patchwork.ozlabs.org/project/uboot/patch/20221021002320.1169603-5-sjg@chromium.org/
>>
>> Even after applying this patch, the entry is not working for me.
> 
> Probably because that patch doesn't deal with CONFIG_SPL case, only CONFIG_TPL and CONFIG_VPL?
> Can you please try to do the same for CONFIG_SPL?

The "u-boot-any" ones are for SPL, and implicitly #ifdef CONFIG_SPL.
Those #ifdefs are a bit underspecified, but 'work' in the sense that for
any phase its next phase is declared.

> e.g.
> 
> #ifdef CONFIG_SPL
> binman_sym_declare(ulong, u_boot_spl, image_pos);
> binman_sym_declare(ulong, u_boot_spl, size);
> #endif
> 
> cheers,
> -roger


More information about the U-Boot mailing list