Skip to contentSkip to conversation

board/freescale/common/imx: add support for i.MX8QM

PATCH New Maeva Manuel 4 participants 19 messages Sep 9, 2019 – Feb 5, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/7 board/freescale/common/imx: add support for i.MX8QM

---
 board/freescale/common/imx/imx8-bootloader-prepare.sh | 7 +++++--
 board/freescale/common/imx/post-image.sh              | 4 +++-
 2 files changed, 8 insertions(+), 3 deletions(-)
board/freescale/common/imx/imx8-bootloader-prepare.sh +5 -2
index df528b0df5..6c49fe02a7 100755
@@ -27,8 +27,11 @@ main ()
 		cat ${BINARIES_DIR}/u-boot.bin ${BINARIES_DIR}/mkimg.commit > ${BINARIES_DIR}/u-boot-hash.bin
 		cp ${BINARIES_DIR}/bl31.bin ${BINARIES_DIR}/u-boot-atf.bin
 		dd if=${BINARIES_DIR}/u-boot-hash.bin of=${BINARIES_DIR}/u-boot-atf.bin bs=1K seek=128
-
-		${HOST_DIR}/bin/mkimage_imx8 -soc QX -rev B0 -append ${BINARIES_DIR}/ahab-container.img -c -scfw ${BINARIES_DIR}/mx8qx-mek-scfw-tcm.bin -ap ${BINARIES_DIR}/u-boot-atf.bin a35 0x80000000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+		if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y$" ${BR2_CONFIG}; then
+			${HOST_DIR}/bin/mkimage_imx8 -soc QM -rev B0 -append ${BINARIES_DIR}/mx8qm-ahab-container.img -c -scfw ${BINARIES_DIR}/mx8qm-mek-scfw-tcm.bin -ap ${BINARIES_DIR}/u-boot-atf.bin a53 0x80000000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+		else
+			${HOST_DIR}/bin/mkimage_imx8 -soc QX -rev B0 -append ${BINARIES_DIR}/mx8qx-ahab-container.img -c -scfw ${BINARIES_DIR}/mx8qx-mek-scfw-tcm.bin -ap ${BINARIES_DIR}/u-boot-atf.bin a35 0x80000000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
+		fi
 	fi
 
 	exit $?
board/freescale/common/imx/post-image.sh +3 -1
index 19d8fffb63..138ea7b123 100755
@@ -32,7 +32,9 @@ linux_image()
 
 genimage_type()
 {
-	if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
+	if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y$" ${BR2_CONFIG}; then
+		echo "genimage.cfg.template_imx8"
+	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_imx8"
 	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_imx8"
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/7 package/freescale-imx: add option for i.MX8QM

---
 package/freescale-imx/Config.in | 3 +++
 1 file changed, 3 insertions(+)
package/freescale-imx/Config.in +3 -0
index f010aab87b..5672e09b05 100644
@@ -40,6 +40,9 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
 	bool "imx7d/imx7ulp"
 
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
+	bool "imx8"
+
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
 	bool "imx8m"
 
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/7 package/freescale-imx: add option for i.MX8QM

Hi Maeva,

Sorry for the (very) late reply.

Quoted 10 lines · Maeva Manuel
---
 package/freescale-imx/Config.in | 3 +++
 1 file changed, 3 insertions(+)
package/freescale-imx/Config.in +0 -0
index f010aab87b..5672e09b05 100644

package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL · line 47

Quoted 8 lines
package/freescale-imx/Config.in +3 -0
@@ -40,6 +40,9 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
 	bool "imx7d/imx7ulp"
 
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
+	bool "imx8"
+
 config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
 	bool "imx8m"

This isn't sufficient, you also need to make sure to add BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 in the BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU definition as I'm sure it has a Vivante GPU ;)

Looking at Config.in, seems that MX8MM has the same issue.

Regards,
Gary

#3 lore raw

PATCH 2/7 package/freescale-imx: add option for i.MX8QM

Quoted 4 lines · On Fri, 8 Nov 2019 18:30:26 +0100 Gary Bisson <[email protected]> wrote:

This isn't sufficient, you also need to make sure to add BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8 in the BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU definition as I'm sure it has a Vivante GPU ;)

