summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/firmware-imx/imx-boot-firmware-files_8.32.bb
blob: c56a9968fc74c3d2dfbb116874e1591624491198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright (C) 2018-2026 NXP
SUMMARY = "Freescale i.MX Firmware files used for boot"
DESCRIPTION = "Prebuilt i.MX firmware blobs (HDMI, SECO and related) used during boot."

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 = "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_mx8[doc] = "Deploy the Cadence HDMI firmware used by the i.MX 8 boot container"

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_mx8m[doc] = "Deploy the Synopsys DDR and Cadence DP/HDMI firmware used by the i.MX 8M boot container"

deploy_for_mx9() {
    # Synopsys DDR
    for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
        install -m 0644 ${S}/firmware/ddr/synopsys/${ddr_firmware} ${DEPLOYDIR}
    done
}
deploy_for_mx9[doc] = "Deploy the Synopsys DDR firmware used by the i.MX 9 boot container"

# do_deploy calls deploy_for_$soc through the shell, so BitBake cannot see the
# dependency on the function body by itself.
do_deploy[vardeps] += "${@' '.join('deploy_for_' + soc for soc in d.getVar('DEPLOY_FOR').split())}"

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 = "(^$)"