Freescale / meta-freescale

Layer containing NXP hardware support metadata
Other
172 stars 257 forks source link

Can not build "fsl-image-mfgtool-initramfs" image for "imx7d-pico" in Dunfell #601

Closed maximdeclercq closed 3 years ago

maximdeclercq commented 3 years ago

I'm not able to build the "fsl-image-mfgtool-initramfs" image for an "imx7d-pico" machine due to compatibility issues with "u-boot-imx-mfgtool". The MACHINEOVERRIDES variable does not seem to have to correct values ("armv7ve:use-mainline-bsp:armv7ve:use-mainline-bsp:imx7d-pico").

My manifest file can be found here.

The error occurs when I execute the following commands:

$ export MACHINE="imx7d-pico"
$ export BASEBOARD="pi"
$ export DISTRO="fslc-framebuffer"
$ source setup-environment "build"
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0

Your identity is: *** <***@***.***>
If you want to change this, please re-run 'repo init' with --config-name

repo has been initialized in /work
Fetching projects: 100% (9/9), done.

Welcome to Freescale Community BSP

The Yocto Project has extensive documentation about OE including a
reference manual which can be found at:
    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
    http://www.openembedded.org/

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    meta-toolchain
    meta-toolchain-sdk
    adt-installer
    meta-ide-support

Your configuration files at build have not been touched.
$ bitbake "fsl-image-mfgtool-initramfs"
Loading cache: 100% |###########################################################################################################################################################################################################################################################################################| Time: 0:00:00
Loaded 669 entries from dependency cache.
Parsing recipes: 100% |#########################################################################################################################################################################################################################################################################################| Time: 0:00:10
Parsing of 2173 .bb files complete (381 cached, 1792 parsed). 3269 targets, 473 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'u-boot-mfgtool' (but /work/sources/meta-freescale/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb DEPENDS on or otherwise requires it)
u-boot-imx-mfgtool PROVIDES u-boot-mfgtool but was skipped: incompatible with machine imx7d-pico (not in COMPATIBLE_MACHINE)
ERROR: Required build target 'fsl-image-mfgtool-initramfs' has no buildable providers.
Missing or unbuildable dependency chain was: ['fsl-image-mfgtool-initramfs', 'u-boot-mfgtool']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

This is the value of the MACHINEOVERRIDES variables.

