summaryrefslogtreecommitdiffstats
path: root/recipes-security
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-security
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-security')
-rw-r--r--recipes-security/optee-imx/optee-client_3.10.0.imx.bb2
-rw-r--r--recipes-security/optee-imx/optee-os_3.10.0.imx.bb18
-rw-r--r--recipes-security/optee-imx/optee-test_3.10.0.imx.bb2
3 files changed, 11 insertions, 11 deletions
diff --git a/recipes-security/optee-imx/optee-client_3.10.0.imx.bb b/recipes-security/optee-imx/optee-client_3.10.0.imx.bb
index 51c75bd1..2f5166d1 100644
--- a/recipes-security/optee-imx/optee-client_3.10.0.imx.bb
+++ b/recipes-security/optee-imx/optee-client_3.10.0.imx.bb
@@ -49,4 +49,4 @@ INSANE_SKIP:${PN} = "ldflags dev-elf"
49INSANE_SKIP:${PN}-dev = "ldflags dev-elf" 49INSANE_SKIP:${PN}-dev = "ldflags dev-elf"
50INSANE_SKIP:tee-supplicant = "ldflags" 50INSANE_SKIP:tee-supplicant = "ldflags"
51 51
52COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" 52COMPATIBLE_MACHINE = "(mx6-nxp-bsp|mx7-nxp-bsp|mx8-nxp-bsp)"
diff --git a/recipes-security/optee-imx/optee-os_3.10.0.imx.bb b/recipes-security/optee-imx/optee-os_3.10.0.imx.bb
index 9b91f25e..7164eadc 100644
--- a/recipes-security/optee-imx/optee-os_3.10.0.imx.bb
+++ b/recipes-security/optee-imx/optee-os_3.10.0.imx.bb
@@ -29,14 +29,14 @@ PLATFORM_FLAVOR:imx6ul7d = "mx6ulevk"
29PLATFORM_FLAVOR:imx6ull14x14evk = "mx6ullevk" 29PLATFORM_FLAVOR:imx6ull14x14evk = "mx6ullevk"
30PLATFORM_FLAVOR:imx6ull9x9evk = "mx6ullevk" 30PLATFORM_FLAVOR:imx6ull9x9evk = "mx6ullevk"
31PLATFORM_FLAVOR:imx6ulz-14x14-evk = "mx6ulzevk" 31PLATFORM_FLAVOR:imx6ulz-14x14-evk = "mx6ulzevk"
32PLATFORM_FLAVOR:mx8mq = "mx8mqevk" 32PLATFORM_FLAVOR:mx8mq-nxp-bsp = "mx8mqevk"
33PLATFORM_FLAVOR:mx8mm = "mx8mmevk" 33PLATFORM_FLAVOR:mx8mm-nxp-bsp = "mx8mmevk"
34PLATFORM_FLAVOR:mx8mn = "mx8mnevk" 34PLATFORM_FLAVOR:mx8mn-nxp-bsp = "mx8mnevk"
35PLATFORM_FLAVOR:mx8mp = "mx8mpevk" 35PLATFORM_FLAVOR:mx8mp-nxp-bsp = "mx8mpevk"
36PLATFORM_FLAVOR:mx8qm = "mx8qmmek" 36PLATFORM_FLAVOR:mx8qm-nxp-bsp = "mx8qmmek"
37PLATFORM_FLAVOR:mx8qxp = "mx8qxpmek" 37PLATFORM_FLAVOR:mx8qxp-nxp-bsp = "mx8qxpmek"
38PLATFORM_FLAVOR:mx8dx = "mx8dxmek" 38PLATFORM_FLAVOR:mx8dx-nxp-bsp = "mx8dxmek"
39PLATFORM_FLAVOR:mx8dxl = "mx8dxlevk" 39PLATFORM_FLAVOR:mx8dxl-nxp-bsp = "mx8dxlevk"
40 40
41OPTEE_ARCH ?= "arm32" 41OPTEE_ARCH ?= "arm32"
42OPTEE_ARCH:armv7a = "arm32" 42OPTEE_ARCH:armv7a = "arm32"
@@ -93,4 +93,4 @@ FILES:${PN}-staticdev = "/usr/include/optee/"
93RDEPENDS:${PN}-dev += "${PN}-staticdev" 93RDEPENDS:${PN}-dev += "${PN}-staticdev"
94 94
95PACKAGE_ARCH = "${MACHINE_ARCH}" 95PACKAGE_ARCH = "${MACHINE_ARCH}"
96COMPATIBLE_MACHINE = "(imx|imx-boot-container)" 96COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-security/optee-imx/optee-test_3.10.0.imx.bb b/recipes-security/optee-imx/optee-test_3.10.0.imx.bb
index 26339d61..ef540bbc 100644
--- a/recipes-security/optee-imx/optee-test_3.10.0.imx.bb
+++ b/recipes-security/optee-imx/optee-test_3.10.0.imx.bb
@@ -60,4 +60,4 @@ do_install () {
60 60
61FILES:${PN} = "/usr/bin/ /lib*/optee_armtz/" 61FILES:${PN} = "/usr/bin/ /lib*/optee_armtz/"
62 62
63COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" 63COMPATIBLE_MACHINE = "(mx6-nxp-bsp|mx7-nxp-bsp|mx8-nxp-bsp)"