diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-08-18 08:22:46 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 08:22:46 -0300 |
commit | ba25d6659c5220970de523f938b0358bc11ae0ac (patch) | |
tree | e3aa70611355724e1924a99c16a55769fe7ffe88 /recipes-bsp/firmware-imx/firmware-imx_8.16.bb | |
parent | 1d8ac870da885b0b2872d2448eec627edaf014fa (diff) | |
parent | 1f76bddcc9fdbb00b3293caac917a5ca85fe437b (diff) | |
download | meta-freescale-ba25d6659c5220970de523f938b0358bc11ae0ac.tar.gz |
Merge pull request #1175 from Freescale/backport-1171-to-kirkstone
[Backport kirkstone] recipes-bsp: updates from NXP release 5.15.32-2.0.0
Diffstat (limited to 'recipes-bsp/firmware-imx/firmware-imx_8.16.bb')
-rw-r--r-- | recipes-bsp/firmware-imx/firmware-imx_8.16.bb | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/recipes-bsp/firmware-imx/firmware-imx_8.16.bb b/recipes-bsp/firmware-imx/firmware-imx_8.16.bb new file mode 100644 index 00000000..f84ea1fa --- /dev/null +++ b/recipes-bsp/firmware-imx/firmware-imx_8.16.bb | |||
@@ -0,0 +1,156 @@ | |||
1 | # Copyright (C) 2012-2016 Freescale Semiconductor | ||
2 | # Copyright (C) 2017-2021 NXP | ||
3 | # Copyright (C) 2018 O.S. Systems Software LTDA. | ||
4 | SUMMARY = "Freescale i.MX firmware" | ||
5 | DESCRIPTION = "Freescale i.MX firmware such as for the VPU" | ||
6 | |||
7 | require firmware-imx-${PV}.inc | ||
8 | |||
9 | PE = "1" | ||
10 | |||
11 | inherit allarch | ||
12 | |||
13 | do_install() { | ||
14 | install -d ${D}${nonarch_base_libdir}/firmware/imx | ||
15 | |||
16 | # SDMA Firmware section | ||
17 | install -d ${D}${nonarch_base_libdir}/firmware/imx/sdma | ||
18 | install -m 0644 ${S}/firmware/sdma/* ${D}${nonarch_base_libdir}/firmware/imx/sdma | ||
19 | rm -f ${D}${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx6q.bin | ||
20 | rm -f ${D}${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx7d.bin | ||
21 | |||
22 | # EASRC Firmware section | ||
23 | install -d ${D}${nonarch_base_libdir}/firmware/imx/easrc | ||
24 | install -m 0644 ${S}/firmware/easrc/* ${D}${nonarch_base_libdir}/firmware/imx/easrc/ | ||
25 | |||
26 | # XCVR Firmware section | ||
27 | install -d ${D}${nonarch_base_libdir}/firmware/imx/xcvr | ||
28 | install -m 0644 ${S}/firmware/xcvr/* ${D}${nonarch_base_libdir}/firmware/imx/xcvr/ | ||
29 | |||
30 | # XUVI Firmware section | ||
31 | install -d ${D}${nonarch_base_libdir}/firmware/imx/xuvi | ||
32 | install -m 0644 ${S}/firmware/xuvi/* ${D}${nonarch_base_libdir}/firmware/imx/xuvi/ | ||
33 | |||
34 | # EPDC Firmware section | ||
35 | # NOTE: | ||
36 | # epdc_ED060XH2C1.fw file has .nonrestricted suffix in the source archive, hence it should | ||
37 | # be installed with a different name | ||
38 | install -d ${D}${nonarch_base_libdir}/firmware/imx/epdc | ||
39 | install -m 0644 ${S}/firmware/epdc/*.fw ${D}${nonarch_base_libdir}/firmware/imx/epdc/ | ||
40 | install -m 0644 ${S}/firmware/epdc/epdc_ED060XH2C1.fw.nonrestricted ${D}${nonarch_base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw | ||
41 | |||
42 | # HDMI Firmware section | ||
43 | # NOTE: | ||
44 | # Only install pre-defined list of firmware files, since the source archive contains | ||
45 | # also HDMI binary files for imx8m derivatives, which are taken care of by another recipe | ||
46 | install -m 0644 ${S}/firmware/hdmi/cadence/hdmitxfw.bin ${D}${nonarch_base_libdir}/firmware | ||
47 | install -m 0644 ${S}/firmware/hdmi/cadence/hdmirxfw.bin ${D}${nonarch_base_libdir}/firmware | ||
48 | install -m 0644 ${S}/firmware/hdmi/cadence/dpfw.bin ${D}${nonarch_base_libdir}/firmware | ||
49 | |||
50 | # VPU Firmware section | ||
51 | # NOTE: | ||
52 | # Do the same thing as above for HDMI - only install a pre-defined list of firmware files, | ||
53 | # as some of other files are provided by packages from other recipes. | ||
54 | install -d ${D}${nonarch_base_libdir}/firmware/vpu | ||
55 | install -m 0644 ${S}/firmware/vpu/vpu_fw_imx*.bin ${D}${nonarch_base_libdir}/firmware/vpu | ||
56 | } | ||
57 | |||
58 | # | ||
59 | # This prepend is here to produce separate packages containing firmware, | ||
60 | # which could be included separately based on the machine definition. | ||
61 | # | ||
62 | # It operates similar to the FILES mechanism by travesing through | ||
63 | # ${D} + folder supplied as a first parameter, matches the regexp supplied | ||
64 | # as second one, and for every file match - it creates a separate package, | ||
65 | # which contains only files that matches the pattern. | ||
66 | # | ||
67 | python populate_packages:prepend() { | ||
68 | # CODA driver tries to locate VPU firmwares directly in ${nonarch_base_libdir}/firmware, to | ||
69 | # avoid fallback loading which is usually 40-60 seconds later after system boots up, let's | ||
70 | # create symbolic links in ${nonarch_base_libdir}/firmware for VPU firmwares. | ||
71 | def coda_vpu_links(file, pkg, pattern, format, basename): | ||
72 | # Only CODA VPU firmwares need this procedure | ||
73 | if 'imx8' in basename: | ||
74 | return | ||
75 | |||
76 | dir = os.path.dirname(file) | ||
77 | dir = os.path.abspath(os.path.join(dir, os.pardir)) | ||
78 | cwd = os.getcwd() | ||
79 | |||
80 | os.chdir(dir) | ||
81 | |||
82 | name = os.path.basename(file) | ||
83 | os.symlink(os.path.join("vpu", name), name) | ||
84 | |||
85 | oldfiles = d.getVar('FILES:' + pkg) | ||
86 | newfile = os.path.join(d.getVar('nonarch_base_libdir'), "firmware", name) | ||
87 | d.setVar('FILES:' + pkg, oldfiles + " " + newfile) | ||
88 | |||
89 | os.chdir(cwd) | ||
90 | |||
91 | easrcdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/easrc', d) | ||
92 | do_split_packages(d, easrcdir, '^easrc-([^_]*).*\.bin', | ||
93 | output_pattern='firmware-imx-easrc-%s', | ||
94 | description='Freescale IMX EASRC Firmware [%s]', | ||
95 | extra_depends='', | ||
96 | prepend=True) | ||
97 | |||
98 | vpudir = bb.data.expand('${nonarch_base_libdir}/firmware/vpu', d) | ||
99 | do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin', | ||
100 | output_pattern='firmware-imx-vpu-%s', | ||
101 | description='Freescale IMX VPU Firmware [%s]', | ||
102 | hook=coda_vpu_links, | ||
103 | extra_depends='', | ||
104 | prepend=True) | ||
105 | |||
106 | sdmadir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/sdma', d) | ||
107 | do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin', | ||
108 | output_pattern='firmware-imx-sdma-%s', | ||
109 | description='Freescale IMX SDMA Firmware [%s]', | ||
110 | extra_depends='', | ||
111 | prepend=True) | ||
112 | |||
113 | xcvrdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xcvr', d) | ||
114 | do_split_packages(d, xcvrdir, '^xcvr-([^_]*).*\.bin', | ||
115 | output_pattern='firmware-imx-xcvr-%s', | ||
116 | description='Freescale IMX XCVR Firmware [%s]', | ||
117 | extra_depends='', | ||
118 | prepend=True) | ||
119 | |||
120 | xuvidir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xuvi', d) | ||
121 | do_split_packages(d, xuvidir, '^vpu_fw_([^_]*).*\.bin', | ||
122 | output_pattern='firmware-imx-xuvi-%s', | ||
123 | description='Freescale IMX XUVI Firmware [%s]', | ||
124 | extra_depends='', | ||
125 | prepend=True) | ||
126 | } | ||
127 | |||
128 | # Declare a contract that we would provide packages produced by prepend above | ||
129 | PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-* ${PN}-easrc-* ${PN}-xcvr-* ${PN}-xuvi-*" | ||
130 | |||
131 | # | ||
132 | # Deal with the rest of Firmware packages here | ||
133 | # | ||
134 | # Provide EPDC and HDMI Firmware in common packages as they tend to be special in | ||
135 | # terms of the content. | ||
136 | # | ||
137 | # NOTE: PACKAGES are defined explicitly here in order to remove the auto-generated | ||
138 | # complimentary packages (-dev and -dbg). | ||
139 | # This is done in order to be able to keep the main package empty and fail when | ||
140 | # somebody tries to install it in the image. | ||
141 | # If -dev package is present in that setup, and dev-pkgs is enabled in | ||
142 | # IMAGE_FEATURES - this leads to a failure during do_rootfs() while all -dev | ||
143 | # packages would be installed, and -dev package would fail because the main one | ||
144 | # is empty. | ||
145 | # Therefore, we opt-out from producing -dev package here, since also for firmware | ||
146 | # files it makes no sense. | ||
147 | PACKAGES = "${PN} ${PN}-epdc ${PN}-hdmi" | ||
148 | |||
149 | FILES:${PN}-epdc = "${nonarch_base_libdir}/firmware/imx/epdc/" | ||
150 | FILES:${PN}-hdmi = " \ | ||
151 | ${nonarch_base_libdir}/firmware/hdmitxfw.bin \ | ||
152 | ${nonarch_base_libdir}/firmware/hdmirxfw.bin \ | ||
153 | ${nonarch_base_libdir}/firmware/dpfw.bin \ | ||
154 | " | ||
155 | |||
156 | COMPATIBLE_MACHINE = "(imx-generic-bsp)" | ||