Skip to contentSkip to conversation

package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

PATCH New Sébastien Szymanski 5 participants 13 messages Jun 15, 2020 – Jun 24, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

i.MX8M, i.MX8MM and i.MX8MN have sdma controllers so install sdma firmware for these SoCs. Mainline and NXP kernels expect the sdma firmware to be in /lib/firmware/imx/sdma so fix the install path at the same time.

---
 .../freescale-imx/firmware-imx/firmware-imx.mk  | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)
package/freescale-imx/firmware-imx/firmware-imx.mk +5 -12
index 9fd1c54b48..725f275948 100644
@@ -12,7 +12,7 @@ FIRMWARE_IMX_LICENSE = NXP Semiconductor Software License Agreement
 FIRMWARE_IMX_LICENSE_FILES = EULA COPYING
 FIRMWARE_IMX_REDISTRIBUTE = NO
 
-FIRMWARE_IMX_BLOBS = sdma vpu
+FIRMWARE_IMX_BLOBS = sdma epdc
 
 define FIRMWARE_IMX_EXTRACT_CMDS
 	$(call FREESCALE_IMX_EXTRACT_HELPER,$(FIRMWARE_IMX_DL_DIR)/$(FIRMWARE_IMX_SOURCE))
@@ -84,23 +84,16 @@ define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
 	$(FIRMWARE_IMX_PREPARE_DDR_FW)
 	$(FIRMWARE_IMX_PREPARE_HDMI_FW)
 endef
-else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)
-define FIRMWARE_IMX_INSTALL_TARGET_CMDS
-	$(INSTALL) -D -m 0644 $(@D)/firmware/vpu/vpu_fw_imx8_dec.bin \
-		$(TARGET_DIR)/lib/firmware/vpu/vpu_fw_imx8_dec.bin
-	$(INSTALL) -D -m 0644 $(@D)/firmware/vpu/vpu_fw_imx8_enc.bin \
-		$(TARGET_DIR)/lib/firmware/vpu/vpu_fw_imx8_enc.bin
-endef
-else
+endif
+
 define FIRMWARE_IMX_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/lib/firmware/imx
+	cp -r $(@D)/firmware/vpu $(TARGET_DIR)/lib/firmware
 	for blobdir in $(FIRMWARE_IMX_BLOBS); do \
-		cp -r $(@D)/firmware/$${blobdir} $(TARGET_DIR)/lib/firmware; \
+		cp -r $(@D)/firmware/$${blobdir} $(TARGET_DIR)/lib/firmware/imx; \
 	done
-	cp -r $(@D)/firmware/epdc $(TARGET_DIR)/lib/firmware/imx
 	mv $(TARGET_DIR)/lib/firmware/imx/epdc/epdc_ED060XH2C1.fw.nonrestricted \
 		$(TARGET_DIR)/lib/firmware/imx/epdc/epdc_ED060XH2C1.fw
 endef
-endif
 
 $(eval $(generic-package))
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/3 package/freescale-imx/firmware-imx: install easrc firmware for i.MX8MN

On i.MX8MN, the easrc driver needs a firmware in /lib/firmwareimx/easrc/ so install it.

---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 3 +++
 1 file changed, 3 insertions(+)
package/freescale-imx/firmware-imx/firmware-imx.mk +3 -0
index 725f275948..49fda89f28 100644
@@ -13,6 +13,9 @@ FIRMWARE_IMX_LICENSE_FILES = EULA COPYING
 FIRMWARE_IMX_REDISTRIBUTE = NO
 
 FIRMWARE_IMX_BLOBS = sdma epdc
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN),y)
+FIRMWARE_IMX_BLOBS += easrc
+endif
 
 define FIRMWARE_IMX_EXTRACT_CMDS
 	$(call FREESCALE_IMX_EXTRACT_HELPER,$(FIRMWARE_IMX_DL_DIR)/$(FIRMWARE_IMX_SOURCE))
Signature · 1 line
2.26.2
#2 lore raw

PATCH 3/3 package/freescale-imx/firmware-imx: bump version to 8.6

In reply to Sébastien Szymanski

This package needed to be updated to be aligned with NXP BSP 5.4.3_1.0.0.

---
 package/freescale-imx/firmware-imx/firmware-imx.hash | 6 +++---
 package/freescale-imx/firmware-imx/firmware-imx.mk   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
package/freescale-imx/firmware-imx/firmware-imx.hash +3 -3
index e49ce085bf..54a3dafcc0 100644
@@ -1,4 +1,4 @@
 # Locally calculated
