Skip to contentSkip to conversation

board/freescale: use correct ahab-container.img file name

PATCH New Thomas Petazzoni 4 participants 8 messages Feb 20, 2020 – Jul 27, 2020 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 board/freescale: use correct ahab-container.img file name

Commit 3f8ace002831a01ed6aec59b704bd92c8a3b957f ("board/freescale/common/imx: add support for i.MX8") had its conflicts incorrectly tweaked when applied to Buildroot. The ahab-container.img is installed with this name (ahab-container.img) by the imx-firmware package, and not mx8qm-ahab-container.img or mx8qx-ahab-container.img.

---
 board/freescale/common/imx/imx8-bootloader-prepare.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/freescale/common/imx/imx8-bootloader-prepare.sh +2 -2
index 302fd00658..45c648e360 100755
@@ -28,9 +28,9 @@ main ()
 		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
 		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
+			${HOST_DIR}/bin/mkimage_imx8 -soc QM -rev B0 -append ${BINARIES_DIR}/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
+			${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
 		fi
 	fi
 
Signature · 1 line
2.24.1
author Applied
#1 lore raw

PATCH 1/2 board/freescale: use correct ahab-container.img file name

Quoted 11 lines · On Thu, 20 Feb 2020 03:18:56 +0100 Thomas Petazzoni…

Commit 3f8ace002831a01ed6aec59b704bd92c8a3b957f ("board/freescale/common/imx: add support for i.MX8") had its conflicts incorrectly tweaked when applied to Buildroot. The ahab-container.img is installed with this name (ahab-container.img) by the imx-firmware package, and not mx8qm-ahab-container.img or mx8qx-ahab-container.img.

---
 board/freescale/common/imx/imx8-bootloader-prepare.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

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

PATCH 1/2 board/freescale: use correct ahab-container.img file name

In reply to Thomas Petazzoni

Hi Thomas,

Patch looks good. I successfully built and booted on i.MX8 MEK QM and QXP boards. Thanks!

Quoted 44 lines · Thomas Petazzoni

Commit 3f8ace002831a01ed6aec59b704bd92c8a3b957f ("board/freescale/common/imx: add support for i.MX8") had its conflicts incorrectly tweaked when applied to Buildroot. The ahab-container.img is installed with this name (ahab-container.img) by the imx-firmware package, and not mx8qm-ahab-container.img or mx8qx-ahab-container.img.

---
 board/freescale/common/imx/imx8-bootloader-prepare.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/freescale/common/imx/imx8-bootloader-prepare.sh +0 -0
index 302fd00658..45c648e360 100755
@@ -28,9 +28,9 @@ main ()
 		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
if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y$"
${BR2_CONFIG}; then

board/freescale/common/imx/imx8-bootloader-prepare.sh +0 -1
-			${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

board/freescale/common/imx/imx8-bootloader-prepare.sh +1 -0
+			${HOST_DIR}/bin/mkimage_imx8 -soc QM -rev B0 -append

${BINARIES_DIR}/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

board/freescale/common/imx/imx8-bootloader-prepare.sh +0 -1
 		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

board/freescale/common/imx/imx8-bootloader-prepare.sh +1 -0
+			${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

board/freescale/common/imx/imx8-bootloader-prepare.sh

Quoted 2 lines
board/freescale/common/imx/imx8-bootloader-prepare.sh +0 -0
 		fi
 	fi
reviewer
#3 lore raw

PATCH 1/2 board/freescale: use correct ahab-container.img file name

In reply to Thomas Petazzoni

Hi Thomas,

Quoted 9 lines · Thomas Petazzoni

Commit 3f8ace002831a01ed6aec59b704bd92c8a3b957f ("board/freescale/common/imx: add support for i.MX8") had its conflicts incorrectly tweaked when applied to Buildroot. The ahab-container.img is installed with this name (ahab-container.img) by the imx-firmware package, and not mx8qm-ahab-container.img or mx8qx-ahab-container.img.

#4 lore raw

PATCH 2/2 package/freescale-imx/firmware-imx: install mx8qm-ahab-container.img

In reply to Thomas Petazzoni

This commit ensures the mx8qm-ahab-container.img file gets installed for the i.MX8 platform (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8). This is needed for board/freescale/common/imx/imx8-bootloader-prepare.sh to find this file when creating the bootloader image.

Note that it means that the default FIRMWARE_IMX_INSTALL_TARGET_CMDS that applies to all platforms except i.MX8M, i.MX8MM and i.MX8X also no longer applies to i.MX8. But this is anyway probably relevant, as most likely i.MX8 also needs a special variant of FIRMWARE_IMX_INSTALL_TARGET_CMDS.

---
NOTE: some review on this patch from i.MX people would be greatly appreciated. Thanks!

---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/freescale-imx/firmware-imx/firmware-imx.mk +8 -0
index b251fcda2a..b79973a104 100644
@@ -59,6 +59,14 @@ define FIRMWARE_IMX_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 0644 $(@D)/firmware/vpu/vpu_fw_imx8_enc.bin \
 		$(TARGET_DIR)/lib/firmware/vpu/vpu_fw_imx8_enc.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)/ahab-container.img
+endef
 else
 define FIRMWARE_IMX_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/lib/firmware/imx
Signature · 1 line
2.24.1
#5 lore raw

PATCH 2/2 package/freescale-imx/firmware-imx: install mx8qm-ahab-container.img

Hello Thomas,

Imx8 alsa have dpu as imx8x. When kernel boot, it asks for vpu firmware. You should define "FIRMWARE_IMX_INSTALL_TARGET_CMDS" function for imx8, totally same as imx8x.

Regards,

20 ?ub 2020 Per 05:19 tarihinde Thomas Petazzoni < [email protected]> ?unu yazd?:

Quoted 40 lines

This commit ensures the mx8qm-ahab-container.img file gets installed for the i.MX8 platform (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8). This is needed for board/freescale/common/imx/imx8-bootloader-prepare.sh to find this file when creating the bootloader image.

Note that it means that the default FIRMWARE_IMX_INSTALL_TARGET_CMDS that applies to all platforms except i.MX8M, i.MX8MM and i.MX8X also no longer applies to i.MX8. But this is anyway probably relevant, as most likely i.MX8 also needs a special variant of FIRMWARE_IMX_INSTALL_TARGET_CMDS.

---
NOTE: some review on this patch from i.MX people would be greatly appreciated. Thanks!

---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/freescale-imx/firmware-imx/firmware-imx.mk +8 -1
index b251fcda2a..b79973a104 100644
@@ -59,6 +59,14 @@ define FIRMWARE_IMX_INSTALL_TARGET_CMDS
        $(INSTALL) -D -m 0644 $(@D)/firmware/vpu/vpu_fw_imx8_enc.bin \
                $(TARGET_DIR)/lib/firmware/vpu/vpu_fw_imx8_enc.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)/ahab-container.img
+endef
 else
 define FIRMWARE_IMX_INSTALL_TARGET_CMDS
        mkdir -p $(TARGET_DIR)/lib/firmware/imx
--
Quoted 3 lines

2.24.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200220/1453a8e8/attachment.html>

#6 lore raw

PATCH 2/2 package/freescale-imx/firmware-imx: install mx8qm-ahab-container.img

In reply to Thomas Petazzoni

Hi Thomas,

Patch looks good. Thanks.

Quoted 29 lines · Thomas Petazzoni

This commit ensures the mx8qm-ahab-container.img file gets installed for the i.MX8 platform (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8). This is needed for board/freescale/common/imx/imx8-bootloader-prepare.sh to find this file when creating the bootloader image.

Note that it means that the default FIRMWARE_IMX_INSTALL_TARGET_CMDS that applies to all platforms except i.MX8M, i.MX8MM and i.MX8X also no longer applies to i.MX8. But this is anyway probably relevant, as most likely i.MX8 also needs a special variant of FIRMWARE_IMX_INSTALL_TARGET_CMDS.

---
NOTE: some review on this patch from i.MX people would be greatly appreciated. Thanks!

---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -0
index b251fcda2a..b79973a104 100644
@@ -59,6 +59,14 @@ define FIRMWARE_IMX_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 0644 $(@D)/firmware/vpu/vpu_fw_imx8_enc.bin \
 		$(TARGET_DIR)/lib/firmware/vpu/vpu_fw_imx8_enc.bin
 endef
+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8),y)

