[2/2] package/freescale-imx/firmware-imx: install mx8qm-ahab-container.img
diff mbox series

Message ID 20200220021858.700249-2-thomas.petazzoni@bootlin.com
State New
Headers show
Series
  • [1/2] board/freescale: use correct ahab-container.img file name
Related show

Commit Message

Thomas Petazzoni Feb. 20, 2020, 2:18 a.m. UTC
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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
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(+)

Comments

Refik Tuzakli Feb. 20, 2020, 7:02 a.m. UTC | #1
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 <
thomas.petazzoni@bootlin.com> şunu yazdı:

> 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.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> 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(+)
>
> diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk
> b/package/freescale-imx/firmware-imx/firmware-imx.mk
> index b251fcda2a..b79973a104 100644
> --- a/package/freescale-imx/firmware-imx/firmware-imx.mk
> +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
> @@ -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
> --
> 2.24.1
>
>
Julien Olivain Feb. 20, 2020, 8:28 p.m. UTC | #2
Hi Thomas,

Patch looks good. Thanks.

On 2020-02-20 03:18, Thomas Petazzoni wrote:
> 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.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> 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(+)
> 
> diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk
> b/package/freescale-imx/firmware-imx/firmware-imx.mk
> index b251fcda2a..b79973a104 100644
> --- a/package/freescale-imx/firmware-imx/firmware-imx.mk
> +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
> @@ -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

Reviewed-by: Julien Olivain <juju@cotds.org>
Tested-by: Julien Olivain <juju@cotds.org>

Patch
diff mbox series

diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk
index b251fcda2a..b79973a104 100644
--- a/package/freescale-imx/firmware-imx/firmware-imx.mk
+++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
@@ -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