All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
@ 2021-09-06  9:42 Heiko Thiery
  2021-09-06  9:42 ` [Buildroot] [PATCH 1/3] package/freescale-imx/firmware-imx: copy all (lp)ddr files unconditionaly Heiko Thiery
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Heiko Thiery @ 2021-09-06  9:42 UTC (permalink / raw)
  To: buildroot
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	Heiko Thiery, Fabio Estevam, Xavier Roumegue

New U-Boot version support building the flash.bin bootimage using
binman. For that the imx specific firmware files like (LP)DDR and HDMI
firmware has to be located in the u-boot builddirectory.

Xavier Roumegue already posted a patchset [1] to add this support but did no
follow up version after getting review comments.

I have taken up these comments and prepared the patchset.

[1] https://lists.buildroot.org/pipermail/buildroot/2020-November/599906.html

Heiko Thiery (3):
  package/freescale-imx/firmware-imx: copy all (lp)ddr files
    unconditionaly
  boot/uboot: copy ATF bl31 binary to uboot package dir
  boot/uboot: copy IMX firmware files to uboot package dir

 boot/uboot/Config.in                          | 12 +++++++
 boot/uboot/uboot.mk                           | 35 +++++++++++++++++++
 .../firmware-imx/firmware-imx.mk              | 10 ++++++
 3 files changed, 57 insertions(+)

-- 
2.30.0

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 1/3] package/freescale-imx/firmware-imx: copy all (lp)ddr files unconditionaly
  2021-09-06  9:42 [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Heiko Thiery
@ 2021-09-06  9:42 ` Heiko Thiery
  2021-09-07  8:29   ` Gary Bisson
  2021-09-06  9:42 ` [Buildroot] [PATCH 2/3] boot/uboot: copy ATF bl31 binary to uboot package dir Heiko Thiery
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 19+ messages in thread
From: Heiko Thiery @ 2021-09-06  9:42 UTC (permalink / raw)
  To: buildroot
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	Heiko Thiery, Fabio Estevam, Xavier Roumegue

In mainline u-boot more and more imx8 boards are switched to binman
to create the imx specific image (flash.bin). To support this the
(lp)ddr firmware training files are needed. For this to work all files
should be made available to the U-Boot build.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk
index 1076cf85f1..29241342be 100644
--- a/package/freescale-imx/firmware-imx/firmware-imx.mk
+++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
@@ -51,6 +51,11 @@ define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
 		$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_2d_fw.bin > \
 		$(BINARIES_DIR)/lpddr4_pmu_train_fw.bin
 	ln -sf $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin $(BINARIES_DIR)/ddr_fw.bin
+
+	# U-Boot supports creation of the combined flash.bin image. To make
+	# sure that U-Boot can access all available files copy them to
+	# the binary dir.
+	cp $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4*.bin $(BINARIES_DIR)/
 endef
 endif
 
@@ -69,6 +74,11 @@ define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
 		$(FIRMWARE_IMX_DDRFW_DIR)/ddr4_2d_201810_fw.bin > \
 		$(BINARIES_DIR)/ddr4_201810_fw.bin
 	ln -sf $(BINARIES_DIR)/ddr4_201810_fw.bin $(BINARIES_DIR)/ddr_fw.bin
+
+	# U-Boot supports creation of the combined flash.bin image. To make
+	# sure that U-Boot can access all available files copy them to
+	# the binary dir.
+	cp $(FIRMWARE_IMX_DDRFW_DIR)/ddr4*.bin $(BINARIES_DIR)/
 endef
 endif
 
