summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-mkimage/imx-boot_1.0.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-mkimage/imx-boot_1.0.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-mkimage/imx-boot_1.0.bb')
-rw-r--r--recipes-bsp/imx-mkimage/imx-boot_1.0.bb20
1 files changed, 10 insertions, 10 deletions
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
index b332e079..2b9d420b 100644
--- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
+++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
@@ -10,8 +10,8 @@ SECTION = "BSP"
10inherit use-imx-security-controller-firmware 10inherit use-imx-security-controller-firmware
11 11
12IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco" 12IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco"
13IMX_EXTRA_FIRMWARE:mx8m = "firmware-imx-8m" 13IMX_EXTRA_FIRMWARE:mx8m-nxp-bsp = "firmware-imx-8m"
14IMX_EXTRA_FIRMWARE:mx8x = "imx-sc-firmware imx-seco" 14IMX_EXTRA_FIRMWARE:mx8x-nxp-bsp = "imx-sc-firmware imx-seco"
15DEPENDS += " \ 15DEPENDS += " \
16 u-boot \ 16 u-boot \
17 ${IMX_EXTRA_FIRMWARE} \ 17 ${IMX_EXTRA_FIRMWARE} \
@@ -20,7 +20,7 @@ DEPENDS += " \
20" 20"
21# xxd is a dependency of fspi_packer.sh 21# xxd is a dependency of fspi_packer.sh
22DEPENDS += "xxd-native" 22DEPENDS += "xxd-native"
23DEPENDS:append:mx8m = " u-boot-mkimage-native dtc-native" 23DEPENDS:append:mx8m-nxp-bsp = " u-boot-mkimage-native dtc-native"
24BOOT_NAME = "imx-boot" 24BOOT_NAME = "imx-boot"
25PROVIDES = "${BOOT_NAME}" 25PROVIDES = "${BOOT_NAME}"
26 26
@@ -61,16 +61,16 @@ IMXBOOT_TARGETS ?= \
61 'flash_multi_cores flash_dcd', d), d)}" 61 'flash_multi_cores flash_dcd', d), d)}"
62 62
63BOOT_STAGING = "${S}/${IMX_BOOT_SOC_TARGET}" 63BOOT_STAGING = "${S}/${IMX_BOOT_SOC_TARGET}"
64BOOT_STAGING:mx8m = "${S}/iMX8M" 64BOOT_STAGING:mx8m-nxp-bsp = "${S}/iMX8M"
65BOOT_STAGING:mx8dx = "${S}/iMX8QX" 65BOOT_STAGING:mx8dx-nxp-bsp = "${S}/iMX8QX"
66 66
67SOC_FAMILY = "INVALID" 67SOC_FAMILY = "INVALID"
68SOC_FAMILY:mx8 = "mx8" 68SOC_FAMILY:mx8-nxp-bsp = "mx8"
69SOC_FAMILY:mx8m = "mx8m" 69SOC_FAMILY:mx8m-nxp-bsp = "mx8m"
70SOC_FAMILY:mx8x = "mx8x" 70SOC_FAMILY:mx8x-nxp-bsp = "mx8x"
71 71
72REV_OPTION ?= "" 72REV_OPTION ?= ""
73REV_OPTION:mx8qxp = \ 73REV_OPTION:mx8qxp-nxp-bsp = \
74 "${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', '', \ 74 "${@bb.utils.contains('MACHINE_FEATURES', 'soc-revb0', '', \
75 'REV=C0', d)}" 75 'REV=C0', d)}"
76 76
@@ -201,4 +201,4 @@ addtask deploy before do_build after do_compile
201PACKAGE_ARCH = "${MACHINE_ARCH}" 201PACKAGE_ARCH = "${MACHINE_ARCH}"
202FILES:${PN} = "/boot" 202FILES:${PN} = "/boot"
203 203
204COMPATIBLE_MACHINE = "(mx8)" 204COMPATIBLE_MACHINE = "(mx8-nxp-bsp)"