[PATCH 22/24] rockchip: Support building the all output files in binman

Peter Geis pgwipeout at gmail.com
Mon Feb 14 02:28:41 CET 2022


On Thu, Feb 10, 2022 at 2:32 PM Peter Geis <pgwipeout at gmail.com> wrote:
>
> On Thu, Feb 10, 2022 at 1:58 PM Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Peter,
> >
> > On Thu, 10 Feb 2022 at 08:04, Peter Geis <pgwipeout at gmail.com> wrote:
> > >
> > > On Tue, Feb 8, 2022 at 1:54 PM Simon Glass <sjg at chromium.org> wrote:
> > > >
> > >
> > > Good Morning,
> > >
> > > > Add the required binman images to replace the Makefile rules which are
> > > > currently used. This includes subsuming:
> > > >
> > > >    - tpl/u-boot-tpl-rockchip.bin if TPL is enabled
> > > >    - idbloader.img if either or both of SPL and TPL are enabled
> > > >    - u-boot.itb2 if SPL_FIT is enabled
> > > >    - u-boot-rockchip.bin if SPL is used, either using u-boot.itb2 when
> > > >      SPL_FIT is enabled or u-boot.img when it isn't
> > > >
> > > > For now u-boot.itb2 is used as the FIT filename to avoid conflicting with
> > > > the current u-boot.itb file. This will be updated in a future patch.
> > > >
> > > > Note that the intermediate files are dropped with binman, since it
> > > > producing everything in one pass. This means that
> > > > tpl/u-boot-tpl-rockchip.bin is not created, for example.
> > >
> > > A question if binman can handle the following:
> > > Currently, it is impossible to build a rk3568 image automatically.
> > > This is due to the fact that unlike previous boards, you must pass
> > > both TPL and SPL to mkimage at the same time (similar to rk3399 spi).
> > > Note: TPL currently isn't built in mainline, it must be pulled from a
> > > prebuilt binary.
> > > ./tools/mkimage -n rk3568 -T rksd -d
> > > rk3568_ddr_1560MHz_v1.12.bin:spl/u-boot-spl.bin idbloader.img
> > >
> > > The Makefile method didn't seem to be able to handle this, so I had to
> > > hack in my own function to do it.
> > > I'm hoping this series provides a more elegant solution.
> >
> > Binman certainly lets you add multiple things in, but the bin: stuff
> > is not supported. If it is simply a case of joining the ddr and SPL
> > then you do that with:
>
> Okay, I'll test this, thanks!
> They both needed to be passed to mkimage because they both get
> checksummed individually, but stored in the same header.
>
> >
> > mkimage {
> >    args = ...
> >
> >    ddrl {
> >       type = "blob-ext";
> >       filename = "rk3568_ddr_1560MHz_v1.12.bin";
> >    };
> >    u-boot-spl {
> >    };

Good Evening,
I tested this, unfortunately it seems to cat the two files into a
single file and trying to run that through mkimage, which breaks due
to size constraints:
binman: Error 1 running 'mkimage -d ./mkimage.simple-bin.mkimage -n
rk3568 -T rksd ./mkimage-out.simple-bin.mkimage': Error: SPL image is
too large (size 0x22000 than 0x13000)
This matches the behavior listed in the changes to `tools/binman/binman.rst`

> > };
> >
> > At present mkimage is not a subclass of Entry_section, so alignment
> > and padding of the mkimage input are not supported. But that should be
> > easy enough to change, if needed.
>
> Alignment and padding shouldn't be an issue here.
> mkimage handles everything and spits out a complete file.
>
> I haven't yet confirmed if the rk33 spi padding issue applies to the
> rk35 series, mostly because I haven't yet achieved stable support for
> the SFC in mainline yet.
>
> Thanks again!
> Peter
>
> >
> > [..]
> >
> > Regards,
> > Simon


More information about the U-Boot mailing list