diff options
Diffstat (limited to 'recipes-bsp/firmware-imx/firmware-imx_8.8.bb')
-rw-r--r-- | recipes-bsp/firmware-imx/firmware-imx_8.8.bb | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/recipes-bsp/firmware-imx/firmware-imx_8.8.bb b/recipes-bsp/firmware-imx/firmware-imx_8.8.bb new file mode 100644 index 00000000..aff22ba6 --- /dev/null +++ b/recipes-bsp/firmware-imx/firmware-imx_8.8.bb | |||
@@ -0,0 +1,132 @@ | |||
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/imx/vpu | ||
54 | install -m 0644 ${S}/firmware/vpu/vpu_fw_imx27_TO1.bin ${D}${nonarch_base_libdir}/firmware/imx/vpu | ||
55 | install -m 0644 ${S}/firmware/vpu/vpu_fw_imx27_TO2.bin ${D}${nonarch_base_libdir}/firmware/imx/vpu | ||
56 | install -m 0644 ${S}/firmware/vpu/vpu_fw_imx51.bin ${D}${nonarch_base_libdir}/firmware/imx/vpu | ||
57 | install -m 0644 ${S}/firmware/vpu/vpu_fw_imx53.bin ${D}${nonarch_base_libdir}/firmware/imx/vpu | ||
58 | install -m 0644 ${S}/firmware/vpu/vpu_fw_imx6d.bin ${D}${nonarch_base_libdir}/firmware/imx/vpu | ||
59 | install -m 0644 ${S}/firmware/vpu/vpu_fw_imx6q.bin ${D}${nonarch_base_libdir}/firmware/imx/vpu | ||
60 | } | ||
61 | |||
62 | # | ||
63 | # This prepend is here to produce separate packages containing firmware, | ||
64 | # which could be included separately based on the machine definition. | ||
65 | # | ||
66 | # It operates similar to the FILES mechanism by travesing through | ||
67 | # ${D} + folder supplied as a first parameter, matches the regexp supplied | ||
68 | # as second one, and for every file match - it creates a separate package, | ||
69 | # which contains only files that matches the pattern. | ||
70 | # | ||
71 | python populate_packages_prepend() { | ||
72 | easrcdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/easrc', d) | ||
73 | do_split_packages(d, easrcdir, '^easrc-([^_]*).*\.bin', | ||
74 | output_pattern='firmware-imx-easrc-%s', | ||
75 | description='Freescale IMX EASRC Firmware [%s]', | ||
76 | extra_depends='', | ||
77 | prepend=True) | ||
78 | |||
79 | vpudir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/vpu', d) | ||
80 | do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin', | ||
81 | output_pattern='firmware-imx-vpu-%s', | ||
82 | description='Freescale IMX VPU Firmware [%s]', | ||
83 | extra_depends='', | ||
84 | prepend=True) | ||
85 | |||
86 | sdmadir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/sdma', d) | ||
87 | do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin', | ||
88 | output_pattern='firmware-imx-sdma-%s', | ||
89 | description='Freescale IMX SDMA Firmware [%s]', | ||
90 | extra_depends='', | ||
91 | prepend=True) | ||
92 | |||
93 | xcvrdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xcvr', d) | ||
94 | do_split_packages(d, xcvrdir, '^xcvr-([^_]*).*\.bin', | ||
95 | output_pattern='firmware-imx-xcvr-%s', | ||
96 | description='Freescale IMX XCVR Firmware [%s]', | ||
97 | extra_depends='', | ||
98 | prepend=True) | ||
99 | |||
100 | xuvidir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xuvi', d) | ||
101 | do_split_packages(d, xuvidir, '^vpu_fw_([^_]*).*\.bin', | ||
102 | output_pattern='firmware-imx-xuvi-%s', | ||
103 | description='Freescale IMX XUVI Firmware [%s]', | ||
104 | extra_depends='', | ||
105 | prepend=True) | ||
106 | } | ||
107 | |||
108 | # Declare a contract that we would provide packages produced by prepend above | ||
109 | PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-* ${PN}-easrc-* ${PN}-xcvr-* ${PN}-xuvi-*" | ||
110 | |||
111 | # | ||
112 | # Deal with the rest of Firmware packages here | ||
113 | # | ||
114 | # Provide EPDC and HDMI Firmware in common packages as they tend to be special in | ||
115 | # terms of the content. | ||
116 | # | ||
117 | # NOTE: PACKAGES are defined explicitly here in order to remove the auto-generated | ||
118 | # complimentary packages (-dev and -dbg). | ||
119 | # This is done in order to be able to keep the main package empty and fail when | ||
120 | # somebody tries to install it in the image. | ||
121 | # If -dev package is present in that setup, and dev-pkgs is enabled in | ||
122 | # IMAGE_FEATURES - this leads to a failure during do_rootfs() while all -dev | ||
123 | # packages would be installed, and -dev package would fail because the main one | ||
124 | # is empty. | ||
125 | # Therefore, we opt-out from producing -dev package here, since also for firmware | ||
126 | # files it makes no sense. | ||
127 | PACKAGES = "${PN} ${PN}-epdc ${PN}-hdmi" | ||
128 | |||
129 | FILES_${PN}-epdc = "${nonarch_base_libdir}/firmware/imx/epdc/" | ||
130 | FILES_${PN}-hdmi = "${nonarch_base_libdir}/firmware/imx/hdmi/" | ||
131 | |||
132 | COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)" | ||