$ bitbake -e | grep MACHINEOVERRIDES
#     "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
#   "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
# $MACHINEOVERRIDES [13 operations]
#     "PRISTINE_MACHINEOVERRIDES"
MACHINEOVERRIDES="armv7ve:use-mainline-bsp:imx7d-pico"
# $MACHINEOVERRIDES_EXTENDER_FILTER_OUT
MACHINEOVERRIDES_EXTENDER_FILTER_OUT="     imx         mx6     mx6q     mx6dl     mx6sx     mx6sl     mx6sll     mx6ul     mx6ull         mx7     mx7d     mx7ulp         mx8     mx8qm     mx8mm     mx8mn     mx8mp     mx8mq     mx8qxp "
# $MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp
MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp="     imx         mx6     mx6q     mx6dl     mx6sx     mx6sl     mx6sll     mx6ul     mx6ull         mx7     mx7d     mx7ulp         mx8     mx8qm     mx8mm     mx8mn     mx8mp     mx8mq     mx8qxp "
# $MACHINEOVERRIDES_EXTENDER_mx25
MACHINEOVERRIDES_EXTENDER_mx25="use-mainline-bsp"
# $MACHINEOVERRIDES_EXTENDER_mx6dl
MACHINEOVERRIDES_EXTENDER_mx6dl="imxfbdev:imxpxp:imxipu:imxvpu:imxgpu:imxgpu2d:imxgpu3d:imxepdc"
# $MACHINEOVERRIDES_EXTENDER_mx6q
MACHINEOVERRIDES_EXTENDER_mx6q="imxfbdev:imxipu:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
# $MACHINEOVERRIDES_EXTENDER_mx6sl
MACHINEOVERRIDES_EXTENDER_mx6sl="imxfbdev:imxpxp:imxgpu:imxgpu2d:imxepdc"
# $MACHINEOVERRIDES_EXTENDER_mx6sll
MACHINEOVERRIDES_EXTENDER_mx6sll="imxfbdev:imxpxp:imxepdc"
# $MACHINEOVERRIDES_EXTENDER_mx6sx
MACHINEOVERRIDES_EXTENDER_mx6sx="imxfbdev:imxpxp:imxgpu:imxgpu2d:imxgpu3d"
# $MACHINEOVERRIDES_EXTENDER_mx6ul
MACHINEOVERRIDES_EXTENDER_mx6ul="imxfbdev:imxpxp"
# $MACHINEOVERRIDES_EXTENDER_mx6ull
MACHINEOVERRIDES_EXTENDER_mx6ull="imxfbdev:imxpxp:imxepdc"
# $MACHINEOVERRIDES_EXTENDER_mx7d
MACHINEOVERRIDES_EXTENDER_mx7d="imxfbdev:imxpxp:imxepdc"
# $MACHINEOVERRIDES_EXTENDER_mx7ulp
MACHINEOVERRIDES_EXTENDER_mx7ulp="imxfbdev:imxpxp:imxgpu:imxgpu2d:imxgpu3d"
# $MACHINEOVERRIDES_EXTENDER_mx8mm
MACHINEOVERRIDES_EXTENDER_mx8mm="imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
# $MACHINEOVERRIDES_EXTENDER_mx8mn
MACHINEOVERRIDES_EXTENDER_mx8mn="imxdrm:imxgpu:imxgpu3d"
# $MACHINEOVERRIDES_EXTENDER_mx8mp
MACHINEOVERRIDES_EXTENDER_mx8mp="imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
# $MACHINEOVERRIDES_EXTENDER_mx8mq
MACHINEOVERRIDES_EXTENDER_mx8mq="imxdrm:imxvpu:imxgpu:imxgpu3d"
# $MACHINEOVERRIDES_EXTENDER_mx8qm
MACHINEOVERRIDES_EXTENDER_mx8qm="imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d"
# $MACHINEOVERRIDES_EXTENDER_mx8qxp
MACHINEOVERRIDES_EXTENDER_mx8qxp="imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d"
#     "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:forcevariable"
#   "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}${LIBCOVERRIDE}:forcevariable"
# $PRISTINE_MACHINEOVERRIDES [12 operations]
#   rename from MACHINEOVERRIDES machine-overrides-extender.bbclass:49 [machine_overrides_extender_handler]
PRISTINE_MACHINEOVERRIDES="armv7ve:imx:use-mainline-bsp:mx7:mx7d:imx7d-pico"
        compat_machines = (d.getVar('MACHINEOVERRIDES') or "").split(":")
    machine_overrides = (d.getVar('PRISTINE_MACHINEOVERRIDES') or '').split(':')
        machine_overrides_filter_out += (d.getVar('MACHINEOVERRIDES_EXTENDER_FILTER_OUT_%s' % override) or '').split()
        extender = d.getVar('MACHINEOVERRIDES_EXTENDER_%s' % override)
    d.renameVar("MACHINEOVERRIDES", "PRISTINE_MACHINEOVERRIDES")
    d.setVar("MACHINEOVERRIDES", "${@machine_overrides_extender(d)}")
zandrey commented 3 years ago

You're using Community distro fslc-framebuffer, which is not compatible with u-boot-imx-mfgtool.

What you can try to do is to switch on using NXP-based distro fsl-framebuffer instead (note the c is dropped inside the name). That should effectively set a compatibility for your machine to be able to pull u-boot-imx-mfgtool and build fsl-image-mfgtool-initramfs image.

But beware: in this case you're opting-in to use NXP version of BSP, and not Community one.

-- andrey

maximdeclercq commented 3 years ago

Thanks a lot. Are there any downsides/differences to using the NXP distro and is this documented somewhere?

maximdeclercq commented 3 years ago

Changing the distro to fsl-framebuffer still does not work, unfortunately.

Something along the dependency tree still requires u-boot-fslc.

Your build environment has been configured with:
    MACHINE = 'imx7d-pico'
    DISTRO = 'fsl-framebuffer'
    BASEBOARD = 'my-custom-board'

Building target 'my-custom-image'
Loading cache: 100% |###########################################################################################################################################################################################################################################################################################| Time: 0:00:00
Loaded 842 entries from dependency cache.
Parsing recipes: 100% |#########################################################################################################################################################################################################################################################################################| Time: 0:00:09
Parsing of 2175 .bb files complete (530 cached, 1645 parsed). 3271 targets, 457 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'u-boot-fslc' (but /work/sources/meta-freescale/recipes-fsl/packagegroups/packagegroup-fsl-mfgtool.bb RDEPENDS on or otherwise requires it)
u-boot-fslc was skipped: PREFERRED_PROVIDER_virtual/bootloader set to u-boot-imx, not u-boot-fslc
NOTE: Runtime target 'u-boot-fslc' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['u-boot-fslc']
NOTE: Runtime target 'packagegroup-fsl-mfgtool-extfs' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-fsl-mfgtool-extfs', 'u-boot-fslc']
ERROR: Required build target 'my-custom-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['my-custom-image', 'packagegroup-fsl-mfgtool-extfs', 'u-boot-fslc']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
error: Command 'bitbake my-custom-image' failed.

