[BUG] binman: Add a library to access binman entries

Simon Glass sjg at chromium.org
Wed Feb 12 18:14:29 CET 2020


Hi Frank,

On Wed, 12 Feb 2020 at 04:50, Frank Wunderlich <frank-w at public-files.de> wrote:
>
> Am 12. Februar 2020 00:03:18 MEZ schrieb Simon Glass <sjg at chromium.org>:
> >Hi Frank,
> >
> >Sorry for the delay. Stephen hit this also.
>
> Hi Simon,
> good that my mail was not lost
>
> >>
> >> this line [1] (in my case) breaks the init-chain:
> >>
> >> return log_msg_ret("binman node", -EINVAL);
> >>
> >> the binman_init [2] is added to init_sequence_r[] which is executed
> >by initcall_run_list
> >>
> >> ./common/board_r.c:897: if (initcall_run_list(init_sequence_r))
> >>
> >> exiting the binman-function [3] with error-code (return <> 0) exits
> >the full chain (./include/initcall.h) [4] with message
> >>
> >> initcall sequence %p failed at call %p
> >>
> >> how to deal with this?
> >>
> >> - do not select binman as default=y in Kconfig
> >
> >Where is it selected by default?
>
> https://gitlab.denx.de/u-boot/u-boot/blob/master/lib/Kconfig#L13
>
> >bpi-r64 uses binman to build its image so I think BINMAN is on.
> >
> >> - adding the binman-node [1] to all dts
> >
> >Yes, but in fact it should already be there. I see in the Makefile
> >that 64-bit sunxi uses 'cat' instead of 'binman'. It should use
> >binman.
>
> https://gitlab.denx.de/u-boot/u-boot/blob/master/arch/arm/dts/mt7622.dtsi
> https://gitlab.denx.de/u-boot/u-boot/blob/master/arch/arm/dts/mt7622-rfb.dts
>
> I see no binman there
>
> >> - do not exit with error-code (only print/log message)
> >
> >Not keen on that
> >
> >> - do not exit the init-sequence on binman-error [3]
> >
> >or that
> >
> >> - more ideas?
> >
> >Let's convert bpi-64 as above.
>
> What do i need to add/change

This code in the Makefile should do the same thing for ARM64 and 32:

ifneq ($(CONFIG_ARCH_SUNXI),)
ifeq ($(CONFIG_ARM64),)
u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
$(call if_changed,binman)
else
u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
$(call if_changed,cat)
endif
endif

To make this work I think you'll need to add a new 'sunxi-itb' entry
type into binman as a first step. That is ugly but it will work.

Then mksunxi_fit_atf.sh should move into binman, with 'sunxi-itb'
becoming a new method that generates the .its from source. I can help
with that bit.

Regards,
Simon


More information about the U-Boot mailing list