diff options
Diffstat (limited to 'recipes-bsp/firmware-imx/firmware-imx_8.10.bb')
-rw-r--r-- | recipes-bsp/firmware-imx/firmware-imx_8.10.bb | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/recipes-bsp/firmware-imx/firmware-imx_8.10.bb b/recipes-bsp/firmware-imx/firmware-imx_8.10.bb new file mode 100644 index 00000000..84534a62 --- /dev/null +++ b/recipes-bsp/firmware-imx/firmware-imx_8.10.bb | |||
@@ -0,0 +1,127 @@ | |||
1 | # Copyright (C) 2012-2016 Freescale Semiconductor | ||
2 | # Copyright (C) 2017-2020 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 | |||
20 | # EASRC Firmware section | ||
21 | install -d ${D}${nonarch_base_libdir}/firmware/imx/easrc | ||
22 | install -m 0644 ${S}/firmware/easrc/* ${D}${nonarch_base_libdir}/firmware/imx/easrc/ | ||
23 | |||
24 | # XCVR Firmware section | ||
25 | install -d ${D}${nonarch_base_libdir}/firmware/imx/xcvr | ||
26 | install -m 0644 ${S}/firmware/xcvr/* ${D}${nonarch_base_libdir}/firmware/imx/xcvr/ | ||
27 | |||
28 | # XUVI Firmware section | ||
29 | install -d ${D}${nonarch_base_libdir}/firmware/imx/xuvi | ||
30 | install -m 0644 ${S}/firmware/xuvi/* ${D}${nonarch_base_libdir}/firmware/imx/xuvi/ | ||
31 | |||
32 | # EPDC Firmware section | ||
33 | # NOTE: | ||
34 | # epdc_ED060XH2C1.fw file has .nonrestricted suffix in the source archive, hence it should | ||
35 | # be installed with a different name | ||
36 | install -d ${D}${nonarch_base_libdir}/firmware/imx/epdc | ||
37 | install -m 0644 ${S}/firmware/epdc/*.fw ${D}${nonarch_base_libdir}/firmware/imx/epdc/ | ||
38 | install -m 0644 ${S}/firmware/epdc/epdc_ED060XH2C1.fw.nonrestricted ${D}${nonarch_base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw | ||
39 | |||
40 | # HDMI Firmware section | ||
41 | # NOTE: | ||
42 | # Only install pre-defined list of firmware files, since the source archive contains | ||
43 | # also HDMI binary files for imx8m derivatives, which are taken care of by another recipe | ||
44 | install -d ${D}${nonarch_base_libdir}/firmware/imx/hdmi | ||
45 | install -m 0644 ${S}/firmware/hdmi/cadence/hdmitxfw.bin ${D}${nonarch_base_libdir}/firmware/imx/hdmi | ||
46 | install -m 0644 ${S}/firmware/hdmi/cadence/hdmirxfw.bin ${D}${nonarch_base_libdir}/firmware/imx/hdmi | ||
47 | install -m 0644 ${S}/firmware/hdmi/cadence/dpfw.bin ${D}${nonarch_base_libdir}/firmware/imx/hdmi | ||
48 | |||
49 | # VPU Firmware section | ||
50 | # NOTE: | ||
51 | # Do the same thing as above for HDMI - only install a pre-defined list of firmware files, | ||
52 | # as some of other files are provided by packages from other recipes. | ||
53 | install -d ${D}${nonarch_base_libdir}/firmware/vpu | ||
54 | install -m 0644 ${S}/firmware/vpu/vpu_fw_imx*.bin ${D}${nonarch_base_libdir}/firmware/vpu | ||
55 | } | ||
56 | |||
57 | # | ||
58 | # This prepend is here to produce separate packages containing firmware, | ||
59 | # which could be included separately based on the machine definition. | ||
60 | # | ||
61 | # It operates similar to the FILES mechanism by travesing through | ||
62 | # ${D} + folder supplied as a first parameter, matches the regexp supplied | ||
63 | # as second one, and for every file match - it creates a separate package, | ||
64 | # which contains only files that matches the pattern. | ||
65 | # | ||
66 | python populate_packages_prepend() { | ||
67 | easrcdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/easrc', d) | ||
68 | do_split_packages(d, easrcdir, '^easrc-([^_]*).*\.bin', | ||
69 | output_pattern='firmware-imx-easrc-%s', | ||
70 | description='Freescale IMX EASRC Firmware [%s]', | ||
71 | extra_depends='', | ||
72 | prepend=True) | ||
73 | |||
74 | vpudir = bb.data.expand('${nonarch_base_libdir}/firmware/vpu', d) | ||
75 | do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin', | ||
76 | output_pattern='firmware-imx-vpu-%s', | ||
77 | description='Freescale IMX VPU Firmware [%s]', | ||
78 | extra_depends='', | ||
79 | prepend=True) | ||
80 | |||
81 | sdmadir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/sdma', d) | ||
82 | do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin', | ||
83 | output_pattern='firmware-imx-sdma-%s', | ||
84 | description='Freescale IMX SDMA Firmware [%s]', | ||
85 | extra_depends='', | ||
86 | prepend=True) | ||
87 | |||
88 | xcvrdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xcvr', d) | ||
89 | do_split_packages(d, xcvrdir, '^xcvr-([^_]*).*\.bin', | ||
90 | output_pattern='firmware-imx-xcvr-%s', | ||
91 | description='Freescale IMX XCVR Firmware [%s]', | ||
92 | extra_depends='', | ||
93 | prepend=True) | ||
94 | |||
95 | xuvidir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xuvi', d) | ||
96 | do_split_packages(d, xuvidir, '^vpu_fw_([^_]*).*\.bin', | ||
97 | output_pattern='firmware-imx-xuvi-%s', | ||
98 | description='Freescale IMX XUVI Firmware [%s]', | ||
99 | extra_depends='', | ||
100 | prepend=True) | ||
101 | } | ||
102 | |||
103 | # Declare a contract that we would provide packages produced by prepend above | ||
104 | PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-* ${PN}-easrc-* ${PN}-xcvr-* ${PN}-xuvi-*" | ||
105 | |||
106 | # | ||
107 | # Deal with the rest of Firmware packages here | ||
108 | # | ||
109 | # Provide EPDC and HDMI Firmware in common packages as they tend to be special in | ||
110 | # terms of the content. | ||
111 | # | ||
112 | # NOTE: PACKAGES are defined explicitly here in order to remove the auto-generated | ||
113 | # complimentary packages (-dev and -dbg). | ||
114 | # This is done in order to be able to keep the main package empty and fail when | ||
115 | # somebody tries to install it in the image. | ||
116 | # If -dev package is present in that setup, and dev-pkgs is enabled in | ||
117 | # IMAGE_FEATURES - this leads to a failure during do_rootfs() while all -dev | ||
118 | # packages would be installed, and -dev package would fail because the main one | ||
119 | # is empty. | ||
120 | # Therefore, we opt-out from producing -dev package here, since also for firmware | ||
121 | # files it makes no sense. | ||
122 | PACKAGES = "${PN} ${PN}-epdc ${PN}-hdmi" | ||
123 | |||
124 | FILES_${PN}-epdc = "${nonarch_base_libdir}/firmware/imx/epdc/" | ||
125 | FILES_${PN}-hdmi = "${nonarch_base_libdir}/firmware/imx/hdmi/" | ||
126 | |||
127 | COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)" | ||