summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot
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/u-boot
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/u-boot')
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb2
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc_2022.01.bb4
-rw-r--r--recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb4
-rw-r--r--recipes-bsp/u-boot/u-boot-imx_2021.04.bb12
4 files changed, 11 insertions, 11 deletions
diff --git a/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb b/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb
index a3a732ef..07f2c969 100644
--- a/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb
+++ b/recipes-bsp/u-boot/u-boot-fslc-mxsboot_2022.01.bb
@@ -27,6 +27,6 @@ do_install () {
27 ln -sf uboot-mxsboot ${D}${bindir}/mxsboot 27 ln -sf uboot-mxsboot ${D}${bindir}/mxsboot
28} 28}
29 29
30COMPATIBLE_MACHINE:class-target = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" 30COMPATIBLE_MACHINE:class-target = "(mxs-generic-bsp|mx5-generic-bsp|mx6-nxp-bsp|mx7-nxp-bsp|vf-generic-bsp|use-mainline-bsp)"
31 31
32BBCLASSEXTEND = "native nativesdk" 32BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-bsp/u-boot/u-boot-fslc_2022.01.bb b/recipes-bsp/u-boot/u-boot-fslc_2022.01.bb
index 21989ae5..6f9a251b 100644
--- a/recipes-bsp/u-boot/u-boot-fslc_2022.01.bb
+++ b/recipes-bsp/u-boot/u-boot-fslc_2022.01.bb
@@ -12,7 +12,7 @@ DEPENDS += "bc-native dtc-native python3-setuptools-native lzop-native"
12 12
13# Location known to imx-boot component, where U-Boot artifacts 13# Location known to imx-boot component, where U-Boot artifacts
14# should be additionally deployed. 14# should be additionally deployed.
15# See below note above do_deploy:append:mx8m for the purpose of 15# See below note above do_deploy:append:mx8m-nxp-bsp for the purpose of
16# this delopyment location 16# this delopyment location
17BOOT_TOOLS = "imx-boot-tools" 17BOOT_TOOLS = "imx-boot-tools"
18 18
@@ -28,4 +28,4 @@ EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CPPFLAGS}" \
28 HOSTSTRIP=true' 28 HOSTSTRIP=true'
29 29
30PACKAGE_ARCH = "${MACHINE_ARCH}" 30PACKAGE_ARCH = "${MACHINE_ARCH}"
31COMPATIBLE_MACHINE = "(mxs|mx5|mx6|mx7|vf|use-mainline-bsp)" 31COMPATIBLE_MACHINE = "(mxs-generic-bsp|mx5-generic-bsp|mx6-nxp-bsp|mx7-nxp-bsp|vf-generic-bsp|use-mainline-bsp)"
diff --git a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb
index 5443ceac..500b2de0 100644
--- a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb
+++ b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2021.04.bb
@@ -8,5 +8,5 @@ require u-boot-imx_${PV}.bb
8require u-boot-mfgtool.inc 8require u-boot-mfgtool.inc
9 9
10UUU_BOOTLOADER_TAGGED = "" 10UUU_BOOTLOADER_TAGGED = ""
11UUU_BOOTLOADER_TAGGED:mx6 = "u-boot-mfgtool-tagged.${UBOOT_SUFFIX}" 11UUU_BOOTLOADER_TAGGED:mx6-nxp-bsp = "u-boot-mfgtool-tagged.${UBOOT_SUFFIX}"
12UUU_BOOTLOADER_TAGGED:mx7 = "u-boot-mfgtool-tagged.${UBOOT_SUFFIX}" 12UUU_BOOTLOADER_TAGGED:mx7-nxp-bsp = "u-boot-mfgtool-tagged.${UBOOT_SUFFIX}"
diff --git a/recipes-bsp/u-boot/u-boot-imx_2021.04.bb b/recipes-bsp/u-boot/u-boot-imx_2021.04.bb
index 96552eef..8d790db8 100644
--- a/recipes-bsp/u-boot/u-boot-imx_2021.04.bb
+++ b/recipes-bsp/u-boot/u-boot-imx_2021.04.bb
@@ -10,13 +10,13 @@ PROVIDES += "u-boot"
10inherit uuu_bootloader_tag 10inherit uuu_bootloader_tag
11 11
12UUU_BOOTLOADER = "" 12UUU_BOOTLOADER = ""
13UUU_BOOTLOADER:mx6 = "${UBOOT_BINARY}" 13UUU_BOOTLOADER:mx6-nxp-bsp = "${UBOOT_BINARY}"
14UUU_BOOTLOADER:mx7 = "${UBOOT_BINARY}" 14UUU_BOOTLOADER:mx7-nxp-bsp = "${UBOOT_BINARY}"
15UUU_BOOTLOADER_TAGGED = "" 15UUU_BOOTLOADER_TAGGED = ""
16UUU_BOOTLOADER_TAGGED:mx6 = "u-boot-tagged.${UBOOT_SUFFIX}" 16UUU_BOOTLOADER_TAGGED:mx6-nxp-bsp = "u-boot-tagged.${UBOOT_SUFFIX}"
17UUU_BOOTLOADER_TAGGED:mx7 = "u-boot-tagged.${UBOOT_SUFFIX}" 17UUU_BOOTLOADER_TAGGED:mx7-nxp-bsp = "u-boot-tagged.${UBOOT_SUFFIX}"
18 18
19do_deploy:append:mx8m() { 19do_deploy:append:mx8m-nxp-bsp() {
20 # Deploy u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary 20 # Deploy u-boot-nodtb.bin and fsl-imx8m*-XX.dtb for mkimage to generate boot binary
21 if [ -n "${UBOOT_CONFIG}" ] 21 if [ -n "${UBOOT_CONFIG}" ]
22 then 22 then
@@ -38,4 +38,4 @@ do_deploy:append:mx8m() {
38} 38}
39 39
40PACKAGE_ARCH = "${MACHINE_ARCH}" 40PACKAGE_ARCH = "${MACHINE_ARCH}"
41COMPATIBLE_MACHINE = "(mx6|mx7|mx8|use-mainline-bsp)" 41COMPATIBLE_MACHINE = "(mx6-nxp-bsp|mx7-nxp-bsp|mx8-nxp-bsp|use-mainline-bsp)"