Dependency loop when enabling secure boot with an initramfs

Hello,

I’m building an image using Yocto Dunfell and the meta-mender-core layer on an Toradex Colibri iMX6 ULL. My system uses an initramfs image (which is a clone of core-image-minimal-initramfs but without initramfs-module-install and initramfs-module-install-efi). With signing disabled (UBOOT_SIGN_ENABLED=“0”) the build runs successfully. However, as soon as signing is enabled, I get a dependency loop, the output of which can be seen at the bottom of this message. If I remove the meta-mender layer, the dependency is resolved and the build is able to progress.

I noticed that another thread also reported a similar issue. However, the solution mentioned in that thread hasn’t resolved my issue.

EXTRA_IMAGEDEPENDS_remove = "u-boot"

The output of bitbake -e for the initramfs image recipe can be found here: https://pastebin.pl/view/5057d89a.

Any thoughts on how to resolve this?

Dependency loop #1 found:
  Task meta-precept/recipes-images/images/idh-os-initramfs-image.bb:do_image (dependent Tasks ['idh-os-initramfs-image.bb:do_rootfs', 'idh-os-initramfs-image.bb:do_image_qa'])
  Task meta-precept/recipes-images/images/idh-os-initramfs-image.bb:do_image_cpio (dependent Tasks ['idh-os-initramfs-image.bb:do_image', 'cpio_2.13.bb:do_populate_sysroot'])
  Task meta-precept/recipes-images/images/idh-os-initramfs-image.bb:do_image_complete (dependent Tasks ['idh-os-initramfs-image.bb:do_image', 'idh-os-initramfs-image.bb:do_image_cpio'])
  Task meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb:do_bundle_initramfs (dependent Tasks ['linux-toradex_5.4-2.1.x.bb:do_install', 'idh-os-initramfs-image.bb:do_image_complete'])
  Task meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb:do_assemble_fitimage_initramfs (dependent Tasks ['linux-toradex_5.4-2.1.x.bb:do_bundle_initramfs', 'idh-os-initramfs-image.bb:do_image_complete'])
  Task meta-toradex-nxp/recipes-kernel/linux/linux-toradex_5.4-2.1.x.bb:do_deploy (dependent Tasks ['linux-toradex_5.4-2.1.x.bb:do_packagedata', 'linux-toradex_5.4-2.1.x.bb:do_bundle_initramfs', 'linux-toradex_5.4-2.1.x.bb:do_populate_sysroot', 'depmodwrapper-cross_1.0.bb:do_populate_sysroot', 'linux-toradex_5.4-2.1.x.bb:do_assemble_fitimage_initramfs'])
  Task meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex_2020.07.bb:do_deploy (dependent Tasks ['u-boot-toradex_2020.07.bb:do_create_extlinux_config', 'linux-toradex_5.4-2.1.x.bb:do_deploy', 'u-boot-toradex_2020.07.bb:do_compile'])
  Task meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex_2020.07.bb:do_package (dependent Tasks ['gcc-runtime_9.3.bb:do_packagedata', 'u-boot-toradex_2020.07.bb:do_install', 'u-boot-toradex_2020.07.bb:do_deploy', 'pseudo_git.bb:do_populate_sysroot', 'rpm_4.14.2.1.bb:do_populate_sysroot', 'dwarfsrcfiles.bb:do_populate_sysroot', 'glibc_2.31.bb:do_packagedata'])
  Task meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex_2020.07.bb:do_package_qa (dependent Tasks ['u-boot-toradex_2020.07.bb:do_packagedata', 'pseudo_git.bb:do_populate_sysroot', 'u-boot-toradex_2020.07.bb:do_package', 'binutils-cross_2.34.bb:do_populate_sysroot'])
  Task meta-precept/recipes-images/images/idh-os-initramfs-image.bb:do_rootfs (dependent Tasks ['expat_2.2.9.bb:do_package_write_ipk', 'bash-completion_2.10.bb:do_package_write_ipk', 'xorgproto_2019.2.bb:do_packagedata', 'shadow-securetty_4.6.bb:do_package_qa', 'sqlite3_3.31.1.bb:do_populate_lic', 'opkg-utils_0.4.2.bb:do_package_write_ipk', 'mklibs-native_0.1.44.bb:do_populate_lic', 'udev-extraconf_1.1.bb:do_package_qa', 'db_5.3.28.bb:do_populate_lic', 'initramfs-framework_1.0.bb:do_packagedata', 'util-linux_2.35.1.bb:do_packagedata', 'systemd-serialgetty.bb:do_package_qa', 'unifdef_2.12.bb:do_populate_lic', 'acl_2.2.53.bb:do_packagedata', 'kern-tools-native_git.bb:do_populate_lic', 'automake_1.16.1.bb:do_populate_lic', 'busybox_1.31.1.bb:do_package_qa', 'u-boot-toradex_2020.07.bb:do_package_qa', 'python3_3.8.2.bb:do_populate_lic', 'bzip2_1.0.8.bb:do_packagedata', 'xorgproto_2019.2.bb:do_populate_lic', 'libffi_3.3.bb:do_package_qa', 'm4_1.4.18.bb:do_package_qa', 'ncurses_6.2.bb:do_populate_lic', 'zlib_1.2.11.bb:do_packagedata', 'libxkbcommon_0.10.0.bb:do_packagedata', 'sqlite3_3.31.1.bb:do_populate_lic', 'run-postinsts_1.0.bb:do_package_qa', 'sqlite3_3.31.1.bb:do_packagedata', 'libxdmcp_1.1.3.bb:do_package_qa', 'libtirpc_1.2.6.bb:do_populate_lic', 'bash_5.0.bb:do_populate_lic', 'gdbm_1.18.1.bb:do_package_write_ipk', 'xz_5.2.4.bb:do_package_write_ipk', 'ninja_1.10.0.bb:do_populate_lic', 'xorgproto_2019.2.bb:do_package_qa', 'initramfs-module-setup-live_1.0.bb:do_package_qa', 'xcb-proto_1.13.bb:do_populate_lic', 'rpm_4.14.2.1.bb:do_populate_lic', 'libxau_1.0.9.bb:do_populate_lic', 'gmp_6.2.0.bb:do_package_write_ipk', 'sqlite3_3.31.1.bb:do_package_qa', 'systemd-conf_244.3.bb:do_package_qa', 'libxau_1.0.9.bb:do_package_write_ipk', 'base-passwd_3.5.29.bb:do_packagedata', 'volatile-binds.bb:do_package_qa', 'make_4.3.bb:do_populate_lic', 'systemd-serialgetty.bb:do_populate_lic', 'u-boot-toradex_2020.07.bb:do_package_write_ipk', 'libx11_1.6.9.bb:do_packagedata', 'initramfs-module-setup-live_1.0.bb:do_populate_lic', 'libnsl2_git.bb:do_package_write_ipk', 'kbd_2.2.0.bb:do_package_write_ipk', 'udev-extraconf_1.1.bb:do_package_write_ipk', 'u-boot-tools_2020.01.bb:do_populate_lic', 'wayland_1.18.0.bb:do_populate_lic', 'acl_2.2.53.bb:do_package_qa', 'autoconf-archive_2019.01.06.bb:do_packagedata', 'dbus_1.12.16.bb:do_package_write_ipk', 'libsm_1.2.3.bb:do_populate_lic', 'libxslt_1.1.34.bb:do_populate_lic', 'libxcrypt_4.4.15.bb:do_package_write_ipk', 'ncurses_6.2.bb:do_populate_lic', 'ncurses_6.2.bb:do_package_qa', 'bc_1.07.1.bb:do_populate_lic', 'libpam_1.3.1.bb:do_package_write_ipk', 'dbus_1.12.16.bb:do_populate_lic', 'prelink_git.bb:do_populate_sysroot', 'e2fsprogs_1.45.4.bb:do_package_write_ipk', 'cracklib_2.9.5.bb:do_package_qa', 'initramfs-framework_1.0.bb:do_populate_lic', 'dbus_1.12.16.bb:do_populate_lic', 'pseudo_git.bb:do_populate_sysroot', 'autoconf-archive_2019.01.06.bb:do_package_write_ipk', 'kmod_git.bb:do_populate_lic', 'kmod_git.bb:do_package_qa', 'gawk_5.0.1.bb:do_populate_lic', 'ca-certificates_20190110.bb:do_populate_lic', 'e2fsprogs_1.45.4.bb:do_populate_lic', 'systemd_244.3.bb:do_packagedata', 'acl_2.2.53.bb:do_populate_lic', 'cracklib_2.9.5.bb:do_packagedata', 'ldconfig-native_2.12.1.bb:do_populate_sysroot', 'libnsl2_git.bb:do_packagedata', 'libpcre2_10.34.bb:do_populate_lic', 'elfutils_0.178.bb:do_populate_lic', 'libcap_2.32.bb:do_package_qa', 'libxml2_2.9.10.bb:do_package_write_ipk', 'findutils_4.7.0.bb:do_package_write_ipk', 'acl_2.2.53.bb:do_populate_lic', 'os-release.bb:do_package_write_ipk', 'rsync_3.1.3.bb:do_populate_lic', 'perl_5.30.1.bb:do_populate_lic', 'ca-certificates_20190110.bb:do_package_qa', 'wayland-protocols_1.18.imx.bb:do_packagedata', 'popt_1.16.bb:do_populate_lic', 'busybox_1.31.1.bb:do_populate_lic', 'volatile-binds.bb:do_package_write_ipk', 'libx11_1.6.9.bb:do_package_qa', 'initramfs-framework_1.0.bb:do_package_qa', 'util-macros_1.19.2.bb:do_packagedata', 'glibc_2.31.bb:do_package_write_ipk', 'bash-completion_2.10.bb:do_package_qa', 'openssl_1.1.1g.bb:do_packagedata', 'libnsl2_git.bb:do_package_qa', 'wayland-protocols_1.18.imx.bb:do_package_qa', 'u-boot-toradex_2020.07.bb:do_populate_lic', 'systemd_244.3.bb:do_package_write_ipk', 'libgcc-initial_9.3.bb:do_populate_lic', 'shadow_4.8.1.bb:do_package_qa', 'xcb-proto_1.13.bb:do_package_write_ipk', 'linux-libc-headers_5.4.bb:do_packagedata', 'lzo_2.10.bb:do_populate_lic', 'depmodwrapper-cross_1.0.bb:do_populate_lic', 'gettext_0.20.1.bb:do_populate_lic', 'shadow-securetty_4.6.bb:do_packagedata', 'coreutils_8.31.bb:do_package_qa', 'kbd_2.2.0.bb:do_packagedata', 'swig_3.0.12.bb:do_populate_lic', 'xkeyboard-config_2.28.bb:do_packagedata', 'gmp_6.2.0.bb:do_packagedata', 'e2fsprogs_1.45.4.bb:do_package_qa', 'libgcc_9.3.bb:do_populate_lic', 'initramfs-module-setup-live_1.0.bb:do_package_write_ipk', 'zlib_1.2.11.bb:do_package_write_ipk', 'gawk_5.0.1.bb:do_packagedata', 'shadow_4.8.1.bb:do_populate_lic', 'opkg-utils_0.4.2.bb:do_package_qa', 'libxcb_1.13.1.bb:do_package_qa', 'libxkbcommon_0.10.0.bb:do_package_write_ipk', 'ca-certificates_20190110.bb:do_packagedata', 'initramfs-framework_1.0.bb:do_package_write_ipk', 'linux-toradex_5.4-2.1.x.bb:do_package_write_ipk', 'cracklib_2.9.5.bb:do_populate_lic', 'cracklib_2.9.5.bb:do_populate_lic', 'update-rc.d_0.8.bb:do_package_write_ipk', 'gdbm_1.18.1.bb:do_populate_lic', 'libxdmcp_1.1.3.bb:do_populate_lic', 'm4-native_1.4.18.bb:do_populate_lic', 'libxml2_2.9.10.bb:do_populate_lic', 'autoconf_2.69.bb:do_populate_lic', 'libcap-ng_0.7.10.bb:do_populate_lic', 'libtirpc_1.2.6.bb:do_package_qa', 'openssl_1.1.1g.bb:do_populate_lic', 'util-linux_2.35.1.bb:do_populate_lic', 'xorgproto_2019.2.bb:do_package_write_ipk', 'libtirpc_1.2.6.bb:do_packagedata', 'util-linux_2.35.1.bb:do_populate_lic', 'shadow-securetty_4.6.bb:do_package_write_ipk', 'gnu-config_git.bb:do_populate_lic', 'lzop_1.04.bb:do_populate_lic', 'readline_8.0.bb:do_packagedata', 'busybox_1.31.1.bb:do_packagedata', 'm4_1.4.18.bb:do_package_write_ipk', 'systemd-compat-units.bb:do_populate_lic', 'libmpc_1.1.0.bb:do_populate_lic', 'libice_1.0.10.bb:do_package_qa', 'libsm_1.2.3.bb:do_package_write_ipk', 'zlib_1.2.11.bb:do_populate_lic', 'findutils_4.7.0.bb:do_populate_lic', 'wayland_1.18.0.bb:do_packagedata', 'm4_1.4.18.bb:do_populate_lic', 'attr_2.4.48.bb:do_packagedata', 'flex_2.6.4.bb:do_package_write_ipk', 'pseudo_git.bb:do_populate_lic', 'libnsl2_git.bb:do_populate_lic', 'xcb-proto_1.13.bb:do_packagedata', 'libxml2_2.9.10.bb:do_package_qa', 'libnsl2_git.bb:do_populate_lic', 'readline_8.0.bb:do_populate_lic', 'bzip2_1.0.8.bb:do_package_qa', 'bash-completion_2.10.bb:do_populate_lic', 'volatile-binds.bb:do_packagedata', 'volatile-binds.bb:do_populate_lic', 'flex_2.6.4.bb:do_populate_lic', 'zlib_1.2.11.bb:do_populate_lic', 'linux-toradex_5.4-2.1.x.bb:do_populate_lic', 'libsm_1.2.3.bb:do_package_qa', 'flex_2.6.4.bb:do_package_qa', 'prelink_git.bb:do_populate_lic', 'e2fsprogs_1.45.4.bb:do_packagedata', 'kmod_git.bb:do_package_write_ipk', 'attr_2.4.48.bb:do_package_write_ipk', 'attr_2.4.48.bb:do_populate_lic', 'bash_5.0.bb:do_package_qa', 'dbus_1.12.16.bb:do_package_qa', 'gawk_5.0.1.bb:do_package_write_ipk', 'systemd-conf_244.3.bb:do_package_write_ipk', 'sqlite3_3.31.1.bb:do_package_write_ipk', 'ncurses_6.2.bb:do_packagedata', 'shadow_4.8.1.bb:do_populate_lic', 'python3_3.8.2.bb:do_package_write_ipk', 'bzip2_1.0.8.bb:do_package_write_ipk', 'libxkbcommon_0.10.0.bb:do_package_qa', 'run-postinsts_1.0.bb:do_populate_lic', 'idh-os-initramfs-image.bb:do_packagedata', 'libgcc_9.3.bb:do_package_qa', 'gawk_5.0.1.bb:do_package_qa', 'autoconf-archive_2019.01.06.bb:do_populate_lic', 'udev-extraconf_1.1.bb:do_populate_lic', 'attr_2.4.48.bb:do_populate_lic', 'glibc_2.31.bb:do_packagedata', 'libx11_1.6.9.bb:do_populate_lic', 'libcap_2.32.bb:do_populate_lic', 'libxau_1.0.9.bb:do_packagedata', 'mpfr_4.0.2.bb:do_populate_lic', 'xz_5.2.4.bb:do_packagedata', 'zlib_1.2.11.bb:do_package_qa', 'libtool-native_2.4.6.bb:do_populate_lic', 'coreutils_8.31.bb:do_package_write_ipk', 'opkg-utils_0.4.2.bb:do_populate_lic', 'update-rc.d_0.8.bb:do_packagedata', 'wayland-protocols_1.18.imx.bb:do_populate_lic', 'gdbm_1.18.1.bb:do_package_qa', 'systemd-serialgetty.bb:do_packagedata', 'binutils-cross_2.34.bb:do_populate_lic', 'kbd_2.2.0.bb:do_populate_lic', 'libpam_1.3.1.bb:do_populate_lic', 'patch_2.7.6.bb:do_populate_lic', 'coreutils_8.31.bb:do_populate_lic', 'mklibs-native_0.1.44.bb:do_populate_sysroot', 'readline_8.0.bb:do_package_qa', 'xcb-proto_1.13.bb:do_package_qa', 'libxcrypt_4.4.15.bb:do_package_qa', 'xz_5.2.4.bb:do_populate_lic', 'shadow-securetty_4.6.bb:do_populate_lic', 'findutils_4.7.0.bb:do_package_qa', 'linux-libc-headers_5.4.bb:do_package_qa', 'systemd-compat-units.bb:do_package_write_ipk', 'base-files_3.0.14.bb:do_populate_lic', 'util-macros_1.19.2.bb:do_package_write_ipk', 'systemd-conf_244.3.bb:do_packagedata', 'libxcb_1.13.1.bb:do_package_write_ipk', 're2c_1.0.1.bb:do_populate_lic', 'wayland_1.18.0.bb:do_package_qa', 'gperf_3.1.bb:do_populate_lic', 'libpcre_8.44.bb:do_populate_lic', 'libxml2_2.9.10.bb:do_populate_lic', 'autoconf-archive_2019.01.06.bb:do_package_qa', 'gmp_6.2.0.bb:do_populate_lic', 'shadow-sysroot_4.6.bb:do_populate_lic', 'systemd_244.3.bb:do_package_qa', 'libgcc_9.3.bb:do_packagedata', 'libxml-parser-perl_2.46.bb:do_populate_lic', 'file_5.38.bb:do_populate_lic', 'glib-2.0_2.62.6.bb:do_populate_lic', 'base-passwd_3.5.29.bb:do_package_write_ipk', 'readline_8.0.bb:do_populate_lic', 'bison_3.5.4.bb:do_populate_lic', 'libxcrypt_4.4.15.bb:do_populate_lic', 'xorgproto_2019.2.bb:do_populate_lic', 'libice_1.0.10.bb:do_packagedata', 'xtrans_1.4.0.bb:do_packagedata', 'kmod-native_git.bb:do_populate_lic', 'update-rc.d_0.8.bb:do_package_qa', 'base-files_3.0.14.bb:do_packagedata', 'libtirpc_1.2.6.bb:do_populate_lic', 'libxkbcommon_0.10.0.bb:do_populate_lic', 'systemd-systemctl-native.bb:do_populate_lic', 'coreutils_8.31.bb:do_packagedata', 'libpthread-stubs_0.4.bb:do_package_qa', 'ncurses_6.2.bb:do_package_write_ipk', 'bash-completion_2.10.bb:do_packagedata', 'shadow_4.8.1.bb:do_package_write_ipk', 'libcap-ng_0.7.10.bb:do_package_qa', 'autoconf-archive_2019.01.06.bb:do_populate_lic', 'systemd-compat-units.bb:do_package_qa', 'glibc_2.31.bb:do_package_qa', 'expat_2.2.9.bb:do_packagedata', 'busybox_1.31.1.bb:do_package_write_ipk', 'openssl_1.1.1g.bb:do_package_write_ipk', 'systemd_244.3.bb:do_populate_lic', 'xtrans_1.4.0.bb:do_package_qa', 'wayland_1.18.0.bb:do_populate_lic', 'unzip_6.0.bb:do_populate_lic', 'cracklib_2.9.5.bb:do_package_write_ipk', 'cpio_2.13.bb:do_populate_lic', 'e2fsprogs_1.45.4.bb:do_populate_lic', 'opkg_0.4.2.bb:do_populate_lic', 'os-release.bb:do_populate_lic', 'gmp_6.2.0.bb:do_package_qa', 'flex_2.6.4.bb:do_populate_lic', 'm4_1.4.18.bb:do_packagedata', 'kmod_git.bb:do_packagedata', 'gtk-doc_1.32.bb:do_populate_lic', 'expat_2.2.9.bb:do_package_qa', 'pigz_2.4.bb:do_populate_lic', 'u-boot-toradex_2020.07.bb:do_packagedata', 'pkgconfig_git.bb:do_populate_lic', 'readline_8.0.bb:do_package_write_ipk', 'util-macros_1.19.2.bb:do_populate_lic', 'libcap_2.32.bb:do_packagedata', 'libx11_1.6.9.bb:do_package_write_ipk', 'libxcrypt_4.4.15.bb:do_packagedata', 'xkeyboard-config_2.28.bb:do_populate_lic', 'xtrans_1.4.0.bb:do_package_write_ipk', 'xz_5.2.4.bb:do_populate_lic', 'libpam_1.3.1.bb:do_packagedata', 'update-rc.d_0.8.bb:do_populate_lic', 'makedevs_1.0.1.bb:do_populate_sysroot', 'texinfo-dummy-native.bb:do_populate_lic', 'attr_2.4.48.bb:do_package_qa', 'libpthread-stubs_0.4.bb:do_populate_lic', 'opkg-utils_0.4.2.bb:do_populate_lic', 'qemu-native_4.2.0.bb:do_populate_lic', 'libice_1.0.10.bb:do_package_write_ipk', 'libpam_1.3.1.bb:do_package_qa', 'gdbm_1.18.1.bb:do_populate_lic', 'linux-toradex_5.4-2.1.x.bb:do_package_qa', 'libffi_3.3.bb:do_packagedata', 'debianutils_4.9.1.bb:do_populate_lic', 'linux-toradex_5.4-2.1.x.bb:do_packagedata', 'cmake-native_3.16.5.bb:do_populate_lic', 'quilt-native_0.66.bb:do_populate_lic', 'opkg-utils_0.4.2.bb:do_populate_sysroot', 'util-macros_1.19.2.bb:do_package_qa', 'libcap-ng_0.7.10.bb:do_package_write_ipk', 'libtool-cross_2.4.6.bb:do_populate_lic', 'systemd-compat-units.bb:do_packagedata', 'libxcb_1.13.1.bb:do_populate_lic', 'libpthread-stubs_0.4.bb:do_package_write_ipk', 'binutils_2.34.bb:do_populate_lic', 'libxdmcp_1.1.3.bb:do_packagedata', 'xz_5.2.4.bb:do_package_qa', 'base-files_3.0.14.bb:do_package_qa', 'openssl_1.1.1g.bb:do_package_qa', 'initramfs-module-setup-live_1.0.bb:do_packagedata', 'systemd-serialgetty.bb:do_package_write_ipk', 'expat_2.2.9.bb:do_populate_lic', 'base-files_3.0.14.bb:do_package_write_ipk', 'python3_3.8.2.bb:do_package_qa', 'gcc-runtime_9.3.bb:do_package_qa', 'pigz_2.4.bb:do_populate_sysroot', 'openssl_1.1.1g.bb:do_populate_lic', 'xtrans_1.4.0.bb:do_populate_lic', 'libxau_1.0.9.bb:do_package_qa', 'libpthread-stubs_0.4.bb:do_packagedata', 'ldconfig-native_2.12.1.bb:do_populate_lic', 'expat_2.2.9.bb:do_populate_lic', 'acl_2.2.53.bb:do_package_write_ipk', 'gdbm_1.18.1.bb:do_packagedata', 'kbd_2.2.0.bb:do_package_qa', 'wayland-protocols_1.18.imx.bb:do_package_write_ipk', 'libice_1.0.10.bb:do_populate_lic', 'wayland_1.18.0.bb:do_package_write_ipk', 'util-linux_2.35.1.bb:do_package_qa', 'bash_5.0.bb:do_package_write_ipk', 'libcap_2.32.bb:do_package_write_ipk', 'update-rc.d_0.8.bb:do_populate_lic', 'dwarfsrcfiles.bb:do_populate_lic', 'libtirpc_1.2.6.bb:do_package_write_ipk', 'gmp_6.2.0.bb:do_populate_lic', 'base-passwd_3.5.29.bb:do_populate_lic', 'python3-setuptools_45.2.0.bb:do_populate_lic', 'python3_3.8.2.bb:do_populate_lic', 'linux-libc-headers_5.4.bb:do_populate_lic', 'gcc-runtime_9.3.bb:do_populate_lic', 'gcc-runtime_9.3.bb:do_package_write_ipk', 'util-linux_2.35.1.bb:do_package_write_ipk', 'systemd-conf_244.3.bb:do_populate_lic', 'findutils_4.7.0.bb:do_packagedata', 'linux-libc-headers_5.4.bb:do_package_write_ipk', 'update-rc.d_0.8.bb:do_populate_sysroot', 'gcc-runtime_9.3.bb:do_packagedata', 'ca-certificates_20190110.bb:do_package_write_ipk', 'xkeyboard-config_2.28.bb:do_package_write_ipk', 'os-release.bb:do_packagedata', 'udev-extraconf_1.1.bb:do_packagedata', 'xkeyboard-config_2.28.bb:do_package_qa', 'shadow_4.8.1.bb:do_packagedata', 'opkg-utils_0.4.2.bb:do_packagedata', 'libusb1_1.0.22.bb:do_populate_lic', 'run-postinsts_1.0.bb:do_packagedata', 'dbus_1.12.16.bb:do_packagedata', 'libffi_3.3.bb:do_populate_lic', 'libffi_3.3.bb:do_package_write_ipk', 'intltool_0.51.0.bb:do_populate_lic', 'libsm_1.2.3.bb:do_packagedata', 'libxcb_1.13.1.bb:do_packagedata', 'os-release.bb:do_package_qa', 'libgcc_9.3.bb:do_package_write_ipk', 'bzip2_1.0.8.bb:do_populate_lic', 'run-postinsts_1.0.bb:do_package_write_ipk', 'dtc_1.6.0.bb:do_populate_lic', 'libcap-ng_0.7.10.bb:do_packagedata', 'libxml2_2.9.10.bb:do_packagedata', 'libsolv_0.7.10.bb:do_populate_lic', 'python3_3.8.2.bb:do_packagedata', 'bzip2_1.0.8.bb:do_populate_lic', 'libffi_3.3.bb:do_populate_lic', 'meson_0.53.2.bb:do_populate_lic', 'libcap-ng_0.7.10.bb:do_populate_lic', 'bash_5.0.bb:do_packagedata', 'coreutils_8.31.bb:do_populate_lic', 'flex_2.6.4.bb:do_packagedata', 'curl_7.69.1.bb:do_populate_lic', 'opkg_0.4.2.bb:do_populate_sysroot', 'libxdmcp_1.1.3.bb:do_package_write_ipk', 'idh-os-initramfs-image.bb:do_prepare_recipe_sysroot', 'glibc_2.31.bb:do_populate_lic', 'makedevs_1.0.1.bb:do_populate_lic', 'libarchive_3.4.2.bb:do_populate_lic', 'gcc-cross_9.3.bb:do_populate_lic', 'gettext-minimal-native_0.20.1.bb:do_populate_lic', 'base-passwd_3.5.29.bb:do_package_qa'])

