diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-02-18 19:43:56 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2022-02-21 20:06:28 -0300 |
commit | 30f5ce1d2168389295b4813e01898c2fb0f9bab9 (patch) | |
tree | f6f78dbf8e5eef40510739dc1db79d60f05189fb /recipes-graphics/imx-gpu-viv | |
parent | a3b102a9ed12ea03e72f713ed40968da1776c6d3 (diff) | |
download | meta-freescale-30f5ce1d2168389295b4813e01898c2fb0f9bab9.tar.gz |
Generalize overrides subsystem for NXP and Mainline support
Essentially, we extend the overrides to a generic-bsp, nxp-bsp, and
mainline-bsp.
So, for example, the mx8mq override is split into:
- imx-generic-bsp: compatible with every i.MX SoC and both BSP variants
- imx-nxp-bsp: compatible with every i.MX SoC but specific to NXP BSP
- imx-mainline-bsp: compatible with every i.MX SoC but specific to Mainline BSP
- mx8-generic-bsp: compatible with every i.MX8 SoC and both BSP variants
- mx8-nxp-bsp: compatible with every i.MX8 SoC but specific to NXP BSP
- mx8-mainline-bsp: compatible with every i.MX8 SoC but specific to Mainline BSP
- mx8m-generic-bsp: compatible with every i.MX8M SoC and both BSP variants
- mx8m-nxp-bsp: compatible with every i.MX8M SoC but specific to NXP BSP
- mx8m-mainline-bsp: compatible with every i.MX8M SoC but specific to Mainline BSP
- mx8mq-generic-bsp: compatible with every i.MX8MQ SoC and both BSP variants
- mx8mq-nxp-bsp: compatible with every i.MX8MQ SoC8 but specific to NXP BSP
- mx8mq-mainline-bsp: compatible with every i.MX8MQ SoC but specific to Mainline BSP
The extender mechanism is responsible for extending the override list to
include the generic overrides. We can then use the three different
variants to handle the metadata correctly.
Generically speaking, the conversion mainly was automated (with a lot of
back and forth until getting it right).
To convert an existing layer, the following script can be used:
```sh
git ls-files classes recipes-* \
| xargs sed -i \
-e 's,:\(mx[6-8]\w*\),:\1-nxp-bsp,g' \
-e 's,(\(mx[6-8]\w*\)),(\1-nxp-bsp),g' \
-e 's,\(mx[6-8]\w*\)|,\1-nxp-bsp|,g' \
-e 's,|\(mx[6-8]\w*\)),|\1-nxp-bsp),g' \
\
-e 's,:\(mx[5s]\w*\),:\1-generic-bsp,g' \
-e 's,(\(mx[5s]\w*\)),(\1-generic-bsp),g' \
-e 's,\(mx[5s]\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(mx[5s]\w*\)),|\1-generic-bsp),g' \
\
-e 's,:\(vf\w*\),:\1-generic-bsp,g' \
-e 's,:\(vf[56]0\w*\),:\1-generic-bsp,g' \
-e 's,\(vf\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(vf\w*\)),|\1-generic-bsp),g' \
-e 's,\(vf[56]0\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(vf[56]0\w*\)),|\1-generic-bsp),g' \
\
-e 's,:\(imx\) ,:\1-nxp-bsp ,g' \
-e 's,(\(imx\)),(\1-nxp-bsp),g' \
-e 's,\(imx\)|,\1-nxp-bsp|,g' \
-e 's,|\(imx\)),|\1-nxp-bsp),g'
for d in $(find -type d | egrep '/mx[6-8]w*'); do
git mv $d $d-nxp-bsp
done
for d in $(find -type d | egrep '/imx$'); do
git mv $d $d-nxp-bsp
done
for d in $(find -type d | egrep '/mx[5s]w*'); do
git mv $d $d-generic-bsp
done
```
Fixes: #791.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics/imx-gpu-viv')
3 files changed, 21 insertions, 26 deletions
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc index 1b3a0169..61637393 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | |||
@@ -18,7 +18,7 @@ DEPENDS += " \ | |||
18 | '', d)} \ | 18 | '', d)} \ |
19 | " | 19 | " |
20 | DEPENDS:append:imxdrm = " libdrm wayland" | 20 | DEPENDS:append:imxdrm = " libdrm wayland" |
21 | DEPENDS:append:mx8 = " patchelf-native" | 21 | DEPENDS:append:mx8-nxp-bsp = " patchelf-native" |
22 | 22 | ||
23 | # imx-gpu-viv does not provide everything it needs to for virtual/libgl | 23 | # imx-gpu-viv does not provide everything it needs to for virtual/libgl |
24 | # on x11 backend or on Wayland backend with XWayland support. | 24 | # on x11 backend or on Wayland backend with XWayland support. |
@@ -31,12 +31,12 @@ EXTRA_PROVIDES:append:imxgpu3d = " \ | |||
31 | virtual/libgles1 \ | 31 | virtual/libgles1 \ |
32 | virtual/libgles2 \ | 32 | virtual/libgles2 \ |
33 | " | 33 | " |
34 | EXTRA_PROVIDES:append:mx8 = " \ | 34 | EXTRA_PROVIDES:append:mx8-nxp-bsp = " \ |
35 | virtual/libgbm \ | 35 | virtual/libgbm \ |
36 | " | 36 | " |
37 | PROVIDES_OPENVX = "" | 37 | PROVIDES_OPENVX = "" |
38 | PROVIDES_OPENVX:mx8 = "virtual/libopenvx" | 38 | PROVIDES_OPENVX:mx8-nxp-bsp = "virtual/libopenvx" |
39 | PROVIDES_OPENVX:mx8mm = "" | 39 | PROVIDES_OPENVX:mx8mm-nxp-bsp = "" |
40 | PROVIDES += " \ | 40 | PROVIDES += " \ |
41 | imx-gpu-viv \ | 41 | imx-gpu-viv \ |
42 | libgal-imx \ | 42 | libgal-imx \ |
@@ -56,12 +56,7 @@ PE = "1" | |||
56 | 56 | ||
57 | inherit fsl-eula-unpack features_check | 57 | inherit fsl-eula-unpack features_check |
58 | 58 | ||
59 | # For i.MX 6 & 7, support Wayland and Framebuffer | 59 | REQUIRED_DISTRO_FEATURES:mx8-nxp-bsp = "wayland" |
60 | CONFLICT_DISTRO_FEATURES:mx6 = \ | ||
61 | "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', 'x11', d)}" | ||
62 | CONFLICT_DISTRO_FEATURES:mx7 = "${CONFLICT_DISTRO_FEATURES:mx6}" | ||
63 | # For i.MX 8, support Wayland only | ||
64 | REQUIRED_DISTRO_FEATURES:mx8 = "wayland" | ||
65 | 60 | ||
66 | SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" | 61 | SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" |
67 | 62 | ||
@@ -72,7 +67,7 @@ PACKAGECONFIG[valgrind] = "" | |||
72 | 67 | ||
73 | # Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below | 68 | # Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below |
74 | IMX_PACKAGES_GBM = "" | 69 | IMX_PACKAGES_GBM = "" |
75 | IMX_PACKAGES_GBM:mx8 = "libgbm-imx libgbm-imx-dev" | 70 | IMX_PACKAGES_GBM:mx8-nxp-bsp = "libgbm-imx libgbm-imx-dev" |
76 | PACKAGES =+ "libclc-imx libclc-imx-dev \ | 71 | PACKAGES =+ "libclc-imx libclc-imx-dev \ |
77 | libgl-imx libgl-imx-dev \ | 72 | libgl-imx libgl-imx-dev \ |
78 | libgles1-imx libgles1-imx-dev \ | 73 | libgles1-imx libgles1-imx-dev \ |
@@ -140,23 +135,23 @@ python __anonymous() { | |||
140 | } | 135 | } |
141 | 136 | ||
142 | IS_MX6SL = "0" | 137 | IS_MX6SL = "0" |
143 | IS_MX6SL:mx6sl = "1" | 138 | IS_MX6SL:mx6sl-nxp-bsp = "1" |
144 | 139 | ||
145 | IS_MX8 = "0" | 140 | IS_MX8 = "0" |
146 | IS_MX8:mx8 = "1" | 141 | IS_MX8:mx8-nxp-bsp = "1" |
147 | 142 | ||
148 | PACKAGE_FP_TYPE = "hardfp" | 143 | PACKAGE_FP_TYPE = "hardfp" |
149 | 144 | ||
150 | HAS_GBM = "false" | 145 | HAS_GBM = "false" |
151 | HAS_GBM:mx8 = "true" | 146 | HAS_GBM:mx8-nxp-bsp = "true" |
152 | 147 | ||
153 | IMX_SOC = "IMX_SOC_NOT_SET" | 148 | IMX_SOC = "IMX_SOC_NOT_SET" |
154 | IMX_SOC:mx8qm = "mx8qm" | 149 | IMX_SOC:mx8qm-nxp-bsp = "mx8qm" |
155 | IMX_SOC:mx8mp = "mx8mp" | 150 | IMX_SOC:mx8mp-nxp-bsp = "mx8mp" |
156 | IMX_SOC:mx8mq = "mx8mq" | 151 | IMX_SOC:mx8mq-nxp-bsp = "mx8mq" |
157 | IMX_SOC:mx8qxp = "mx8qxp" | 152 | IMX_SOC:mx8qxp-nxp-bsp = "mx8qxp" |
158 | IMX_SOC:mx8mn = "mx8mn" | 153 | IMX_SOC:mx8mn-nxp-bsp = "mx8mn" |
159 | IMX_SOC:mx8ulp = "mx8ulp" | 154 | IMX_SOC:mx8ulp-nxp-bsp = "mx8ulp" |
160 | 155 | ||
161 | LIBVULKAN_VERSION_MAJOR = "1" | 156 | LIBVULKAN_VERSION_MAJOR = "1" |
162 | LIBVULKAN_VERSION = "${LIBVULKAN_VERSION_MAJOR}.1.6" | 157 | LIBVULKAN_VERSION = "${LIBVULKAN_VERSION_MAJOR}.1.6" |
@@ -262,9 +257,9 @@ INSANE_SKIP:libgal-imx += "build-deps" | |||
262 | 257 | ||
263 | FILES:libvsc-imx = "${libdir}/libVSC${SOLIBS}" | 258 | FILES:libvsc-imx = "${libdir}/libVSC${SOLIBS}" |
264 | 259 | ||
265 | FILES:libgbm-imx:mx8 = "${libdir}/libgbm*${REALSOLIBS} ${libdir}/libgbm${SOLIBSDEV} ${libdir}/libgbm_viv${SOLIBSDEV}" | 260 | FILES:libgbm-imx:mx8-nxp-bsp = "${libdir}/libgbm*${REALSOLIBS} ${libdir}/libgbm${SOLIBSDEV} ${libdir}/libgbm_viv${SOLIBSDEV}" |
266 | FILES:libgbm-imx-dev:mx8 = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" | 261 | FILES:libgbm-imx-dev:mx8-nxp-bsp = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" |
267 | RDEPENDS:libgbm-imx:append:mx8 = " libdrm" | 262 | RDEPENDS:libgbm-imx:append:mx8-nxp-bsp = " libdrm" |
268 | INSANE_SKIP:libgbm-imx += "dev-so" | 263 | INSANE_SKIP:libgbm-imx += "dev-so" |
269 | 264 | ||
270 | FILES:libvulkan-imx = "${libdir}/libvulkan_VSI${REALSOLIBS} ${libdir}/libSPIRV_viv${SOLIBS}" | 265 | FILES:libvulkan-imx = "${libdir}/libvulkan_VSI${REALSOLIBS} ${libdir}/libSPIRV_viv${SOLIBS}" |
@@ -328,4 +323,4 @@ INSANE_SKIP:imx-gpu-viv-demos += "rpaths dev-deps" | |||
328 | 323 | ||
329 | FILES:libnn-imx = "${libdir}/libNN*${SOLIBS}" | 324 | FILES:libnn-imx = "${libdir}/libNN*${SOLIBS}" |
330 | 325 | ||
331 | # COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx8)" | 326 | # COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp|mx6sx-nxp-bsp|mx6sl-nxp-bsp|mx8-nxp-bsp)" |
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch32.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch32.bb index a2f23731..ea3b0bde 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch32.bb +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch32.bb | |||
@@ -7,4 +7,4 @@ require imx-gpu-viv-6.inc | |||
7 | SRC_URI[md5sum] = "d577c4e34df73855ebf1c3b3be206f40" | 7 | SRC_URI[md5sum] = "d577c4e34df73855ebf1c3b3be206f40" |
8 | SRC_URI[sha256sum] = "a0266612e8c9ca64b417047274941c867de1058db6709170d0bb5c8b8a38eab1" | 8 | SRC_URI[sha256sum] = "a0266612e8c9ca64b417047274941c867de1058db6709170d0bb5c8b8a38eab1" |
9 | 9 | ||
10 | COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)" | 10 | COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp|mx6sx-nxp-bsp|mx6sl-nxp-bsp|mx7ulp-nxp-bsp)" |
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch64.bb index b69bd041..7fc1bc4e 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch64.bb +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p2.4-aarch64.bb | |||
@@ -3,4 +3,4 @@ require imx-gpu-viv-6.inc | |||
3 | SRC_URI[md5sum] = "d53371c1a9a504ff15f747e725164dcb" | 3 | SRC_URI[md5sum] = "d53371c1a9a504ff15f747e725164dcb" |
4 | SRC_URI[sha256sum] = "6106133afed40327b65d3eec0c197d214ff8f28f8ce3cad94653be4bffb9f9d4" | 4 | SRC_URI[sha256sum] = "6106133afed40327b65d3eec0c197d214ff8f28f8ce3cad94653be4bffb9f9d4" |
5 | 5 | ||
6 | COMPATIBLE_MACHINE = "(mx8)" | 6 | COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" |