-- 
2.30.0

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 2/3] boot/uboot: copy ATF bl31 binary to uboot package dir
  2021-09-06  9:42 [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Heiko Thiery
  2021-09-06  9:42 ` [Buildroot] [PATCH 1/3] package/freescale-imx/firmware-imx: copy all (lp)ddr files unconditionaly Heiko Thiery
@ 2021-09-06  9:42 ` Heiko Thiery
  2021-09-06 10:23   ` Michael Walle
  2021-09-06  9:42 ` [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files " Heiko Thiery
  2021-09-06 12:25 ` [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Fabio Estevam
  3 siblings, 1 reply; 19+ messages in thread
From: Heiko Thiery @ 2021-09-06  9:42 UTC (permalink / raw)
  To: buildroot
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	Heiko Thiery, Fabio Estevam, Xavier Roumegue

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(+)

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
 
-- 
2.30.0

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files to uboot package dir
  2021-09-06  9:42 [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Heiko Thiery
  2021-09-06  9:42 ` [Buildroot] [PATCH 1/3] package/freescale-imx/firmware-imx: copy all (lp)ddr files unconditionaly Heiko Thiery
  2021-09-06  9:42 ` [Buildroot] [PATCH 2/3] boot/uboot: copy ATF bl31 binary to uboot package dir Heiko Thiery
@ 2021-09-06  9:42 ` Heiko Thiery
  2021-09-06 12:45   ` Stephane Viau (OSS)
  2021-09-06 12:25 ` [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Fabio Estevam
  3 siblings, 1 reply; 19+ messages in thread
From: Heiko Thiery @ 2021-09-06  9:42 UTC (permalink / raw)
  To: buildroot
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	Heiko Thiery, Fabio Estevam, Xavier Roumegue

If the U-Boot image is to be build with binman and one of the IMX
firmware files (ddr, hdmi) is used, the files are expected in the
toplevel directory.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 boot/uboot/Config.in | 12 ++++++++++++
 boot/uboot/uboot.mk  | 27 +++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 0854fb13cc..da518db118 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -239,6 +239,18 @@ config BR2_TARGET_UBOOT_NEEDS_OPENSBI
 	  and that the OpenSBI variable pointing to OpenSBI binary,
 	  is passed during the Buildroot build.
 
+config BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE
+	bool "U-Boot needs firmware-imx"
+	depends on BR2_PACKAGE_FIRMWARE_IMX
+	depends on BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW || \
+		BR2_PACKAGE_FIRMWARE_IMX_NEEDS_HDMI_FW
+	help
+	  Some IMX platforms (such as iMX8m, iMX8mq, iIMX8mm, iIMX8mn)
+	  encapsulate NXP specific firmware (DDR, HDMI) inside U-Boot.
+	  This option makes sure the imx firmware gets built prior to
+	  U-Boot and copies the files from the buildroot binary dir
+	  into the U-Boot source dir.
+
 menu "U-Boot binary format"
 
 config BR2_TARGET_UBOOT_FORMAT_AIS
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 1a840d9cc1..cf8d6b1f39 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -180,6 +180,33 @@ UBOOT_DEPENDENCIES += opensbi
 UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin
 endif
 
+# New U-Boot versions can create the IMX specific boot images
+# and needs the some NXP firmware blobs.
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE),y)
+UBOOT_DEPENDENCIES += firmware-imx
+
+ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_NEEDS_HDMI_FW),y)
+define UBOOT_COPY_IMX_DDR_FIRMWARE
+	cp $(BINARIES_DIR)/signed_hdmi_imx8m.bin $(@D)/
+endef
+UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_IMX_DDR_FIRMWARE
+endif
+
+ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_LPDDR4),y)
+define UBOOT_COPY_IMX_LPDDR4_FIRMWARE
+	cp $(BINARIES_DIR)/lpddr4*.bin $(@D)/
+endef
+UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_IMX_LPDDR4_FIRMWARE
+endif
+
+ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_DDR4),y)
+define UBOOT_COPY_IMX_DDR4_FIRMWARE
+	cp $(BINARIES_DIR)/ddr4*.bin $(@D)/
+endef
+UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_IMX_DDR4_FIRMWARE
+endif
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
 UBOOT_DEPENDENCIES += host-dtc
 endif
