summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-test/imx-test_git.bb
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2022-02-18 19:43:56 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2022-02-21 20:06:28 -0300
commit30f5ce1d2168389295b4813e01898c2fb0f9bab9 (patch)
treef6f78dbf8e5eef40510739dc1db79d60f05189fb /recipes-bsp/imx-test/imx-test_git.bb
parenta3b102a9ed12ea03e72f713ed40968da1776c6d3 (diff)
downloadmeta-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-bsp/imx-test/imx-test_git.bb')
-rw-r--r--recipes-bsp/imx-test/imx-test_git.bb24
1 files changed, 12 insertions, 12 deletions
diff --git a/recipes-bsp/imx-test/imx-test_git.bb b/recipes-bsp/imx-test/imx-test_git.bb
index d33ad18c..84696e35 100644
--- a/recipes-bsp/imx-test/imx-test_git.bb
+++ b/recipes-bsp/imx-test/imx-test_git.bb
@@ -9,8 +9,8 @@ LICENSE = "GPLv2+"
9LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c" 9LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
10 10
11DEPENDS = "alsa-lib libdrm" 11DEPENDS = "alsa-lib libdrm"
12DEPENDS:append:mx6 = " imx-lib" 12DEPENDS:append:mx6-nxp-bsp = " imx-lib"
13DEPENDS:append:mx7 = " imx-lib" 13DEPENDS:append:mx7-nxp-bsp = " imx-lib"
14DEPENDS:append:imxvpu = " virtual/imxvpu" 14DEPENDS:append:imxvpu = " virtual/imxvpu"
15 15
16PE = "1" 16PE = "1"
@@ -29,22 +29,22 @@ inherit module-base use-imx-headers
29INHIBIT_PACKAGE_STRIP = "1" 29INHIBIT_PACKAGE_STRIP = "1"
30INHIBIT_PACKAGE_DEBUG_SPLIT = "1" 30INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
31 31
32PLATFORM:mx6q = "IMX6Q" 32PLATFORM:mx6q-nxp-bsp = "IMX6Q"
33PLATFORM:mx6dl = "IMX6Q" 33PLATFORM:mx6dl-nxp-bsp = "IMX6Q"
34PLATFORM:mx6sl = "IMX6SL" 34PLATFORM:mx6sl-nxp-bsp = "IMX6SL"
35PLATFORM:mx6sll = "IMX6SL" 35PLATFORM:mx6sll-nxp-bsp = "IMX6SL"
36PLATFORM:mx6sx = "IMX6SX" 36PLATFORM:mx6sx-nxp-bsp = "IMX6SX"
37PLATFORM:mx6ul = "IMX6UL" 37PLATFORM:mx6ul-nxp-bsp = "IMX6UL"
38PLATFORM:mx7d = "IMX7D" 38PLATFORM:mx7d-nxp-bsp = "IMX7D"
39PLATFORM:mx7ulp = "IMX7D" 39PLATFORM:mx7ulp-nxp-bsp = "IMX7D"
40PLATFORM:mx8 = "IMX8" 40PLATFORM:mx8-nxp-bsp = "IMX8"
41 41
42PARALLEL_MAKE = "-j 1" 42PARALLEL_MAKE = "-j 1"
43EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}" 43EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}"
44 44
45PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" 45PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
46PACKAGECONFIG:append:imxvpu = " vpu" 46PACKAGECONFIG:append:imxvpu = " vpu"
47PACKAGECONFIG:append:mx8m = " swpdm" 47PACKAGECONFIG:append:mx8m-nxp-bsp = " swpdm"
48 48
49PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr" 49PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr"
50PACKAGECONFIG[vpu] = "HAS_VPU=true,HAS_VPU=false,virtual/imxvpu" 50PACKAGECONFIG[vpu] = "HAS_VPU=true,HAS_VPU=false,virtual/imxvpu"