package/freescale-imx/firmware-imx/firmware-imx.mk define FIRMWARE_IMX_INSTALL_TARGET_CMDS · line 72

Quoted 10 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +7 -0
+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)/ahab-container.img
+endef
 else
 define FIRMWARE_IMX_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/lib/firmware/imx
#7 lore raw

PATCH 2/2 package/freescale-imx/firmware-imx: install mx8qm-ahab-container.img

In reply to Thomas Petazzoni
Quoted 11 lines · On Thu, 20 Feb 2020 03:18:57 +0100 Thomas Petazzoni…

This commit ensures the mx8qm-ahab-container.img file gets installed for the i.MX8 platform (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8). This is needed for board/freescale/common/imx/imx8-bootloader-prepare.sh to find this file when creating the bootloader image.

Note that it means that the default FIRMWARE_IMX_INSTALL_TARGET_CMDS that applies to all platforms except i.MX8M, i.MX8MM and i.MX8X also no longer applies to i.MX8. But this is anyway probably relevant, as most likely i.MX8 also needs a special variant of FIRMWARE_IMX_INSTALL_TARGET_CMDS.

Quoted 7 lines

---
NOTE: some review on this patch from i.MX people would be greatly appreciated. Thanks!

---
 package/freescale-imx/firmware-imx/firmware-imx.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

This patch has been rendered useless by
https://git.buildroot.org/buildroot/commit/?id=97d54bdcb2185914e232749fa4171601a9ec7f0d
where the imx-seco package now properly installs ahab-container.img for the BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y configuration.

So I've marked this patch as not applicable.

Thomas

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