-- 
2.30.0

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 2/3] boot/uboot: copy ATF bl31 binary to uboot package dir
  2021-09-06  9:42 ` [Buildroot] [PATCH 2/3] boot/uboot: copy ATF bl31 binary to uboot package dir Heiko Thiery
@ 2021-09-06 10:23   ` Michael Walle
  2021-09-07  9:16     ` Heiko Thiery
  0 siblings, 1 reply; 19+ messages in thread
From: Michael Walle @ 2021-09-06 10:23 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Fabio Estevam, Xavier Roumegue

Am 2021-09-06 11:42, schrieb Heiko Thiery:
> If the U-Boot image is to be built with binman and the ATF binary is

btw TF-A is the new name for ATF ;)

-michael
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
  2021-09-06  9:42 [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Heiko Thiery
                   ` (2 preceding siblings ...)
  2021-09-06  9:42 ` [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files " Heiko Thiery
@ 2021-09-06 12:25 ` Fabio Estevam
  2021-09-06 13:32   ` Heiko Thiery
  3 siblings, 1 reply; 19+ messages in thread
From: Fabio Estevam @ 2021-09-06 12:25 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Xavier Roumegue

Hi Heiko,

On Mon, Sep 6, 2021 at 6:42 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> New U-Boot version support building the flash.bin bootimage using
> binman. For that the imx specific firmware files like (LP)DDR and HDMI
> firmware has to be located in the u-boot builddirectory.
>
> Xavier Roumegue already posted a patchset [1] to add this support but did no
> follow up version after getting review comments.
>
> I have taken up these comments and prepared the patchset.
>
> [1] https://lists.buildroot.org/pipermail/buildroot/2020-November/599906.html
>
> Heiko Thiery (3):
>   package/freescale-imx/firmware-imx: copy all (lp)ddr files
>     unconditionaly
>   boot/uboot: copy ATF bl31 binary to uboot package dir
>   boot/uboot: copy IMX firmware files to uboot package dir

Thanks for working on this.

Would you have a git tree with all the required Buildroot patches to
get a bootable imx8mm image?

Thanks,

Fabio Estevam
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files to uboot package dir
  2021-09-06  9:42 ` [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files " Heiko Thiery
@ 2021-09-06 12:45   ` Stephane Viau (OSS)
  2021-09-06 12:48     ` Fabio Estevam
  0 siblings, 1 reply; 19+ messages in thread
From: Stephane Viau (OSS) @ 2021-09-06 12:45 UTC (permalink / raw)
  To: Heiko Thiery, buildroot
  Cc: Gary Bisson, Xavier Roumegue, Fabio Estevam, Refik Tuzakli,
	Thomas Petazzoni

Hi Heiko, 

Thank you for the patch set.

>
>If the U-Boot image is to be build with binman and one of the IMX

s/build/built
s/IMX/i.MX

>firmware files (ddr, hdmi) is used, the files are expected in the
>toplevel directory.
>
>Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
>---
> boot/uboot/Config.in | 12 ++++++++++++
> boot/uboot/uboot.mk  | 27 +++++++++++++++++++++++++++
> 2 files changed, 39 insertions(+)
>
>diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
>index 0854fb13cc..da518db118 100644
>--- a/boot/uboot/Config.in
>+++ b/boot/uboot/Config.in
>@@ -239,6 +239,18 @@ config BR2_TARGET_UBOOT_NEEDS_OPENSBI
>          and that the OpenSBI variable pointing to OpenSBI binary,
>          is passed during the Buildroot build.
>
>+config BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE
>+       bool "U-Boot needs firmware-imx"
>+       depends on BR2_PACKAGE_FIRMWARE_IMX
>+       depends on BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW || \
>+               BR2_PACKAGE_FIRMWARE_IMX_NEEDS_HDMI_FW
>+       help
>+         Some IMX platforms (such as iMX8m, iMX8mq, iIMX8mm, iIMX8mn)

You could use "i.MX 8M." for consistency.

>+         encapsulate NXP specific firmware (DDR, HDMI) inside U-Boot.

Are other firmware binaries also concerned (I did not check the U-Boot code) ;
such as VPU, SDMA, ... ?

BR, 
Stephane.

>+         This option makes sure the imx firmware gets built prior to
>+         U-Boot and copies the files from the buildroot binary dir
>+         into the U-Boot source dir.
>+
> menu "U-Boot binary format"
>
> config BR2_TARGET_UBOOT_FORMAT_AIS
>diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
>index 1a840d9cc1..cf8d6b1f39 100644
>--- a/boot/uboot/uboot.mk
>+++ b/boot/uboot/uboot.mk
>@@ -180,6 +180,33 @@ UBOOT_DEPENDENCIES += opensbi
> UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin
> endif
>
>+# New U-Boot versions can create the IMX specific boot images
>+# and needs the some NXP firmware blobs.
>+ifeq ($(BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE),y)
>+UBOOT_DEPENDENCIES += firmware-imx
>+
>+ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_NEEDS_HDMI_FW),y)
>+define UBOOT_COPY_IMX_DDR_FIRMWARE
>+       cp $(BINARIES_DIR)/signed_hdmi_imx8m.bin $(@D)/
>+endef
>+UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_IMX_DDR_FIRMWARE
>+endif
>+
>+ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_LPDDR4),y)
>+define UBOOT_COPY_IMX_LPDDR4_FIRMWARE
>+       cp $(BINARIES_DIR)/lpddr4*.bin $(@D)/
>+endef
>+UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_IMX_LPDDR4_FIRMWARE
>+endif
>+
>+ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_DDR4),y)
>+define UBOOT_COPY_IMX_DDR4_FIRMWARE
>+       cp $(BINARIES_DIR)/ddr4*.bin $(@D)/
>+endef
>+UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_IMX_DDR4_FIRMWARE
>+endif
>+endif
>+
> ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y)
> UBOOT_DEPENDENCIES += host-dtc
> endif
>--
>2.30.0
>
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files to uboot package dir
  2021-09-06 12:45   ` Stephane Viau (OSS)
@ 2021-09-06 12:48     ` Fabio Estevam
  2021-09-06 12:57       ` Stephane Viau (OSS)
  0 siblings, 1 reply; 19+ messages in thread
From: Fabio Estevam @ 2021-09-06 12:48 UTC (permalink / raw)
  To: Stephane Viau (OSS)
  Cc: Gary Bisson, Xavier Roumegue, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Heiko Thiery

Hi Stephane,

On Mon, Sep 6, 2021 at 9:45 AM Stephane Viau (OSS)
<stephane.viau@oss.nxp.com> wrote:

> >+         encapsulate NXP specific firmware (DDR, HDMI) inside U-Boot.
>
> Are other firmware binaries also concerned (I did not check the U-Boot code) ;
> such as VPU, SDMA, ... ?

U-Boot does not need the VPU and SDMA firmwares, as they are only used
by the kernel.

Regards,

Fabio Estevam
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files to uboot package dir
  2021-09-06 12:48     ` Fabio Estevam
