From 1652e927cc996be3ab4676792fd67b93ed3576dd Mon Sep 17 00:00:00 2001 From: Joao Marcos Costa Date: Wed, 27 Dec 2023 16:50:15 +0100 Subject: [PATCH 1/4] imx-base.inc: fix KERNEL_IMAGETYPE's override Using 'aarch64', as if the KERNEL_IMAGETYPE was conditioned to the userspace's architecture, will cause the wrong image type to be built in a multilib context (e.g., for a 32-bit userspace). This happens because 'aarch64' will not be listed in OVERRIDES, and the error below will come up during do_image_wic task: output: install: cannot stat '...build/tmp-glibc/deploy/images/microej-imx93/zImage': No such file or directory Replace 'aarch64' by mx*-generic-bsp, for both imx8 and imx9, as these two are aarch64 platforms. Signed-off-by: Joao Marcos Costa --- conf/machine/include/imx-base.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index 71c2aa805..daf2ce39d 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -665,7 +665,8 @@ SERIAL_CONSOLES = "115200;ttymxc0" SERIAL_CONSOLES:mxs-generic-bsp = "115200;ttyAMA0" KERNEL_IMAGETYPE = "zImage" -KERNEL_IMAGETYPE:aarch64 = "Image" +KERNEL_IMAGETYPE:mx8-generic-bsp = "Image" +KERNEL_IMAGETYPE:mx9-generic-bsp = "Image" MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen screen" From 78fe73c29b9559d9eae317ff2c1a468bcf884cb6 Mon Sep 17 00:00:00 2001 From: Joao Marcos Costa Date: Wed, 27 Dec 2023 17:05:45 +0100 Subject: [PATCH 2/4] imx-base.inc: fix OPTEE_BOOT_IMAGE's override Using 'aarch64', as if the OPTEE_BOOT_IMAGE was conditioned to the userspace's architecture, will include uTee-${OPTEE_BIN_EXT} in a multilib context (e.g., for a 32-bit userspace). This happens because 'aarch64' will not be listed in OVERRIDES, and the error below will come up during do_image_wic task: output: install: cannot stat '...build/tmp-glibc/deploy/images/microej-imx93/uTee-': No such file or directory Replace 'aarch64' by mx*-generic-bsp, for both imx8 and imx9, as these two are aarch64 platforms. Signed-off-by: Joao Marcos Costa --- conf/machine/include/imx-base.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index daf2ce39d..17d3f7711 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -617,7 +617,8 @@ WIC_CREATE_EXTRA_ARGS ?= "--no-fstab-update" OPTEE_BIN_EXT ??= "" OPTEE_BOOT_IMAGE = "tee.bin uTee-${OPTEE_BIN_EXT}" -OPTEE_BOOT_IMAGE:aarch64 = "tee.bin" +OPTEE_BOOT_IMAGE:mx8-generic-bsp = "tee.bin" +OPTEE_BOOT_IMAGE:mx9-generic-bsp = "tee.bin" IMAGE_FSTYPES ?= "${SOC_DEFAULT_IMAGE_FSTYPES}" From 65ec98511e52f60ddf868a206536893dbe5f2839 Mon Sep 17 00:00:00 2001 From: Joao Marcos Costa Date: Wed, 27 Dec 2023 17:24:41 +0100 Subject: [PATCH 3/4] imx-base.inc: fix WKS_FILE_DEPENDS's override Using 'aarch64', as if the WKS_FILE_DEPENDS was conditioned to the userspace's architecture, will not include imx-boot in a multilib context (e.g., for a 32-bit userspace). This happens because 'aarch64' will not be listed in OVERRIDES, and the error below will come up during do_image_wic task: wic.filemap.Error: cannot open image file '.../build/tmp-glibc/deploy/images/microej-imx93/imx-boot': [Errno 2] No such file or directory Replace 'aarch64' by mx*-generic-bsp, for both imx8 and imx9, as these two are aarch64 platforms. Signed-off-by: Joao Marcos Costa --- conf/machine/include/imx-base.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index 17d3f7711..ad74a2eaa 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -651,7 +651,10 @@ WKS_FILE_DEPENDS ?= " \ # # NOTE: the results binary name of the boot container is set to 'imx-boot' # for both NXP and Mainline BSP. -WKS_FILE_DEPENDS:append:imx-generic-bsp:aarch64 = " \ +WKS_FILE_DEPENDS:append:imx-generic-bsp:mx8-generic-bsp = " \ + ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '0', 'imx-boot', '')} \ +" +WKS_FILE_DEPENDS:append:imx-generic-bsp:mx9-generic-bsp = " \ ${@oe.utils.ifelse(d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '0', 'imx-boot', '')} \ " From 6579ce9b77f0036454478b2e07694f7314f97867 Mon Sep 17 00:00:00 2001 From: Joao Marcos Costa Date: Wed, 27 Dec 2023 17:28:24 +0100 Subject: [PATCH 4/4] fsl-dynamic-packagearch: fix MACHINE_SOCARCH definition The sstate manifest for populate_sysroot was not being named properly for firmware-sentinel and imx-boot-firmware-files, raising the following error: The sstate manifest for task 'firmware-sentinel:populate_sysroot' (multilib variant '') could not be found. The pkgarchs considered were: microej_imx93, armv7ahf-neon-vfpv4-mx93, armv7ahf-neon-mx93, (and so on...) But none of these manifests exists: ...build/tmp-glibc/sstate-control/manifest-microej_imx93-imx-boot-firmware-files.populate_sysroot ...build/tmp-glibc/sstate-control/manifest-armv7ahf-neon-vfpv4-mx93-imx-boot-firmware-files.populate_sysroot ... and so on. All the other packages were suffixed with TUNE_PKGARCH only, so I couldn't see the reason why only some specific packages from meta-freescale were using that. Remove MACHINE_SOCARCH_SUFFIX so as the sstate manifest is compatible with what's expected in populate_sysroot. Signed-off-by: Joao Marcos Costa --- classes/fsl-dynamic-packagearch.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/fsl-dynamic-packagearch.bbclass b/classes/fsl-dynamic-packagearch.bbclass index 6cb0c0a9f..a4817e8da 100644 --- a/classes/fsl-dynamic-packagearch.bbclass +++ b/classes/fsl-dynamic-packagearch.bbclass @@ -74,7 +74,7 @@ python __anonymous () { d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % d.getVar("THUMB_EXTRA_SOCARCH")) } -MACHINE_SOCARCH = "${TUNE_PKGARCH}${MACHINE_SOCARCH_SUFFIX}" +MACHINE_SOCARCH = "${TUNE_PKGARCH}" ARM_EXTRA_SOCARCH = "${ARMPKGARCH}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}${MACHINE_SOCARCH_SUFFIX}" THUMB_EXTRA_SOCARCH = "${ARMPKGARCH}${ARM_THUMB_SUFFIX}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}${MACHINE_SOCARCH_SUFFIX}"