I tried overriding IMX_DEFAULT_BOOTLOADER and MACHINE_ESSENTIAL_EXTRA_RDEPENDS, but meta-freescale-3rdparty/conf/machine/imx7d-pico.conf seems to be included after my custom conf.

#layer.conf
...
BBFILE_PRIORITY_custom = "1"
...
include ${LAYERDIR}/conf/machine/${MACHINE}-extra.conf

machine/imx7d-pico-extra.conf

#machine/imx7d-pico-extra.conf
...
# Use NXP based u-boot
IMX_DEFAULT_BOOTLOADER = "u-boot-imx"
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\
    kernel-image \
    kernel-devicetree \
    u-boot-imx \
"

This is the output of bitbake -e

...
# $IMX_DEFAULT_BOOTLOADER [3 operations]
#   set /work/sources/meta-custom/conf/machine/imx7d-pico-extra.conf:13
#     "u-boot-imx"
#   set /work/sources/meta-freescale/conf/machine/include/imx-base.inc:9
#     "u-boot-fslc"
#   override[mx8]:set /work/sources/meta-freescale/conf/machine/include/imx-base.inc:10
#     "u-boot-imx"
# pre-expansion value:
#   "u-boot-fslc"
IMX_DEFAULT_BOOTLOADER="u-boot-fslc"
...
# $MACHINE_ESSENTIAL_EXTRA_RDEPENDS [4 operations]
#   set /work/sources/meta-custom/conf/machine/imx7d-pico-extra.conf:18
#     "    kernel-image     kernel-devicetree     u-boot-imx "
#   append /work/sources/meta-freescale-3rdparty/conf/machine/imx7d-pico.conf:41
#     "     kernel-image     kernel-devicetree     u-boot-fslc "
#   set /work/sources/core/meta/conf/documentation.conf:277
#     [doc] "A list of required machine-specific packages to install as part of the image being built. Because this is a 'machine essential' variable, the list of packages are essential for the machine to boot."
#   set? /work/sources/core/meta/conf/bitbake.conf:823
#     ""
# pre-expansion value:
#   "    kernel-image     kernel-devicetree     u-boot-imx       kernel-image     kernel-devicetree     u-boot-fslc "
MACHINE_ESSENTIAL_EXTRA_RDEPENDS="    kernel-image     kernel-devicetree     u-boot-imx       kernel-image     kernel-devicetree     u-boot-fslc "
...
#
# $PREFERRED_PROVIDER_nativesdk-u-boot-mkimage
#   set /work/sources/meta-freescale/conf/machine/include/imx-base.inc:29
#     [_defaultval] "nativesdk-${IMX_DEFAULT_BOOTLOADER}-tools"
PREFERRED_PROVIDER_nativesdk-u-boot-mkimage="nativesdk-u-boot-fslc-tools"
#
# $PREFERRED_PROVIDER_nativesdk-u-boot-tools
#   set /work/sources/meta-freescale/conf/machine/include/imx-base.inc:27
#     [_defaultval] "nativesdk-${IMX_DEFAULT_BOOTLOADER}-tools"
PREFERRED_PROVIDER_nativesdk-u-boot-tools="nativesdk-u-boot-fslc-tools"
...
#
# $PREFERRED_PROVIDER_u-boot-mkimage-native
#   set /work/sources/meta-freescale/conf/machine/include/imx-base.inc:28
#     [_defaultval] "${IMX_DEFAULT_BOOTLOADER}-tools-native"
PREFERRED_PROVIDER_u-boot-mkimage-native="u-boot-fslc-tools-native"
#
# $PREFERRED_PROVIDER_u-boot-mxsboot-native
#   set /work/sources/meta-freescale/conf/machine/include/imx-base.inc:32
#     [_defaultval] "u-boot-fslc-mxsboot-native"
PREFERRED_PROVIDER_u-boot-mxsboot-native="u-boot-fslc-mxsboot-native"
#
# $PREFERRED_PROVIDER_u-boot-tools-native
#   set /work/sources/meta-freescale/conf/machine/include/imx-base.inc:26
#     [_defaultval] "${IMX_DEFAULT_BOOTLOADER}-tools-native"
PREFERRED_PROVIDER_u-boot-tools-native="u-boot-fslc-tools-native"
...
otavio commented 3 years ago

I'd rather fix the U-Boot FSLC to support the mfgtool. The use-nxp-bsp is not necessarily referring to all NXP GA specific components but the Vivante GPU drivers and Linux fork.

maximdeclercq commented 3 years ago

Thanks for the clarification, I'll see if I'm able to fix the u-boot-fslc to support the mfgtool.

maximdeclercq commented 3 years ago

https://github.com/Freescale/meta-freescale/pull/627 allows the mfgtool to build with the fslc distros. I'll check if this produces a flashable image.

otavio commented 3 years ago

Fixed ... closing.