@ 2021-09-06 12:57       ` Stephane Viau (OSS)
  2021-09-06 13:20         ` Heiko Thiery
  0 siblings, 1 reply; 19+ messages in thread
From: Stephane Viau (OSS) @ 2021-09-06 12:57 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Gary Bisson, Xavier Roumegue, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Heiko Thiery


>Hi Stephane,

Hi Fabio, 

>
>On Mon, Sep 6, 2021 at 9:45 AM Stephane Viau (OSS)
><stephane.viau@oss.nxp.com> wrote:
>
>> >+         encapsulate NXP specific firmware (DDR, HDMI) inside U-Boot.
>>
>> Are other firmware binaries also concerned (I did not check the U-Boot code) ;
>> such as VPU, SDMA, ... ?
>
>U-Boot does not need the VPU and SDMA firmwares, as they are only used
>by the kernel.

Indeed ; thanks!

BR,
Stephane.

>
>Regards,
>
>Fabio Estevam
>
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files to uboot package dir
  2021-09-06 12:57       ` Stephane Viau (OSS)
@ 2021-09-06 13:20         ` Heiko Thiery
  0 siblings, 0 replies; 19+ messages in thread
From: Heiko Thiery @ 2021-09-06 13:20 UTC (permalink / raw)
  To: Stephane Viau (OSS)
  Cc: Gary Bisson, Xavier Roumegue, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Fabio Estevam

Hi Stephane,

Am Mo., 6. Sept. 2021 um 14:57 Uhr schrieb Stephane Viau (OSS)
<stephane.viau@oss.nxp.com>:
>
>
> >Hi Stephane,
>
> Hi Fabio,
>
> >
> >On Mon, Sep 6, 2021 at 9:45 AM Stephane Viau (OSS)
> ><stephane.viau@oss.nxp.com> wrote:
> >
> >> >+         encapsulate NXP specific firmware (DDR, HDMI) inside U-Boot.
> >>
> >> Are other firmware binaries also concerned (I did not check the U-Boot code) ;
> >> such as VPU, SDMA, ... ?
> >
> >U-Boot does not need the VPU and SDMA firmwares, as they are only used
> >by the kernel.
>
> Indeed ; thanks!

As Fabio said, I think only the DDR and the HDMI firmware has to be
integrated into the uboot/spl and is used by binman to package the
e.g. "flash.bin". At least for the imx8mm and the imx8mq based board I
saw that.

