diff mbox series

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

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

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>
Thomas Petazzoni July 27, 2020, 1:25 p.m. UTC | #3
On Thu, 20 Feb 2020 03:18:57 +0100
Thomas Petazzoni <thomas.petazzoni@bootlin.com> 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(+)

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
diff mbox series

Patch

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