From f08206cdb6a47f5f52ec84e6286bcc5d8fd53cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Sz=C5=91ke?= Date: Mon, 13 May 2024 11:21:24 +0200 Subject: [PATCH] firmware-imx: introduce IMX_USE_LINUX_FIRMWARE_SDMA to configure sdma sources Signed-off-by: Tom Hochstein (cherry picked from commit 91cd813d1c77ae37823ebafee27cd062cc829be0) --- meta-imx-bsp/conf/layer.conf | 1 + .../recipes-bsp/firmware-imx/firmware-imx_8.24.bb | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/meta-imx-bsp/conf/layer.conf b/meta-imx-bsp/conf/layer.conf index 6cfbf40c5a..f25374f6a4 100644 --- a/meta-imx-bsp/conf/layer.conf +++ b/meta-imx-bsp/conf/layer.conf @@ -78,6 +78,7 @@ PREFERRED_RPROVIDER_u-boot-default-env ??= "${IMX_DEFAULT_BOOTLOADER}" MACHINE_SOCARCH_FILTER:remove = "alsa-lib gstreamer1.0 imx-codec" # Use latest SDMA firmware from firmware-imx instead of upstream linux-firmware +IMX_USE_LINUX_FIRMWARE_SDMA = "0" MACHINE_FIRMWARE:remove:mx6-nxp-bsp = "linux-firmware-imx-sdma-imx6q" MACHINE_FIRMWARE:remove:mx7d-nxp-bsp = "linux-firmware-imx-sdma-imx7d" MACHINE_FIRMWARE:remove:mx8-nxp-bsp = "linux-firmware-imx-sdma-imx7d" diff --git a/meta-imx-bsp/recipes-bsp/firmware-imx/firmware-imx_8.24.bb b/meta-imx-bsp/recipes-bsp/firmware-imx/firmware-imx_8.24.bb index d8b1913777..632fccae0b 100644 --- a/meta-imx-bsp/recipes-bsp/firmware-imx/firmware-imx_8.24.bb +++ b/meta-imx-bsp/recipes-bsp/firmware-imx/firmware-imx_8.24.bb @@ -10,15 +10,21 @@ PE = "1" inherit allarch +IMX_USE_LINUX_FIRMWARE_SDMA ?= "1" + do_install() { install -d ${D}${nonarch_base_libdir}/firmware/imx # SDMA Firmware section install -d ${D}${nonarch_base_libdir}/firmware/imx/sdma install -m 0644 ${S}/firmware/sdma/* ${D}${nonarch_base_libdir}/firmware/imx/sdma - # Comment these lines to use sdma-imx6q/7d.bin from here and not linux-firmware - #rm -f ${D}${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx6q.bin - #rm -f ${D}${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx7d.bin + # Define IMX_USE_LINUX_FIRMWARE_SDMA = "0" in layer.conf, machine.conf, local.conf + # or in .bbappend to use sdma-imx6q/7d.bin from here and not linux-firmware + if [ ${IMX_USE_LINUX_FIRMWARE_SDMA} -gt 0 ] + then + rm -f ${D}${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx6q.bin + rm -f ${D}${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx7d.bin + fi # EASRC Firmware section install -d ${D}${nonarch_base_libdir}/firmware/imx/easrc