True, I fixed that when applying.

Quoted 1 line

Looking at Config.in, seems that MX8MM has the same issue.

It was fixed yesterday by commit 7b3c48ed8107c5cd39f5d761734964dcd8c8d408.

Thanks!

Thomas

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

PATCH 2/7 package/freescale-imx: add option for i.MX8QM

In reply to Maeva Manuel

Hello,

Quoted 1 line · On Mon, 9 Sep 2019 12:14:58 +0000 Maeva Manuel <[email protected]> wrote:

I have applied after extending the commit log to give a bit more context about the i.MX8 family, which contains i.MX8QM and i.MX8QP.

I've also updated BR2_PACKAGE_FREESCALE_IMX_PLATFORM and BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU with this new i.MX platform, as suggested by Gary.

Thanks!

Thomas

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

PATCH 3/7 package/freescale-imx/imx-sc-firmware: bump to version 1.1 to support i.MX8QM

In reply to Maeva Manuel
---
 package/freescale-imx/imx-sc-firmware/Config.in    |  2 +-
 .../imx-sc-firmware/imx-sc-firmware.mk             | 14 +++++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)
package/freescale-imx/imx-sc-firmware/Config.in +1 -1
index 4a22f72b1f..93dfeb1a68 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_IMX_SC_FIRMWARE
 	bool "imx-sc-firmware"
-	depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
+	depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
 	help
 	  System Control Unit Firmware blobs for the Freescale i.MX8
 	  SoCs.
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk +9 -5
index fac20d0c6f..08b562a054 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IMX_SC_FIRMWARE_VERSION = 1.0
+IMX_SC_FIRMWARE_VERSION = 1.1
 IMX_SC_FIRMWARE_SITE = $(FREESCALE_IMX_SITE)
 IMX_SC_FIRMWARE_SOURCE = imx-sc-firmware-$(IMX_SC_FIRMWARE_VERSION).bin
 
@@ -18,10 +18,14 @@ endef
 
 IMX_SC_FIRMWARE_INSTALL_IMAGES = YES
 define IMX_SC_FIRMWARE_INSTALL_IMAGES_CMDS
