From 90df14f9af28fd55783a689a00ac9e20f674ca4e Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Mon, 24 Apr 2023 18:06:00 -0300 Subject: imx-boot-firmware-files: consolidate deploy firmware files across SoCs The firmware-imx-8 and firmware-imx-8m recipes are mostly code duplication and some parts even used by i.MX93 so consolidating it allows code reuse and clearness. Fixes: #1426. Signed-off-by: Otavio Salvador --- recipes-bsp/firmware-imx/firmware-imx-8_8.18.bb | 39 -------------- recipes-bsp/firmware-imx/firmware-imx-8m_8.18.bb | 24 --------- .../firmware-imx/imx-boot-firmware-files_8.18.bb | 62 ++++++++++++++++++++++ 3 files changed, 62 insertions(+), 63 deletions(-) delete mode 100644 recipes-bsp/firmware-imx/firmware-imx-8_8.18.bb delete mode 100644 recipes-bsp/firmware-imx/firmware-imx-8m_8.18.bb create mode 100644 recipes-bsp/firmware-imx/imx-boot-firmware-files_8.18.bb (limited to 'recipes-bsp/firmware-imx') diff --git a/recipes-bsp/firmware-imx/firmware-imx-8_8.18.bb b/recipes-bsp/firmware-imx/firmware-imx-8_8.18.bb deleted file mode 100644 index 588d45ee..00000000 --- a/recipes-bsp/firmware-imx/firmware-imx-8_8.18.bb +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2018-2020 NXP -SUMMARY = "Freescale i.MX firmware for 8 family" -DESCRIPTION = "Freescale i.MX firmware for 8 family" - -require firmware-imx-${PV}.inc - -inherit deploy nopackages - -do_install[noexec] = "1" - -SOC_FAMILY = "INVALID" -SOC_FAMILY:mx8-generic-bsp = "mx8" -SOC_FAMILY:mx9-generic-bsp = "mx9" - -deploy_mx8() { - # Cadence HDMI - install -m 0644 ${S}/firmware/hdmi/cadence/hdmitxfw.bin ${DEPLOYDIR} - install -m 0644 ${S}/firmware/hdmi/cadence/hdmirxfw.bin ${DEPLOYDIR} - install -m 0644 ${S}/firmware/hdmi/cadence/dpfw.bin ${DEPLOYDIR} -} - -deploy_mx9() { - # Synopsys DDR - for ddr_firmware in ${DDR_FIRMWARE_NAME}; do - install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR} - done -} - -do_deploy() { - deploy_${SOC_FAMILY} -} - -addtask deploy after do_install before do_build - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" - -COMPATIBLE_MACHINE = "(mx8-generic-bsp|mx9-generic-bsp)" -COMPATIBLE_MACHINE:mx8m-generic-bsp = "(^$)" -COMPATIBLE_MACHINE:mx8x-generic-bsp = "(^$)" diff --git a/recipes-bsp/firmware-imx/firmware-imx-8m_8.18.bb b/recipes-bsp/firmware-imx/firmware-imx-8m_8.18.bb deleted file mode 100644 index 152ef0b5..00000000 --- a/recipes-bsp/firmware-imx/firmware-imx-8m_8.18.bb +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2018-2020 NXP -SUMMARY = "Freescale i.MX firmware for 8M and 8M Mini family" -DESCRIPTION = "Freescale i.MX firmware for 8M and 8M Mini family" - -require firmware-imx-${PV}.inc - -inherit deploy - -do_install[noexec] = "1" - -do_deploy() { - # Synopsys DDR - for ddr_firmware in ${DDR_FIRMWARE_NAME}; do - install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR} - done - # Cadence DP and HDMI - install -m 0644 ${S}/firmware/hdmi/cadence/signed_dp_imx8m.bin ${DEPLOYDIR} - install -m 0644 ${S}/firmware/hdmi/cadence/signed_hdmi_imx8m.bin ${DEPLOYDIR} -} -addtask deploy after do_install before do_build - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" - -COMPATIBLE_MACHINE = "(mx8m-generic-bsp)" diff --git a/recipes-bsp/firmware-imx/imx-boot-firmware-files_8.18.bb b/recipes-bsp/firmware-imx/imx-boot-firmware-files_8.18.bb new file mode 100644 index 00000000..d4408cf1 --- /dev/null +++ b/recipes-bsp/firmware-imx/imx-boot-firmware-files_8.18.bb @@ -0,0 +1,62 @@ +# Copyright (C) 2018-2020 NXP +SUMMARY = "Freescale i.MX firmware for 8 family" +DESCRIPTION = "Freescale i.MX firmware for 8 family" + +require firmware-imx-${PV}.inc + +inherit deploy nopackages + +do_install[noexec] = "1" + +DEPLOY_FOR = "" +DEPLOY_FOR:mx8-generic-bsp = "mx8" +DEPLOY_FOR:mx8m-generic-bsp = "mx8 mx8m" +DEPLOY_FOR:mx9-generic-bsp = "mx9" + +deploy_for_mx8() { + # Cadence HDMI + install -m 0644 ${S}/firmware/hdmi/cadence/hdmitxfw.bin ${DEPLOYDIR} + install -m 0644 ${S}/firmware/hdmi/cadence/hdmirxfw.bin ${DEPLOYDIR} + install -m 0644 ${S}/firmware/hdmi/cadence/dpfw.bin ${DEPLOYDIR} +} + +deploy_for_mx8m() { + # Synopsys DDR + for ddr_firmware in ${DDR_FIRMWARE_NAME}; do + install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR} + done + + # Cadence DP and HDMI + install -m 0644 ${S}/firmware/hdmi/cadence/signed_dp_imx8m.bin ${DEPLOYDIR} + install -m 0644 ${S}/firmware/hdmi/cadence/signed_hdmi_imx8m.bin ${DEPLOYDIR} +} + + +deploy_for_mx9() { + # Synopsys DDR + for ddr_firmware in ${DDR_FIRMWARE_NAME}; do + install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR} + done +} + +python () { + # Manually add the required functions as dependencies otherwise they won't be included in the + # final run script. + deploy_for = d.getVar('DEPLOY_FOR', True).split() + for soc in deploy_for: + d.appendVarFlag('do_deploy', 'vardeps', ' deploy_for_%s' % soc) +} + +do_deploy () { + for soc in ${DEPLOY_FOR}; do + bbnote "Running deploy for $soc" + deploy_for_$soc + done +} + +addtask deploy after do_install before do_build + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" + +COMPATIBLE_MACHINE = "(mx8-generic-bsp|mx9-generic-bsp)" +COMPATIBLE_MACHINE:mx8x-generic-bsp = "(^$)" -- cgit v1.2.3-54-g00ecf