-- 
Heiko
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
  2021-09-06 12:25 ` [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Fabio Estevam
@ 2021-09-06 13:32   ` Heiko Thiery
  2021-09-06 15:23     ` Fabio Estevam
  0 siblings, 1 reply; 19+ messages in thread
From: Heiko Thiery @ 2021-09-06 13:32 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Xavier Roumegue

Hi Fabio,

Am Mo., 6. Sept. 2021 um 14:25 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Hi Heiko,
>
> On Mon, Sep 6, 2021 at 6:42 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> >
> > New U-Boot version support building the flash.bin bootimage using
> > binman. For that the imx specific firmware files like (LP)DDR and HDMI
> > firmware has to be located in the u-boot builddirectory.
> >
> > Xavier Roumegue already posted a patchset [1] to add this support but did no
> > follow up version after getting review comments.
> >
> > I have taken up these comments and prepared the patchset.
> >
> > [1] https://lists.buildroot.org/pipermail/buildroot/2020-November/599906.html
> >
> > Heiko Thiery (3):
> >   package/freescale-imx/firmware-imx: copy all (lp)ddr files
> >     unconditionaly
> >   boot/uboot: copy ATF bl31 binary to uboot package dir
> >   boot/uboot: copy IMX firmware files to uboot package dir
>
> Thanks for working on this.
>
> Would you have a git tree with all the required Buildroot patches to
> get a bootable imx8mm image?

What board are you exactly asking for? the nxp imx8mm evk? I have a
tree for the kontron pitx-imx8m [1] that has an i.MX8MQ.

Maybe this also answers your question ;-/

[1] https://github.com/hthiery/buildroot/tree/uboot-imx

-- 
Heiko
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
  2021-09-06 13:32   ` Heiko Thiery
@ 2021-09-06 15:23     ` Fabio Estevam
  2021-09-07  6:36       ` Heiko Thiery
  0 siblings, 1 reply; 19+ messages in thread
From: Fabio Estevam @ 2021-09-06 15:23 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Xavier Roumegue

Hi Heiko,

On Mon, Sep 6, 2021 at 10:32 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:

> What board are you exactly asking for? the nxp imx8mm evk? I have a
> tree for the kontron pitx-imx8m [1] that has an i.MX8MQ.
>
> Maybe this also answers your question ;-/
>
> [1] https://github.com/hthiery/buildroot/tree/uboot-imx

This helps, thanks.

I am wondering if we could make the files below generic?

board/kontron/pitx-imx8m/post-build.sh
board/kontron/pitx-imx8m/post-image.sh
board/kontron/pitx-imx8m/genimage.cfg

Thanks
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
  2021-09-06 15:23     ` Fabio Estevam
@ 2021-09-07  6:36       ` Heiko Thiery
  2021-09-07  8:36         ` Gary Bisson
  0 siblings, 1 reply; 19+ messages in thread
From: Heiko Thiery @ 2021-09-07  6:36 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Xavier Roumegue

Hi Fabio,

Am Mo., 6. Sept. 2021 um 17:23 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Hi Heiko,
>
> On Mon, Sep 6, 2021 at 10:32 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> > What board are you exactly asking for? the nxp imx8mm evk? I have a
> > tree for the kontron pitx-imx8m [1] that has an i.MX8MQ.
> >
> > Maybe this also answers your question ;-/
> >
> > [1] https://github.com/hthiery/buildroot/tree/uboot-imx
>
> This helps, thanks.
>
> I am wondering if we could make the files below generic?
>
> board/kontron/pitx-imx8m/post-build.sh
This is dependent on the boot method used by the board. Here we use a
boot script. But other than that can use e.g. extlinux. I think this
is not a candidate we can make generically.

> board/kontron/pitx-imx8m/post-image.sh
This calls the genimage. This could be removed and added directly into
the defconfig as BR2_ROOTFS_POST_IMAGE_SCRIPT.

> board/kontron/pitx-imx8m/genimage.cfg
Here I', not sure. Because it depends on the used bootmethod how the
image should look like. E.g. do we need to have a boot partion on not.

-- 
Heiko
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 1/3] package/freescale-imx/firmware-imx: copy all (lp)ddr files unconditionaly
  2021-09-06  9:42 ` [Buildroot] [PATCH 1/3] package/freescale-imx/firmware-imx: copy all (lp)ddr files unconditionaly Heiko Thiery