-	# SCFW firmware is needed when generating imx8-boot-sd.bin which
-	# is done in post-image script.
-	cp $(@D)/mx8qx-mek-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-mek-scfw-tcm.bin
-	cp $(@D)/mx8qx-val-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-val-scfw-tcm.bin
+# SCFW firmware is needed when generating imx8-boot-sd.bin which
+# is done in post-image script.
+
+# For i.MX8QM support the SCFW needed is mx8qm-mek-scfw-tcm.bin
+# and mx8qm-val-scfw-tcm.bin
+# For i.MX8QXP support the SCFW needed is mx8qx-mek-scfw-tcm.bin
+# and mx8qx-val-scfw-tcm.bin
+cp $(@D)/*-scfw-tcm.bin $(BINARIES_DIR)/*-scfw-tcm.bin
 endef
 
 $(eval $(generic-package))
Signature · 1 line
2.17.1
#6 lore raw

PATCH 3/7 package/freescale-imx/imx-sc-firmware: bump to version 1.1 to support i.MX8QM

Hi Maeva,

Quoted 23 lines · Maeva Manuel
---
 package/freescale-imx/imx-sc-firmware/Config.in    |  2 +-
 .../imx-sc-firmware/imx-sc-firmware.mk             | 14 +++++++++-----
 2 files changed, 10 insertions(+), 6 deletions(-)
package/freescale-imx/imx-sc-firmware/Config.in +1 -1
index 4a22f72b1f..93dfeb1a68 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_IMX_SC_FIRMWARE
 	bool "imx-sc-firmware"
-	depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
+	depends on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
 	help
 	  System Control Unit Firmware blobs for the Freescale i.MX8
 	  SoCs.
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk +0 -0
index fac20d0c6f..08b562a054 100644

package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk line 7

Quoted 5 lines
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk +1 -1
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IMX_SC_FIRMWARE_VERSION = 1.0
+IMX_SC_FIRMWARE_VERSION = 1.1

Can you offer a new patch with latest version?
https://source.codeaurora.org/external/imx/meta-fsl-bsp-release/tree/imx/meta-bsp/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.2.2.bb?h=rel_imx_4.14.98_2.1.0

Quoted 9 lines
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk +0 -2
 IMX_SC_FIRMWARE_SITE = $(FREESCALE_IMX_SITE)
 IMX_SC_FIRMWARE_SOURCE = imx-sc-firmware-$(IMX_SC_FIRMWARE_VERSION).bin
 
@@ -18,10 +18,14 @@ endef
 
 IMX_SC_FIRMWARE_INSTALL_IMAGES = YES
 define IMX_SC_FIRMWARE_INSTALL_IMAGES_CMDS
-	# SCFW firmware is needed when generating imx8-boot-sd.bin which
-	# is done in post-image script.

package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk endef · line 28

Quoted 10 lines
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk +8 -2
-	cp $(@D)/mx8qx-mek-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-mek-scfw-tcm.bin
-	cp $(@D)/mx8qx-val-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-val-scfw-tcm.bin
+# SCFW firmware is needed when generating imx8-boot-sd.bin which
+# is done in post-image script.
+
+# For i.MX8QM support the SCFW needed is mx8qm-mek-scfw-tcm.bin
+# and mx8qm-val-scfw-tcm.bin
+# For i.MX8QXP support the SCFW needed is mx8qx-mek-scfw-tcm.bin
+# and mx8qx-val-scfw-tcm.bin
+cp $(@D)/*-scfw-tcm.bin $(BINARIES_DIR)/*-scfw-tcm.bin

Since we make the user select the CPU used in the other menu, please split the firmware copy so that only 8X ones are in the image with 8X is selected.

Regards,
Gary

#7 lore raw

PATCH 3/7 package/freescale-imx/imx-sc-firmware: bump to version 1.1 to support i.MX8QM

In reply to Maeva Manuel

Hello,

Quoted 1 line · On Mon, 9 Sep 2019 12:15:00 +0000 Maeva Manuel <[email protected]> wrote:

I have applied, but with some changes. See below.

package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk line 7

Quoted 2 lines
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk +1 -1
-IMX_SC_FIRMWARE_VERSION = 1.0
+IMX_SC_FIRMWARE_VERSION = 1.1

The bump to 1.2.1 was already done in commit b74eaecb2232c4d2b717f867218ad731da836cbc, so I dropped this part.

Quoted 9 lines

IMX_SC_FIRMWARE_SITE = $(FREESCALE_IMX_SITE) IMX_SC_FIRMWARE_SOURCE = imx-sc-firmware-$(IMX_SC_FIRMWARE_VERSION).bin

package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk +0 -2
@@ -18,10 +18,14 @@ endef
 
 IMX_SC_FIRMWARE_INSTALL_IMAGES = YES
 define IMX_SC_FIRMWARE_INSTALL_IMAGES_CMDS
-	# SCFW firmware is needed when generating imx8-boot-sd.bin which
-	# is done in post-image script.

package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk endef · line 28

Quoted 10 lines
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.mk +8 -2
-	cp $(@D)/mx8qx-mek-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-mek-scfw-tcm.bin
-	cp $(@D)/mx8qx-val-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-val-scfw-tcm.bin
+# SCFW firmware is needed when generating imx8-boot-sd.bin which
+# is done in post-image script.
+
+# For i.MX8QM support the SCFW needed is mx8qm-mek-scfw-tcm.bin
+# and mx8qm-val-scfw-tcm.bin
+# For i.MX8QXP support the SCFW needed is mx8qx-mek-scfw-tcm.bin
+# and mx8qx-val-scfw-tcm.bin
+cp $(@D)/*-scfw-tcm.bin $(BINARIES_DIR)/*-scfw-tcm.bin

Code inside commands should be indented with one tab. Also, as pointed out by Gary, it is preferable to only install what we really need, so I changed this to:

+# SCFW firmware is needed when generating imx8-boot-sd.bin which is +# done in post-image script.
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)
define IMX_SC_FIRMWARE_INSTALL_IMAGES_CMDS
- # SCFW firmware is needed when generating imx8-boot-sd.bin which
- # is done in post-image script.

        cp $(@D)/mx8qx-mek-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-mek-scfw-tcm.bin
        cp $(@D)/mx8qx-val-scfw-tcm.bin $(BINARIES_DIR)/mx8qx-val-scfw-tcm.bin

endef
+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8),y) +define IMX_SC_FIRMWARE_INSTALL_IMAGES_CMDS
+ cp $(@D)/mx8qm-*-scfw-tcm.bin $(BINARIES_DIR)/
+endef
+endif

Best regards,

Thomas

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

PATCH 4/7 package/freescale-imx/imx-sc-firmware: add hash file

In reply to Maeva Manuel
---
 package/freescale-imx/imx-sc-firmware/imx-sc-firmware.hash | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 package/freescale-imx/imx-sc-firmware/imx-sc-firmware.hash
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.hash new file +4 -0
new file mode 100644
index 0000000000..3b4326302f
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256 d07f8e517e0bd82175d1cd77e01b6702735eb95774053f9c431d1a5016fc7152  imx-sc-firmware-1.1.bin
+sha256 fc93f26e4197b9240c327ce26ae6e02123f022423d4704c7b0448a37372cf2a2  EULA
+sha256 78696664f7afe7f2b081c99af60082d6403fab935b1b10056ed41aec123ff7fa  COPYING
Signature · 1 line
2.17.1
#9 lore raw

PATCH 4/7 package/freescale-imx/imx-sc-firmware: add hash file

Hi Maeva,

Quoted 12 lines · Maeva Manuel
---
 package/freescale-imx/imx-sc-firmware/imx-sc-firmware.hash | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 package/freescale-imx/imx-sc-firmware/imx-sc-firmware.hash
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.hash new file +0 -0
new file mode 100644
index 0000000000..3b4326302f

package/freescale-imx/imx-sc-firmware/imx-sc-firmware.hash line 4

Quoted 4 lines
package/freescale-imx/imx-sc-firmware/imx-sc-firmware.hash new file +4 -0
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256 d07f8e517e0bd82175d1cd77e01b6702735eb95774053f9c431d1a5016fc7152  imx-sc-firmware-1.1.bin
+sha256 fc93f26e4197b9240c327ce26ae6e02123f022423d4704c7b0448a37372cf2a2  EULA
+sha256 78696664f7afe7f2b081c99af60082d6403fab935b1b10056ed41aec123ff7fa  COPYING

This should be part of PATCH 3/7, no need to separate it.

Regards,
Gary

#11 lore raw

PATCH 5/7 package/freescale-imx/firmware-imx:

In reply to Maeva Manuel

bump to version 8.0 to support i.MX8QM

---
 .../freescale-imx/firmware-imx/firmware-imx.hash   |  2 +-
 package/freescale-imx/firmware-imx/firmware-imx.mk | 14 +++++++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)
package/freescale-imx/firmware-imx/firmware-imx.hash +1 -1
index c22ee4c192..615c549e7d 100644
@@ -1,4 +1,4 @@
 # Locally calculated
-sha256 a8f099bdf786b2da1e8b43094950c033ccdbf93f1b8a93caffb912e1500cd735  firmware-imx-7.5.bin
+sha256 63ec62f5d229cbed00918c8449173933f1c9d594c59396b8dd217e94f47138b0  firmware-imx-8.0.bin
 sha256 fc93f26e4197b9240c327ce26ae6e02123f022423d4704c7b0448a37372cf2a2  EULA
 sha256 78696664f7afe7f2b081c99af60082d6403fab935b1b10056ed41aec123ff7fa  COPYING
package/freescale-imx/firmware-imx/firmware-imx.mk +11 -3
index b70b581523..92c090fae0 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FIRMWARE_IMX_VERSION = 7.5
+FIRMWARE_IMX_VERSION = 8.0
 FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE)
 FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin
 
@@ -45,13 +45,21 @@ define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
 	cp $(@D)/firmware/hdmi/cadence/signed_hdmi_imx8m.bin \
 		$(BINARIES_DIR)/signed_hdmi_imx8m.bin
 endef
+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8),y)
+FIRMWARE_IMX_INSTALL_IMAGES = YES
+define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
+	# SECO firmware is needed when generating imx8-boot-sd.bin which
+	# is done in post-image script.
+	cp $(@D)/firmware/seco/mx8qm-ahab-container.img \
+		$(BINARIES_DIR)/mx8qm-ahab-container.img
+endef
 else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)
 FIRMWARE_IMX_INSTALL_IMAGES = YES
 define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
 	# SECO firmware is needed when generating imx8-boot-sd.bin which
 	# is done in post-image script.
-	cp $(@D)/firmware/seco/ahab-container.img \
-		$(BINARIES_DIR)/ahab-container.img
+	cp $(@D)/firmware/seco/mx8qx-ahab-container.img \
+		$(BINARIES_DIR)/mx8qx-ahab-container.img
 endef
 else
 define FIRMWARE_IMX_INSTALL_TARGET_CMDS
Signature · 1 line
2.17.1
#12 lore raw

PATCH 5/7 package/freescale-imx/firmware-imx:

Quoted 46 lines · Maeva Manuel

bump to version 8.0 to support i.MX8QM

---
  .../freescale-imx/firmware-imx/firmware-imx.hash   |  2 +-
  package/freescale-imx/firmware-imx/firmware-imx.mk | 14 +++++++++++---
  2 files changed, 12 insertions(+), 4 deletions(-)
package/freescale-imx/firmware-imx/firmware-imx.hash +1 -1
index c22ee4c192..615c549e7d 100644
@@ -1,4 +1,4 @@
  # Locally calculated
-sha256 a8f099bdf786b2da1e8b43094950c033ccdbf93f1b8a93caffb912e1500cd735  firmware-imx-7.5.bin
+sha256 63ec62f5d229cbed00918c8449173933f1c9d594c59396b8dd217e94f47138b0  firmware-imx-8.0.bin
  sha256 fc93f26e4197b9240c327ce26ae6e02123f022423d4704c7b0448a37372cf2a2  EULA
  sha256 78696664f7afe7f2b081c99af60082d6403fab935b1b10056ed41aec123ff7fa  COPYING
package/freescale-imx/firmware-imx/firmware-imx.mk +9 -1
index b70b581523..92c090fae0 100644
@@ -4,7 +4,7 @@
  #
  ################################################################################
 
-FIRMWARE_IMX_VERSION = 7.5
+FIRMWARE_IMX_VERSION = 8.0
  FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE)
  FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin
 
@@ -45,13 +45,21 @@ define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
  	cp $(@D)/firmware/hdmi/cadence/signed_hdmi_imx8m.bin \
  		$(BINARIES_DIR)/signed_hdmi_imx8m.bin
  endef
+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8),y)
+FIRMWARE_IMX_INSTALL_IMAGES = YES
+define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
+	# SECO firmware is needed when generating imx8-boot-sd.bin which
+	# is done in post-image script.
+	cp $(@D)/firmware/seco/mx8qm-ahab-container.img \
+		$(BINARIES_DIR)/mx8qm-ahab-container.img
+endef
  else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)
  FIRMWARE_IMX_INSTALL_IMAGES = YES

package/freescale-imx/firmware-imx/firmware-imx.mk define FIRMWARE_IMX_INSTALL_IMAGES_CMDS · line 65

Quoted 10 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +2 -2
  define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
  	# SECO firmware is needed when generating imx8-boot-sd.bin which
  	# is done in post-image script.
-	cp $(@D)/firmware/seco/ahab-container.img \
-		$(BINARIES_DIR)/ahab-container.img
+	cp $(@D)/firmware/seco/mx8qx-ahab-container.img \
+		$(BINARIES_DIR)/mx8qx-ahab-container.img
  endef
  else
  define FIRMWARE_IMX_INSTALL_TARGET_CMDS

Hi Ma?va,

interesting patchset :)
This patch should take care of places using the ahab-container.img, because the name changes with the upgrade. Namely imx8-bootloader-prepare.sh As you should have easy access to an i.MX8QXP MEK board, could you please verify that the version upgrades don't break the build and especially the runtime on it?

Best regards,
Andr? Hentschel

#13 lore raw

PATCH 5/7 package/freescale-imx/firmware-imx:

In reply to Maeva Manuel

Hello,

Quoted 3 lines · On Mon, 9 Sep 2019 12:15:05 +0000 Maeva Manuel <[email protected]> wrote:

bump to version 8.0 to support i.MX8QM

This package has already been bumped to 8.1.1 in commit 3ec818769d5140f337684d8c35497ca940bffa34, so this patch was no longer needed.

Best regards,

Thomas

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

PATCH 6/7 configs/freescale_imx8qmmek: new defconfig

In reply to Maeva Manuel
---
 .gitlab-ci.yml                        |  1 +
 DEVELOPERS                            |  4 ++
 board/freescale/imx8qmmek/readme.txt  | 66 +++++++++++++++++++++++++++
 configs/freescale_imx8qmmek_defconfig | 40 ++++++++++++++++
 4 files changed, 111 insertions(+)
 create mode 100644 board/freescale/imx8qmmek/readme.txt
 create mode 100644 configs/freescale_imx8qmmek_defconfig
.gitlab-ci.yml +1 -0
index 6243107ee9..cad07a6c43 100644
@@ -178,6 +178,7 @@ freescale_imx6sxsabresd_defconfig: { extends: .defconfig }
 freescale_imx7dsabresd_defconfig: { extends: .defconfig }
 freescale_imx8mmevk_defconfig: { extends: .defconfig }
 freescale_imx8mqevk_defconfig: { extends: .defconfig }
+freescale_imx8qmmek_defconfig: { extends: .defconfig }
 freescale_imx8qxpmek_defconfig: { extends: .defconfig }
 freescale_p1025twr_defconfig: { extends: .defconfig }
 freescale_t1040d4rdb_defconfig: { extends: .defconfig }
DEVELOPERS +4 -0
index 58d18a36e8..c7d06e555d 100644
@@ -1400,6 +1400,10 @@ F:	package/python-simplejson/
 F:	package/python-versiontools/
 F:	package/wilc1000-firmware/
 
+N:	Maeva Manuel <[email protected]>
+F:	board/freescale/imx8qmmek/
+F:	configs/freescale_imx8qmmek_defconfig
+
 N:	Mahyar Koshkouei <[email protected]>
 F:	package/ffmpeg/
 F:	package/mpv/
board/freescale/imx8qmmek/readme.txt new file +66 -0

66 lines not on this page · raw message

configs/freescale_imx8qmmek_defconfig new file +40 -0
new file mode 100644
index 0000000000..b0c433cf4a
@@ -0,0 +1,40 @@
+BR2_aarch64=y
+BR2_ARM_FPU_VFPV4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
+#GCC version must be inferior to 8_X because of -Wstringop-truncation message error
+BR2_GCC_VERSION_7_X=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/fsl-imx8qm-mek.dtb"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="ssh://git at bitbucket.sw.nxp.com/imx/linux-imx.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.14.78_1.0.0_ga"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/fsl-imx8qm-mek"
+BR2_PACKAGE_FREESCALE_IMX=y
+BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y
+BR2_PACKAGE_FIRMWARE_IMX=y
+BR2_PACKAGE_IMX_SC_FIRMWARE=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="ssh://git at bitbucket.sw.nxp.com/imx/arm-trusted-firmware.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="rel_imx_4.14.78_1.0.0_ga"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8qm"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="ssh://git at bitbucket.sw.nxp.com/imx/uboot-imx.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.14.78_1.0.0_ga"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8qm_mek"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_IMX_MKIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
Signature · 1 line
2.17.1
#15 lore raw

PATCH 6/7 configs/freescale_imx8qmmek: new defconfig

Hello Maeva,

Quoted 17 lines · On Mon, 9 Sep 2019 12:15:07 +0000 Maeva Manuel <[email protected]> wrote:
board/freescale/imx8qmmek/readme.txt new file +9 -0
new file mode 100644
index 0000000000..15eecfa83e
@@ -0,0 +1,66 @@
+***************************
+Freescale i.MX8QM MEK board
+***************************
+
+This file documents the Buildroot support for the Freescale i.MX8QM MEK board.
+
+Build
+=====
+

board/freescale/imx8qmmek/readme.txt line 19

Quoted 10 lines
board/freescale/imx8qmmek/readme.txt new file +10 -0
+First, configure Buildroot for the i.MX8QM MEK board:
+
+  make freescale_imx8qmmek_defconfig
+
+Build all components:
+
+  make
+
+You will find in output/images/ the following files:
+  - mx8qm-ahab-container.img

The file is now really named ahab-container.img

configs/freescale_imx8qmmek_defconfig line 5

Quoted 11 lines
configs/freescale_imx8qmmek_defconfig new file +5 -0
new file mode 100644
index 0000000000..b0c433cf4a
@@ -0,0 +1,40 @@
+BR2_aarch64=y
+BR2_ARM_FPU_VFPV4=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
+#GCC version must be inferior to 8_X because of -Wstringop-truncation message error
+BR2_GCC_VERSION_7_X=y

Which component fails to build like this? Isn't this fixed by using a newer 4.14 kernel such as 4.14.98 like other Freescale/NXP defconfigs in Buildroot ?

For a new defconfig, it is really not good if we can't use the current default version of gcc.

configs/freescale_imx8qmmek_defconfig line 10

Quoted 5 lines
configs/freescale_imx8qmmek_defconfig new file +5 -0
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/freescale/common/imx/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/fsl-imx8qm-mek.dtb"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="ssh://git at bitbucket.sw.nxp.com/imx/linux-imx.git"

This is not accessible to the public, you need to use public URLs.

Could you fix these issues and send an updated version ?

Thomas

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

PATCH 7/7 board/freescale/imx8qxpmek: update instructions

In reply to Maeva Manuel

The ahab-container.img has been replaced by mx8qx-ahab-container.img because of the i.MX8QM support

---
 board/freescale/imx8qxpmek/readme.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
board/freescale/imx8qxpmek/readme.txt +2 -1
index 45f7915fe4..e10138f8f8 100644
@@ -17,7 +17,8 @@ Build all components:
   make
 
 You will find in output/images/ the following files:
-  - ahab-container.img
+
+  - mx8qx-ahab-container.img
   - bl31.bin
   - boot.vfat
   - fsl-imx8qxp-mek.dtb
Signature · 1 line
2.17.1
#17 lore raw

PATCH 7/7 board/freescale/imx8qxpmek: update instructions

Quoted 13 lines · On Mon, 9 Sep 2019 12:15:09 +0000 Maeva Manuel <[email protected]> wrote:

The ahab-container.img has been replaced by mx8qx-ahab-container.img because of the i.MX8QM support

---
 board/freescale/imx8qxpmek/readme.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
board/freescale/imx8qxpmek/readme.txt +0 -0
index 45f7915fe4..e10138f8f8 100644

board/freescale/imx8qxpmek/readme.txt Build all components: · line 21

Quoted 6 lines
board/freescale/imx8qxpmek/readme.txt +2 -1
@@ -17,7 +17,8 @@ Build all components:
   make
 
 You will find in output/images/ the following files:
-  - ahab-container.img
+
+  - mx8qx-ahab-container.img

Since I did not take your commit for the firmware-imx update, this change is not needed. Indeed the bump in 3ec818769d5140f337684d8c35497ca940bffa34 and the following fix in 571b8ca09563ffa97a1d0df2fa076530426ab8da ensure that the name is still ahab-container.img.

Best regards,

Thomas

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

PATCH 1/7 board/freescale/common/imx: add support for i.MX8QM

In reply to Maeva Manuel

Hello,

Quoted 5 lines · On Mon, 9 Sep 2019 12:14:55 +0000 Maeva Manuel <[email protected]> wrote:
---
 board/freescale/common/imx/imx8-bootloader-prepare.sh | 7 +++++--
 board/freescale/common/imx/post-image.sh              | 4 +++-
 2 files changed, 8 insertions(+), 3 deletions(-)

Thanks, I have applied, but at a later point in the series, i.e after the imx-firmware-sc change that ensures the proper firmware gets installed.

Thanks!

Thomas

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