I think you need to make sure that mender is not added to IMAGE_FSTYPES for idh-os-initramfs-image.

I think these lines will add it if you do not take action and could explain the dependency loop,

Hi @mirzak

Thanks for your reply. I’ve made a few changes to my Yocto build that seem to be headed in the right direction, but I’m not quite there yet. I used to have the following in my local.conf:

# Mender for UBI systems
INHERIT += "mender-full-squashfs-ubi"
IMAGE_CLASSES += " image_type_mender_tezi mender-ubimg-squashfs"
IMAGE_CLASSES_remove = "mender-ubimg"
IMAGE_FSTYPES += " mender_tezi"

Note: mender-full-squashfs-ubi is my own class, which is a modified version of mender-full-ubi but supports squashfs on a ubiblock device. Likewise mender_tezi creates a Toradex Easy Installer compatible image.

I’ve moved those settings to my image recipe now:

# Enable the Mender features for squashfs on ubi.
inherit mender-full-squashfs-ubi mender-ubimg-squashfs
inherit image_type_mender_tezi
IMAGE_FSTYPES += " mender_tezi"

inherit core-image

The final issue is the bootloader. The Toradex units by default use their own downstream bootloader, u-boot-toradex. So, I made some changes to the U-boot recipe, as outlined here. My u-boot-toradex_%.bbappend file thus looks like this:

require recipes-bsp/u-boot/u-boot-mender.inc

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append_mender-uboot = " file://0010-mender-squashfs.patch"
RPROVIDES_${PN} += "u-boot"

Now, I seem to be having a problem specifically with the require recipes-bsp/u-boot/u-boot-mender.inc line. If I leave it out, the whole image compiles just fine, with Mender artifacts created, but obviously, U-boot does not contain the relevant Mender patches. Adding that line back in brings back the dependency loop.

I’m still trying to get to the bottom of this, but I thought I’d post an update in case you can point me in the right direction @mirzak.

Quick update - removing this line resolves the dependency loop:

What’s going on here, and is there a workaround?

Also, aren’t the dependencies of the u-boot deploy task already defined in the standard u-boot recipe? What’s being changed here? It doesn’t seem to be referring to a custom deploy task, but rather the standard one.

Edit Looks like the problem is specifically the before do_package part. This was added here:

Although that presumably solves the ubimg problem, it’s causing a dependency loop when U-boot signing is enabled due to the new link created between do_package and do_deploy. I’m wondering if solving this in do_image_ubimg might be better…

Hi there,
I have to tag again this issue.
I’m trying to introduce mender for our i.MX8MM. Secure boot with HAB for u-boot and signed fitImage for Kernel is already implemented. Therefore the UBOOT_SIGN_ENABLED=“1” is defined.
No I’m at this point with the dependecy loop. with the suggestion to remove the with “addtask” in the u-boot-mender.inc, u-boot is complining. But like this, other tasks like imx-boot in my case can not address the do_deploy task anymore.

ERROR: Task do_compile in yocto-builder-zeus/meta-freescale/recipes-bsp/imx-mkimage/imx-boot_0.2.bb depends upon non-existent task do_deploy in yocto-builder-zeus/meta-port/recipes-bsp/u-boot/u-boot-imx_2019.04.bb
ERROR: Command execution failed: 1

meta-freescale/recipes-bsp/imx-mkimage/imx-boot_0.2.bb:

# This package aggregates output deployed by other packages,
# so set the appropriate dependencies
do_compile[depends] += " \
    virtual/bootloader:do_deploy \
    ${@' '.join('%s:do_deploy' % r for r in '${IMX_EXTRA_FIRMWARE}'.split() )} \
    imx-atf:do_deploy \
    ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os:do_deploy', '', d)} \
"

Are there some other solutions for that issue?
thanks for your inputs.

tom