@ 2021-09-07  8:29   ` Gary Bisson
  0 siblings, 0 replies; 19+ messages in thread
From: Gary Bisson @ 2021-09-07  8:29 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Fabio Estevam, Xavier Roumegue

Hi Thiery,

Thanks for looking into this.

On Mon, Sep 06, 2021 at 11:42:14AM +0200, Heiko Thiery wrote:
> In mainline u-boot more and more imx8 boards are switched to binman
> to create the imx specific image (flash.bin). To support this the
> (lp)ddr firmware training files are needed. For this to work all files
> should be made available to the U-Boot build.
> 
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

Reviewed-by: Gary Bisson <gary.bisson@boundarydevices.com>

Hopefully after all configs switch to that mechanism we could get rid of
the old way of creating 1 ddr binary from the package.

Regards,
Gary
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
  2021-09-07  6:36       ` Heiko Thiery
@ 2021-09-07  8:36         ` Gary Bisson
  2021-09-07  8:43           ` Heiko Thiery
  0 siblings, 1 reply; 19+ messages in thread
From: Gary Bisson @ 2021-09-07  8:36 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Fabio Estevam, Xavier Roumegue

Hi Thiery,

On Tue, Sep 07, 2021 at 08:36:30AM +0200, Heiko Thiery wrote:
> Hi Fabio,
> 
> Am Mo., 6. Sept. 2021 um 17:23 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
> >
> > Hi Heiko,
> >
> > On Mon, Sep 6, 2021 at 10:32 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> >
> > > What board are you exactly asking for? the nxp imx8mm evk? I have a
> > > tree for the kontron pitx-imx8m [1] that has an i.MX8MQ.
> > >
> > > Maybe this also answers your question ;-/
> > >
> > > [1] https://github.com/hthiery/buildroot/tree/uboot-imx
> >
> > This helps, thanks.

I've tried this series with our U-Boot (2020.07 based) and it doesn't
work for me as using UBOOT_FORMAT_CUSTOM isn't sufficient as it only
copies the binaries selected but doesn't use it as target [1].

So I wonder, which U-Boot version are you using? Is the flash.bin
created automatically when issuing 'make all'?
In my version of U-Boot it requires to use 'make flash.bin' otherwise it
simply doesn't generate flash.bin.

I believe we would still need a new U-Boot target name [2] but I'd like
to understand how it worked for you

Regards,
Gary

[1] https://github.com/buildroot/buildroot/blob/master/boot/uboot/uboot.mk#L135
[2] http://patchwork.ozlabs.org/project/buildroot/patch/20201125183017.15585-5-xroumegue@gmail.com/
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
  2021-09-07  8:36         ` Gary Bisson
@ 2021-09-07  8:43           ` Heiko Thiery
  2021-09-07  8:57             ` Gary Bisson
  0 siblings, 1 reply; 19+ messages in thread
From: Heiko Thiery @ 2021-09-07  8:43 UTC (permalink / raw)
  To: Gary Bisson
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Fabio Estevam, Xavier Roumegue

Hi Gary,

Am Di., 7. Sept. 2021 um 10:36 Uhr schrieb Gary Bisson
<gary.bisson@boundarydevices.com>:
>
> Hi Thiery,
>
> On Tue, Sep 07, 2021 at 08:36:30AM +0200, Heiko Thiery wrote:
> > Hi Fabio,
> >
> > Am Mo., 6. Sept. 2021 um 17:23 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
> > >
> > > Hi Heiko,
> > >
> > > On Mon, Sep 6, 2021 at 10:32 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> > >
> > > > What board are you exactly asking for? the nxp imx8mm evk? I have a
> > > > tree for the kontron pitx-imx8m [1] that has an i.MX8MQ.
> > > >
> > > > Maybe this also answers your question ;-/
> > > >
> > > > [1] https://github.com/hthiery/buildroot/tree/uboot-imx
> > >
> > > This helps, thanks.
>
> I've tried this series with our U-Boot (2020.07 based) and it doesn't
> work for me as using UBOOT_FORMAT_CUSTOM isn't sufficient as it only
> copies the binaries selected but doesn't use it as target [1].
>
> So I wonder, which U-Boot version are you using? Is the flash.bin
> created automatically when issuing 'make all'?
> In my version of U-Boot it requires to use 'make flash.bin' otherwise it
> simply doesn't generate flash.bin.
>
> I believe we would still need a new U-Boot target name [2] but I'd like
> to understand how it worked for you

Yes, when switching to binman the "make all" target will create the
flash.bin (all output that is defined/described in binman). So in your
case when you use the "old" u-boot way of creating this output we have
to add a new u-boot target in buildroot.

-- 
Heiko
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
  2021-09-07  8:43           ` Heiko Thiery
