From baa6f9cb8f6cc8040fd1208836cf733535f2da55 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Fri, 29 Jul 2022 12:56:35 -0500 Subject: imx6qdlsabre*.conf: Fix UBOOT_CONFIG override for u-boot-imx-mfgtool Building u-boot-imx-mfgtool for i.MX 6 SABRE results in the following error: ``` ERROR: Nothing PROVIDES 'u-boot-imx-mfgtool' u-boot-imx-mfgtool was skipped: The selected UBOOT_CONFIG key ['mfgtool'] has no match in dict_keys(['sd-fslc', 'sd-imx', 'sd-optee-imx', 'sata-imx', 'mfgtool-imx']). ``` The UBOOT_CONFIG key for u-boot-imx-mfgtool is set as `mfgtool`, but the configuration for NXP BSP uses `mfgtool-imx` because there is not alignment between u-boot-imx and mainline on the machine to use for i.MX 6 SABRE boards. Changing the selected key to mfgtool-imx is difficult, so rework the original solution so the selection of the machine name is done in a separate variable and the keys can be kept simple without the `-imx` adornment. Signed-off-by: Tom Hochstein (cherry picked from commit d9148f97bc86264d633aa03731fd9ab16bed40c0) --- conf/machine/imx6qdlsabreauto.conf | 23 +++++++++++++---------- conf/machine/imx6qdlsabresd.conf | 17 ++++++++++------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/conf/machine/imx6qdlsabreauto.conf b/conf/machine/imx6qdlsabreauto.conf index a5ec1249..1bc78604 100644 --- a/conf/machine/imx6qdlsabreauto.conf +++ b/conf/machine/imx6qdlsabreauto.conf @@ -40,22 +40,25 @@ UBOOT_SUFFIX:pn-u-boot-fslc = "img" ### u-boot-imx settings ### SPL_BINARY:pn-u-boot-imx = "" UBOOT_CONFIG:pn-u-boot-imx ??= " \ - sd-imx \ - ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee-imx', '', d)} \ + sd \ + ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \ " UBOOT_MAKE_TARGET:pn-u-boot-imx = "u-boot.imx" UBOOT_SUFFIX:pn-u-boot-imx = "imx" +UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_MACHINE_NAME}_defconfig,sdcard" +UBOOT_CONFIG[sd-optee] = "${UBOOT_CONFIG_MACHINE_NAME}_optee_defconfig,sdcard" +UBOOT_CONFIG[eimnor] = "${UBOOT_CONFIG_MACHINE_NAME}_eimnor_defconfig" +UBOOT_CONFIG[nand] = "${UBOOT_CONFIG_MACHINE_NAME}_nand_defconfig,ubifs" +UBOOT_CONFIG[spinor] = "${UBOOT_CONFIG_MACHINE_NAME}_spinor_defconfig" +UBOOT_CONFIG[sata] = "${UBOOT_CONFIG_MACHINE_NAME}_sata_defconfig" +UBOOT_CONFIG[mfgtool] = "${UBOOT_CONFIG_MACHINE_NAME}_defconfig" + # The u-boot-imx does not provide unified functionality for DL/Q/QP SoC # variants. Change the defconfig to the targeted SoC variant. -UBOOT_CONFIG[sd-fslc] = "mx6sabreauto_defconfig,sdcard" -UBOOT_CONFIG[sd-imx] = "mx6qpsabreauto_defconfig,sdcard" -UBOOT_CONFIG[sd-optee-imx] = "mx6qpsabreauto_optee_defconfig,sdcard" -UBOOT_CONFIG[eimnor-imx] = "mx6qpsabreauto_eimnor_defconfig" -UBOOT_CONFIG[nand-imx] = "mx6qpsabreauto_nand_defconfig,ubifs" -UBOOT_CONFIG[spinor-imx] = "mx6qpsabreauto_spinor_defconfig" -UBOOT_CONFIG[sata-imx] = "mx6qpsabreauto_sata_defconfig" -UBOOT_CONFIG[mfgtool-imx] = "mx6qpsabreauto_defconfig" +UBOOT_CONFIG_MACHINE_NAME = "mx6sabreauto" +UBOOT_CONFIG_MACHINE_NAME:pn-u-boot-imx = "mx6qpsabreauto" +UBOOT_CONFIG_MACHINE_NAME:pn-u-boot-imx-mfgtool = "mx6qpsabreauto" WKS_FILE = " \ ${@bb.utils.contains('IMX_DEFAULT_BOOTLOADER', \ diff --git a/conf/machine/imx6qdlsabresd.conf b/conf/machine/imx6qdlsabresd.conf index 81d1c962..787a2006 100644 --- a/conf/machine/imx6qdlsabresd.conf +++ b/conf/machine/imx6qdlsabresd.conf @@ -49,19 +49,22 @@ UBOOT_SUFFIX:pn-u-boot-fslc = "img" ### u-boot-imx settings ### SPL_BINARY:pn-u-boot-imx = "" UBOOT_CONFIG:pn-u-boot-imx ??= " \ - sd-imx \ - ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee-imx', '', d)} \ + sd \ + ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'sd-optee', '', d)} \ " UBOOT_MAKE_TARGET:pn-u-boot-imx = "u-boot.imx" UBOOT_SUFFIX:pn-u-boot-imx = "imx" +UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_MACHINE_NAME}_defconfig,sdcard" +UBOOT_CONFIG[sd-optee] = "${UBOOT_CONFIG_MACHINE_NAME}_optee_defconfig,sdcard" +UBOOT_CONFIG[sata] = "${UBOOT_CONFIG_MACHINE_NAME}_sata_defconfig" +UBOOT_CONFIG[mfgtool] = "${UBOOT_CONFIG_MACHINE_NAME}_defconfig" + # The u-boot-imx does not provide unified functionality for DL/Q/QP SoC # variants. Change the defconfig to the targeted SoC variant. -UBOOT_CONFIG[sd-fslc] = "mx6sabresd_defconfig,sdcard" -UBOOT_CONFIG[sd-imx] = "mx6qsabresd_defconfig,sdcard" -UBOOT_CONFIG[sd-optee-imx] = "mx6qsabresd_optee_defconfig,sdcard" -UBOOT_CONFIG[sata-imx] = "mx6qsabresd_sata_defconfig" -UBOOT_CONFIG[mfgtool-imx] = "mx6qsabresd_defconfig" +UBOOT_CONFIG_MACHINE_NAME = "mx6sabresd" +UBOOT_CONFIG_MACHINE_NAME:pn-u-boot-imx = "mx6qsabresd" +UBOOT_CONFIG_MACHINE_NAME:pn-u-boot-imx-mfgtool = "mx6qsabresd" WKS_FILE = " \ ${@bb.utils.contains('IMX_DEFAULT_BOOTLOADER', \ -- cgit v1.2.3-54-g00ecf From daa53e8f2acf694b47ce8a6538e4fc2073db5247 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Fri, 29 Jul 2022 13:14:24 -0500 Subject: imx6qdlsabre*.conf: Fix u-boot-imx-mfgtool compile error Building u-boot-imx-mfgtool for i.MX 6 SABRE, NXP BSP, fails: ``` | cp: cannot stat '/.../tmp/work/imx6qdlsabresd-fsl-linux-gnueabi/u-boot-imx-mfgtool/2022.04-r0/build/mx6qsabresd_defconfig/u-boot.imx': No such file or directory ``` The failure is because the target `all` is being used. For NXP BSP, the correct target is `u-boot.imx`. Signed-off-by: Tom Hochstein (cherry picked from commit 4c5cd39ba8573e8956e00ff2d270487c88c276a2) --- conf/machine/imx6qdlsabreauto.conf | 2 ++ conf/machine/imx6qdlsabresd.conf | 2 ++ 2 files changed, 4 insertions(+) diff --git a/conf/machine/imx6qdlsabreauto.conf b/conf/machine/imx6qdlsabreauto.conf index 1bc78604..16a061e5 100644 --- a/conf/machine/imx6qdlsabreauto.conf +++ b/conf/machine/imx6qdlsabreauto.conf @@ -45,6 +45,8 @@ UBOOT_CONFIG:pn-u-boot-imx ??= " \ " UBOOT_MAKE_TARGET:pn-u-boot-imx = "u-boot.imx" UBOOT_SUFFIX:pn-u-boot-imx = "imx" +UBOOT_MAKE_TARGET:pn-u-boot-imx-mfgtool = "u-boot.imx" +UBOOT_SUFFIX:pn-u-boot-imx-mfgtool = "imx" UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_MACHINE_NAME}_defconfig,sdcard" UBOOT_CONFIG[sd-optee] = "${UBOOT_CONFIG_MACHINE_NAME}_optee_defconfig,sdcard" diff --git a/conf/machine/imx6qdlsabresd.conf b/conf/machine/imx6qdlsabresd.conf index 787a2006..62ad478e 100644 --- a/conf/machine/imx6qdlsabresd.conf +++ b/conf/machine/imx6qdlsabresd.conf @@ -54,6 +54,8 @@ UBOOT_CONFIG:pn-u-boot-imx ??= " \ " UBOOT_MAKE_TARGET:pn-u-boot-imx = "u-boot.imx" UBOOT_SUFFIX:pn-u-boot-imx = "imx" +UBOOT_MAKE_TARGET:pn-u-boot-imx-mfgtool = "u-boot.imx" +UBOOT_SUFFIX:pn-u-boot-imx-mfgtool = "imx" UBOOT_CONFIG[sd] = "${UBOOT_CONFIG_MACHINE_NAME}_defconfig,sdcard" UBOOT_CONFIG[sd-optee] = "${UBOOT_CONFIG_MACHINE_NAME}_optee_defconfig,sdcard" -- cgit v1.2.3-54-g00ecf