[v4 16/17] arm: socfpga: soc64: Enable FIT image generation using binman

Simon Glass sjg at chromium.org
Mon Dec 21 03:42:46 CET 2020


Hi Siew Chin,

On Sun, 20 Dec 2020 at 19:28, Lim, Elly Siew Chin
<elly.siew.chin.lim at intel.com> wrote:
>
> Hi Simon,
>
> > -----Original Message-----
> > From: Simon Glass <sjg at chromium.org>
> > Sent: Monday, December 21, 2020 10:17 AM
> > To: Lim, Elly Siew Chin <elly.siew.chin.lim at intel.com>
> > Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Marek Vasut
> > <marex at denx.de>; Tan, Ley Foon <ley.foon.tan at intel.com>; See, Chin Liang
> > <chin.liang.see at intel.com>; Simon Goldschmidt
> > <simon.k.r.goldschmidt at gmail.com>; Chee, Tien Fong
> > <tien.fong.chee at intel.com>; Westergreen, Dalon
> > <dalon.westergreen at intel.com>; Gan, Yau Wai <yau.wai.gan at intel.com>
> > Subject: Re: [v4 16/17] arm: socfpga: soc64: Enable FIT image generation using
> > binman
> >
> > Hi Siew Chin,
> >
> > On Sun, 20 Dec 2020 at 19:12, Lim, Elly Siew Chin <elly.siew.chin.lim at intel.com>
> > wrote:
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Simon Glass <sjg at chromium.org>
> > > > Sent: Sunday, December 20, 2020 11:58 PM
> > > > To: Lim, Elly Siew Chin <elly.siew.chin.lim at intel.com>
> > > > Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Marek Vasut
> > > > <marex at denx.de>; Tan, Ley Foon <ley.foon.tan at intel.com>; See, Chin
> > > > Liang <chin.liang.see at intel.com>; Simon Goldschmidt
> > > > <simon.k.r.goldschmidt at gmail.com>; Chee, Tien Fong
> > > > <tien.fong.chee at intel.com>; Westergreen, Dalon
> > > > <dalon.westergreen at intel.com>; Gan, Yau Wai <yau.wai.gan at intel.com>
> > > > Subject: Re: [v4 16/17] arm: socfpga: soc64: Enable FIT image
> > > > generation using binman
> > > >
> > > > Hi Siew,
> > > >
> > > > On Sun, 20 Dec 2020 at 02:06, Lim, Elly Siew Chin
> > > > <elly.siew.chin.lim at intel.com>
> > > > wrote:
> > > > >
> > > > > Hi Simon,
> > > > >
> > > > > We call binman to generate itb file in "make fit-itb".
> > > > >
> > > > > We didn't put it in default binman flow is because it require
> > > > > Arm-trusted-
> > > > firmware (bl31.bin) and Linux Image and dtb to build the itb file.
> > > > These files are not part of u-boot. The user will hit compilation
> > > > error if these files are not prepared before they build u-boot.
> > > > Besides, we are in progressing enabling Vendor Authorized Boot (VAB)
> > > > for Intel SoC FPGA, which requires u-boot prope, dtb, bl31.bin and
> > > > Linux Image, dtb to be signed before generate the itb. The signing process
> > involves another signing tool.
> > > > >
> > > > > We prefer not to add new dependency into default u-boot
> > > > > compilation
> > > > process. As a result, we build itb files with "make fit-itb".
> > > >
> > > > The ATF stuff is not new. On various we use the 'external' flag (or
> > > > blob-ext entry
> > > > type) to handle this. See atf_bl31.py for example. If the file is
> > > > not available, a warning is printing but the build succeeds.
> > > >
> > > > Binman should be able to generate all the images. The split of
> > > > responsibilities should be:
> > > >
> > > > - Makefile - builds the binaries
> > > > - Other projects - build their binaries
> > > > - binman - put it all together into images
> > > >
> > > > Regards,
> > > > Simon
> > > >
> > >
> > > Hi Simon,
> > >
> > > I get what you mean, Simon. I will do the following changes:
> > >
> > > (1) I will change blob to blob-ext entry in binman dts node for all input files.
> > > -                                       uboot_blob: blob {
> > > +                                       uboot_blob: blob-ext {
> > >
> >
> > OK, also you can create your own entry type that sets external to True if you like.
> >
> > > (2) I will revert all changes in Makefile to allow binman to run by default. And,
> > I will remove "make fit-itb". Yes, I saw that it will report warning instead of error.
> > >
> > > > - Makefile - builds the binaries
> > > BINMAN  all
> > > Image 'main-section' is missing external blobs and is non-functional:
> > > blob-ext
> > >
> > > Some images are invalid
> > >
> >
> > OK ta
> >
> > > (3) We will directly use binman command to generate the fit image. Binman
> > will report error if the input file doesn't exist.
> > > > - binman - put it all together into images
> > >
> > > bash-4.1$ ./tools/binman/binman build -u -d u-boot.dtb -O . -i u-boot
> > > bash-4.1$ ./tools/binman/binman build -u -d u-boot.dtb -O . -i kernel
> > > binman: [Errno 2] No such file or directory: 'Image'
> >
> > Do you need -i or can you just get it to build everything in one go?
> >
> > Try -D to get debug info. I don't know what is going on there.
>
> User may use both. For first time, user can build everything in one go with -i. After that, if they only need to update Linux images, they can use -i to only build kernel itb.
>
> I have tested using binman without -i, it will build all itb defined in dts.
> bash-4.1$ ./tools/binman/binman build -u -d u-boot.dtb -O .
> binman: [Errno 2] No such file or directory: 'Image'

OK I'm not sure what is going on here. But binman should be fairly
quick, so perhaps just rebuild everything? We don't currently bother
to select which images to build.

Perhaps we should add that feature to the build system. But it is
complicated, because the Makefile does not (in general) know what
files are being generated by binman.

Regards,
Simon
> > > > > > -----Original Message-----
> > > > > > From: Simon Glass <sjg at chromium.org>
> > > > > > Sent: Saturday, December 19, 2020 10:29 AM
> > > > > > To: Lim, Elly Siew Chin <elly.siew.chin.lim at intel.com>
> > > > > > Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Marek Vasut
> > > > > > <marex at denx.de>; Tan, Ley Foon <ley.foon.tan at intel.com>; See,
> > > > > > Chin Liang <chin.liang.see at intel.com>; Simon Goldschmidt
> > > > > > <simon.k.r.goldschmidt at gmail.com>; Chee, Tien Fong
> > > > > > <tien.fong.chee at intel.com>; Westergreen, Dalon
> > > > > > <dalon.westergreen at intel.com>; Gan, Yau Wai
> > > > > > <yau.wai.gan at intel.com>
> > > > > > Subject: Re: [v4 16/17] arm: socfpga: soc64: Enable FIT image
> > > > > > generation using binman
> > > > > >
> > > > > > Hi Siew,
> > > > > >
> > > > > > On Thu, 17 Dec 2020 at 20:29, Siew Chin Lim
> > > > > > <elly.siew.chin.lim at intel.com>
> > > > > > wrote:
> > > > > > >
> > > > > > > Add new build target "fit-itb" for FIT image generation.
> > > > > > >
> > > > > > > In preparation to support Vendor Authorized Boot (VAB) for
> > > > > > > Intel
> > > > > > > SOC64 device in near future. With VAB, u-boot proper, dtb and
> > > > > > > arm trusted firmware need to be signed before FIT image generation.
> > > > > > >
> > > > > > > To align user experience for ATF boot with and without VAB
> > > > > > > feature, we skip binman for ARCH_SOCFPGA in default Makefile flow.
> > > > > > > User always use 'make fit-itb' to generate FIT image after
> > > > > > > successfully compile u-boot.
> > > > > > >
> > > > > > > Signed-off-by: Siew Chin Lim <elly.siew.chin.lim at intel.com>
> > > > > > >
> > > > > > > ---
> > > > > > > v2
> > > > > > > ---
> > > > > > > Adjust BINMAN sequence in code, sorted by alphabetical order.
> > > > > > > ---
> > > > > > >  Makefile                      | 7 +++++++
> > > > > > >  arch/arm/mach-socfpga/Kconfig | 2 ++
> > > > > > >  2 files changed, 9 insertions(+)
> > > > > >
> > > > > > Can't we make binman do this?
> > > > > >
> > > > > > Regards,
> > > > > > Simon


More information about the U-Boot mailing list