@ 2021-09-07  8:57             ` Gary Bisson
  2021-09-07  9:03               ` Heiko Thiery
  0 siblings, 1 reply; 19+ messages in thread
From: Gary Bisson @ 2021-09-07  8:57 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Fabio Estevam, Xavier Roumegue

Hi Thiery,

On Tue, Sep 07, 2021 at 10:43:43AM +0200, Heiko Thiery wrote:
> Hi Gary,
> 
> Am Di., 7. Sept. 2021 um 10:36 Uhr schrieb Gary Bisson
> <gary.bisson@boundarydevices.com>:
> >
> > Hi Thiery,
> >
> > On Tue, Sep 07, 2021 at 08:36:30AM +0200, Heiko Thiery wrote:
> > > Hi Fabio,
> > >
> > > Am Mo., 6. Sept. 2021 um 17:23 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
> > > >
> > > > Hi Heiko,
> > > >
> > > > On Mon, Sep 6, 2021 at 10:32 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> > > >
> > > > > What board are you exactly asking for? the nxp imx8mm evk? I have a
> > > > > tree for the kontron pitx-imx8m [1] that has an i.MX8MQ.
> > > > >
> > > > > Maybe this also answers your question ;-/
> > > > >
> > > > > [1] https://github.com/hthiery/buildroot/tree/uboot-imx
> > > >
> > > > This helps, thanks.
> >
> > I've tried this series with our U-Boot (2020.07 based) and it doesn't
> > work for me as using UBOOT_FORMAT_CUSTOM isn't sufficient as it only
> > copies the binaries selected but doesn't use it as target [1].
> >
> > So I wonder, which U-Boot version are you using? Is the flash.bin
> > created automatically when issuing 'make all'?
> > In my version of U-Boot it requires to use 'make flash.bin' otherwise it
> > simply doesn't generate flash.bin.
> >
> > I believe we would still need a new U-Boot target name [2] but I'd like
> > to understand how it worked for you
> 
> Yes, when switching to binman the "make all" target will create the
> flash.bin (all output that is defined/described in binman). So in your
> case when you use the "old" u-boot way of creating this output we have
> to add a new u-boot target in buildroot.

Thanks for the quick reply. Indeed I just saw in your U-Boot tree how
the binman description was done, it's pretty neat.
So do you know if the flash.bin target is here to stay in U-Boot or is
binman to new way to go and flash.bin becomes an outdated target? I know
it's more of a U-Boot question than Buildroot but just to understand if
it even makes sense to add the target if it's going to disappear in
upcoming releases.

Regards,
Gary
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot
  2021-09-07  8:57             ` Gary Bisson
@ 2021-09-07  9:03               ` Heiko Thiery
  0 siblings, 0 replies; 19+ messages in thread
From: Heiko Thiery @ 2021-09-07  9:03 UTC (permalink / raw)
  To: Gary Bisson
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Fabio Estevam, Xavier Roumegue

Hi Gary,