-sha256  45b0a7392e7a4b2e6c7e1cb988dd660ff3f8cd465afdf796ff840a00db08389d  firmware-imx-8.5.bin
-sha256  9665930f69c0b6f4a4c055d7fe2b8ee563e771efbc83892abb1955e61492cdf7  EULA
-sha256  d55f024af2bfff714b90de596f6d0399124b999e8c18a86b13a3b507bae6f561  COPYING
+sha256  a7f4a22c05a990aad43a616e312847ab9d85ce00691b34fa8590d5c7c1d722e9  firmware-imx-8.6.bin
+sha256  1360edf65a32b66d28bcf2d53a1a1c2dc88d4e254c15da3d8e37bf1b6f1f19a1  EULA
+sha256  30ba26ae82fba4033513b67c2c3a00b00e78908d278568a7d648d3430875123a  COPYING
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
index 49fda89f28..f27afc5a3b 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FIRMWARE_IMX_VERSION = 8.5
+FIRMWARE_IMX_VERSION = 8.6
 FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE)
 FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin
 
Signature · 1 line
2.26.2
#3 lore raw

PATCH 3/3 package/freescale-imx/firmware-imx: bump version to 8.6

Hi Sebastien,

Quoted 4 lines · S?bastien Szymanski

This package needed to be updated to be aligned with NXP BSP 5.4.3_1.0.0.

Looks good, thanks! Only addition I would do in the commit log, explaining the update of COPYING/EULA, from what I see:
- update to LA_OPT_NXP_Software_License v10 December 2019
- addition of Crank, EmSA and TARA Systems restrictions

Also, this update from 8.5 to 8.6 only updates the imx8 vpu firmware files.

Regards,
Gary

#4 lore raw

PATCH 3/3 package/freescale-imx/firmware-imx: bump version to 8.6

In reply to Sébastien Szymanski
Quoted 8 lines · On Mon, 15 Jun 2020 15:06:33 +0200 S?bastien Szymanski…

This package needed to be updated to be aligned with NXP BSP 5.4.3_1.0.0.

---
 package/freescale-imx/firmware-imx/firmware-imx.hash | 6 +++---
 package/freescale-imx/firmware-imx/firmware-imx.mk   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Applied to master with a commit extended using the details provided by Gary Bisson. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
reviewer
#5 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

In reply to Sébastien Szymanski

Hi S?bastien,

package/freescale-imx/firmware-imx/firmware-imx.mk FIRMWARE_IMX_LICENSE = NXP Semiconductor Software License Agreement · line 15

Quoted 2 lines · S?bastien Szymanski
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
-FIRMWARE_IMX_BLOBS = sdma vpu
+FIRMWARE_IMX_BLOBS = sdma epdc

The commit log does not mention about removing the VPU firmware and adding the EPDC one.

What is the reason for not installing the VPU firmware?

#6 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

Hi Fabio,

Quoted 5 lines · Fabio Estevam

Hi S?bastien,

On Mon, Jun 15, 2020 at 10:44 AM S?bastien Szymanski <[email protected]> wrote:

Quoted 8 lines

package/freescale-imx/firmware-imx/firmware-imx.mk FIRMWARE_IMX_LICENSE = NXP Semiconductor Software License Agreement · line 15

Quoted 2 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
-FIRMWARE_IMX_BLOBS = sdma vpu
+FIRMWARE_IMX_BLOBS = sdma epdc

The commit log does not mention about removing the VPU firmware and adding the EPDC one.

What is the reason for not installing the VPU firmware?

I use the FIRMWARE_IMX_BLOBS to list the firmwares that go into /lib/firmware/imx and also for patch 2.
The VPU firmwares still get installed in FIRMWARE_IMX_INSTALL_TARGET_CMDS. I have added a cp command for that.

Regards,

Signature · 2 lines
S?bastien Szymanski, Armadeus Systems
Software engineer
#7 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

Hi Sebastien,

Quoted 14 lines · S?bastien Szymanski

Hi Fabio,

Quoted 11 lines · Fabio Estevam

Hi S?bastien,

package/freescale-imx/firmware-imx/firmware-imx.mk FIRMWARE_IMX_LICENSE = NXP Semiconductor Software License Agreement · line 15

Quoted 2 lines · S?bastien Szymanski
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
-FIRMWARE_IMX_BLOBS = sdma vpu
+FIRMWARE_IMX_BLOBS = sdma epdc

The commit log does not mention about removing the VPU firmware and adding the EPDC one.

Quoted 7 lines
Quoted 2 lines

What is the reason for not installing the VPU firmware?

I use the FIRMWARE_IMX_BLOBS to list the firmwares that go into /lib/firmware/imx and also for patch 2.
The VPU firmwares still get installed in FIRMWARE_IMX_INSTALL_TARGET_CMDS. I have added a cp command for that.

Yes, but now you are installing all VPU + epdc firmware files for all platforms which is unnecessary.

Those should only be selected depending on the platform you are using, exactly what you do for easrc.

Regards,
Gary

#8 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

Hi Gary,

Quoted 20 lines · Gary Bisson

Hi Sebastien,

