Message ID | 20210910140925.28138-3-heiko.thiery@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | Add support to build imx8 images using mainline uboot | expand |
On Fri, Sep 10, 2021 at 11:10 AM Heiko Thiery <heiko.thiery@gmail.com> wrote: > > If the U-Boot image is to be built with binman and the ATF binary is > used, the file is expected in the toplevel directory. > > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> This applies even if the image is built without binman: Reviewed-by: Fabio Estevam <festevam@gmail.com>
Hi Fabio, Am Fr., 10. Sept. 2021 um 16:27 Uhr schrieb Fabio Estevam <festevam@gmail.com>: > > On Fri, Sep 10, 2021 at 11:10 AM Heiko Thiery <heiko.thiery@gmail.com> wrote: > > > > If the U-Boot image is to be built with binman and the ATF binary is > > used, the file is expected in the toplevel directory. > > > > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> > > This applies even if the image is built without binman: I don't think that's quite right. With the old mainline uboot you could also build the flash.bin, but that was optional. The make rule 'flash.bin' was not part of 'make all'. But with the change to binman the files are now necessary, because 'make all' now also builds the flash.bin. > Reviewed-by: Fabio Estevam <festevam@gmail.com>
Hi Heiko, On Fri, Sep 10, 2021 at 1:03 PM Heiko Thiery <heiko.thiery@gmail.com> wrote: > I don't think that's quite right. With the old mainline uboot you > could also build the flash.bin, but that was optional. The make rule > 'flash.bin' was not part of 'make all'. But with the change to binman > the files are now necessary, because 'make all' now also builds the > flash.bin. The need for bl31.bin present in the build directory was required even prior to the binman conversion. For example, let's take the U-Boot 2021.01 readme for imx8mm evk: https://source.denx.de/u-boot/u-boot/-/blob/v2021.01/doc/board/freescale/imx8mm_evk.rst
Hi Fabio, Am Fr., 10. Sept. 2021 um 18:08 Uhr schrieb Fabio Estevam <festevam@gmail.com>: > > Hi Heiko, > > On Fri, Sep 10, 2021 at 1:03 PM Heiko Thiery <heiko.thiery@gmail.com> wrote: > > > I don't think that's quite right. With the old mainline uboot you > > could also build the flash.bin, but that was optional. The make rule > > 'flash.bin' was not part of 'make all'. But with the change to binman > > the files are now necessary, because 'make all' now also builds the > > flash.bin. > > The need for bl31.bin present in the build directory was required even > prior to the binman conversion. > > For example, let's take the U-Boot 2021.01 readme for imx8mm evk: > https://source.denx.de/u-boot/u-boot/-/blob/v2021.01/doc/board/freescale/imx8mm_evk.rst ah ok .. I was not aware of that. I just thought this requirement comes from building via binman. Thank you
On 10/09/2021 16:09, Heiko Thiery wrote: > If the U-Boot image is to be built with binman and the ATF binary is > used, the file is expected in the toplevel directory. > > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Applied to master, thanks. I've updated the commit message to reflect that it's not related to binman. Regards, Arnout > --- > boot/uboot/uboot.mk | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk > index 4f3c9b7c3a..1a840d9cc1 100644 > --- a/boot/uboot/uboot.mk > +++ b/boot/uboot/uboot.mk > @@ -162,8 +162,16 @@ ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y) > UBOOT_DEPENDENCIES += arm-trusted-firmware > ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y) > UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.elf > +define UBOOT_COPY_ATF_FIRMWARE > + cp $(BINARIES_DIR)/bl31.elf $(@D)/ > +endef > +UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_ATF_FIRMWARE > else > UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin > +define UBOOT_COPY_ATF_FIRMWARE > + cp $(BINARIES_DIR)/bl31.bin $(@D)/ > +endef > +UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_ATF_FIRMWARE > endif > endif > >
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 4f3c9b7c3a..1a840d9cc1 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -162,8 +162,16 @@ ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y) UBOOT_DEPENDENCIES += arm-trusted-firmware ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y) UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.elf +define UBOOT_COPY_ATF_FIRMWARE + cp $(BINARIES_DIR)/bl31.elf $(@D)/ +endef +UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_ATF_FIRMWARE else UBOOT_MAKE_OPTS += BL31=$(BINARIES_DIR)/bl31.bin +define UBOOT_COPY_ATF_FIRMWARE + cp $(BINARIES_DIR)/bl31.bin $(@D)/ +endef +UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_ATF_FIRMWARE endif endif
If the U-Boot image is to be built with binman and the ATF binary is used, the file is expected in the toplevel directory. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> --- boot/uboot/uboot.mk | 8 ++++++++ 1 file changed, 8 insertions(+)