Am Di., 7. Sept. 2021 um 10:58 Uhr schrieb Gary Bisson
<gary.bisson@boundarydevices.com>:
>
> Hi Thiery,
>
> On Tue, Sep 07, 2021 at 10:43:43AM +0200, Heiko Thiery wrote:
> > Hi Gary,
> >
> > Am Di., 7. Sept. 2021 um 10:36 Uhr schrieb Gary Bisson
> > <gary.bisson@boundarydevices.com>:
> > >
> > > Hi Thiery,
> > >
> > > On Tue, Sep 07, 2021 at 08:36:30AM +0200, Heiko Thiery wrote:
> > > > Hi Fabio,
> > > >
> > > > Am Mo., 6. Sept. 2021 um 17:23 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
> > > > >
> > > > > Hi Heiko,
> > > > >
> > > > > On Mon, Sep 6, 2021 at 10:32 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> > > > >
> > > > > > What board are you exactly asking for? the nxp imx8mm evk? I have a
> > > > > > tree for the kontron pitx-imx8m [1] that has an i.MX8MQ.
> > > > > >
> > > > > > Maybe this also answers your question ;-/
> > > > > >
> > > > > > [1] https://github.com/hthiery/buildroot/tree/uboot-imx
> > > > >
> > > > > This helps, thanks.
> > >
> > > I've tried this series with our U-Boot (2020.07 based) and it doesn't
> > > work for me as using UBOOT_FORMAT_CUSTOM isn't sufficient as it only
> > > copies the binaries selected but doesn't use it as target [1].
> > >
> > > So I wonder, which U-Boot version are you using? Is the flash.bin
> > > created automatically when issuing 'make all'?
> > > In my version of U-Boot it requires to use 'make flash.bin' otherwise it
> > > simply doesn't generate flash.bin.
> > >
> > > I believe we would still need a new U-Boot target name [2] but I'd like
> > > to understand how it worked for you
> >
> > Yes, when switching to binman the "make all" target will create the
> > flash.bin (all output that is defined/described in binman). So in your
> > case when you use the "old" u-boot way of creating this output we have
> > to add a new u-boot target in buildroot.
>
> Thanks for the quick reply. Indeed I just saw in your U-Boot tree how
> the binman description was done, it's pretty neat.
> So do you know if the flash.bin target is here to stay in U-Boot or is
> binman to new way to go and flash.bin becomes an outdated target? I know
> it's more of a U-Boot question than Buildroot but just to understand if
> it even makes sense to add the target if it's going to disappear in
> upcoming releases.

As far as I understand the goal is to switch to binman for all boards.
That would mean the flash.bin target will disappear. But what about
having a custom build target in buildroot?

-- 
Heiko
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH 2/3] boot/uboot: copy ATF bl31 binary to uboot package dir
  2021-09-06 10:23   ` Michael Walle
@ 2021-09-07  9:16     ` Heiko Thiery
  0 siblings, 0 replies; 19+ messages in thread
From: Heiko Thiery @ 2021-09-07  9:16 UTC (permalink / raw)
  To: Michael Walle
  Cc: Gary Bisson, Stephane Viau, Refik Tuzakli, Thomas Petazzoni,
	buildroot, Fabio Estevam, Xavier Roumegue

Hi Michael,

Am Mo., 6. Sept. 2021 um 12:23 Uhr schrieb Michael Walle <michael@walle.cc>:
>
> Am 2021-09-06 11:42, schrieb Heiko Thiery:
> > If the U-Boot image is to be built with binman and the ATF binary is
>
> btw TF-A is the new name for ATF ;)

Good to know. But for consistency I have used the ATF naming.

-- 
Heiko
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-09-07  9:16 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06  9:42 [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Heiko Thiery
2021-09-06  9:42 ` [Buildroot] [PATCH 1/3] package/freescale-imx/firmware-imx: copy all (lp)ddr files unconditionaly Heiko Thiery
2021-09-07  8:29   ` Gary Bisson
2021-09-06  9:42 ` [Buildroot] [PATCH 2/3] boot/uboot: copy ATF bl31 binary to uboot package dir Heiko Thiery
2021-09-06 10:23   ` Michael Walle
2021-09-07  9:16     ` Heiko Thiery
2021-09-06  9:42 ` [Buildroot] [PATCH 3/3] boot/uboot: copy IMX firmware files " Heiko Thiery
2021-09-06 12:45   ` Stephane Viau (OSS)
2021-09-06 12:48     ` Fabio Estevam
2021-09-06 12:57       ` Stephane Viau (OSS)
2021-09-06 13:20         ` Heiko Thiery
2021-09-06 12:25 ` [Buildroot] [PATCH 0/3] Add support to build imx8 images using mainline uboot Fabio Estevam
2021-09-06 13:32   ` Heiko Thiery
2021-09-06 15:23     ` Fabio Estevam
2021-09-07  6:36       ` Heiko Thiery
2021-09-07  8:36         ` Gary Bisson
2021-09-07  8:43           ` Heiko Thiery
2021-09-07  8:57             ` Gary Bisson
2021-09-07  9:03               ` Heiko Thiery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.