Quoted 17 lines · S?bastien Szymanski

Hi Fabio,

Quoted 13 lines · Fabio Estevam

Hi S?bastien,

package/freescale-imx/firmware-imx/firmware-imx.mk FIRMWARE_IMX_LICENSE = NXP Semiconductor Software License Agreement · line 15

Quoted 2 lines · S?bastien Szymanski
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
-FIRMWARE_IMX_BLOBS = sdma vpu
+FIRMWARE_IMX_BLOBS = sdma epdc

The commit log does not mention about removing the VPU firmware and adding the EPDC one.

What is the reason for not installing the VPU firmware?

Quoted 7 lines
Quoted 4 lines

I use the FIRMWARE_IMX_BLOBS to list the firmwares that go into /lib/firmware/imx and also for patch 2.
The VPU firmwares still get installed in FIRMWARE_IMX_INSTALL_TARGET_CMDS. I have added a cp command for that.

Yes, but now you are installing all VPU + epdc firmware files for all platforms which is unnecessary.

Yes, like it was done before my changes on all i.MX platforms but i.MX8. SDMA firmware files are also installed for all platforms.

Regards,

Quoted 6 lines

Those should only be selected depending on the platform you are using, exactly what you do for easrc.>
Regards,
Gary

Signature · 2 lines
S?bastien Szymanski, Armadeus Systems
Software engineer
#9 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

Hi Sebastien,

Quoted 28 lines · S?bastien Szymanski

Hi Gary,

Quoted 25 lines · Gary Bisson

Hi Sebastien,

Quoted 21 lines · S?bastien Szymanski

Hi Fabio,

Quoted 5 lines · Fabio Estevam

Hi S?bastien,

On Mon, Jun 15, 2020 at 10:44 AM S?bastien Szymanski <[email protected]> wrote:

Quoted 8 lines

package/freescale-imx/firmware-imx/firmware-imx.mk FIRMWARE_IMX_LICENSE = NXP Semiconductor Software License Agreement · line 15

Quoted 2 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
-FIRMWARE_IMX_BLOBS = sdma vpu
+FIRMWARE_IMX_BLOBS = sdma epdc

The commit log does not mention about removing the VPU firmware and adding the EPDC one.

What is the reason for not installing the VPU firmware?

I use the FIRMWARE_IMX_BLOBS to list the firmwares that go into /lib/firmware/imx and also for patch 2.
The VPU firmwares still get installed in FIRMWARE_IMX_INSTALL_TARGET_CMDS. I have added a cp command for that.

Quoted 5 lines
Quoted 2 lines

Yes, but now you are installing all VPU + epdc firmware files for all platforms which is unnecessary.

Yes, like it was done before my changes on all i.MX platforms but i.MX8. SDMA firmware files are also installed for all platforms.

True, but that doesn't make it the right thing to do for all platforms.

Your title says "add SDMA firmware for i.MX8M" but in the end it also installs VPU and EPDC files.

Firmware installed for i.MX8M and i.MX8X families was pretty lean up until now, let's not add unnecessary blobs if we can avoid it.

And if we can improve the way the package worked for older i.MX2/5/6/7 series as well it's even better ;)

Regards,
Gary

reviewer
#10 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

Quoted 2 lines · Gary Bisson

Your title says "add SDMA firmware for i.MX8M" but in the end it also installs VPU and EPDC files.

Agreed. Yes, this was the exact point that called my attention when I reviewed this patch.

#11 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

In reply to Sébastien Szymanski
Quoted 9 lines · On Mon, 15 Jun 2020 15:06:31 +0200 S?bastien Szymanski…

i.MX8M, i.MX8MM and i.MX8MN have sdma controllers so install sdma firmware for these SoCs. Mainline and NXP kernels expect the sdma firmware to be in /lib/firmware/imx/sdma so fix the install path at the same time.

---
 .../freescale-imx/firmware-imx/firmware-imx.mk  | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

Due to the feedback from Fabio and Gary, I marked this patch and PATCH 2/3 as Changes Requested.

Overall, I think firmware-imx.mk is pretty messy in terms of how it describes what needs to be installed for each platform. It probably needs to be cleaned up to allow to more easily support more capabilities on more platforms.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#12 lore raw

PATCH 1/3 package/freescale-imx/firmware-imx: install sdma firmware for i.MX8M{, M, N}

<snip>

Quoted 5 lines

Overall, I think firmware-imx.mk is pretty messy in terms of how it describes what needs to be installed for each platform. It probably needs to be cleaned up to allow to more easily support more capabilities on more platforms.

Hi Thomas, Sebastien,

As mentioned to Yann in another thread [1], I'm working on a patch that will hopefully clear things up (currently in review internally).

BR,
Stephane.

[1] http://lists.busybox.net/pipermail/buildroot/2020-June/284032.html

Quoted 13 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot