Meta-updater integration with yocto for aqila am69

Hello,

I have built a reference image for Aquila am69 board, and want to add meta-updater layer to access ota features,

Added conf in local.conf like,

INHERIT += “sota”

DISTRO_FEATURES:append = " sota ostree"

OSTREE_REPO = “${DEPLOY_DIR_IMAGE}/ostree_repo”

OSTREE_OSNAME = “aquila-os”

SOTA_CLIENT_PROV = “aktualizr-shared-prov”

CORE_IMAGE_EXTRA_INSTALL += “aktualizr ostree”

upon triggering bitbake getting an error of Dependency loop,

From the error output, the core loop involves:

  • linux-toradex-ti_6.6.bb

  • initramfs-ostree-image.bb

  • and related tasks (do_bundle_initramfs, do_image_complete, do_assemble_fitimage_initramfs, do_deploy).

Kindly provide help to resolve this.

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Resolving OTA Integration Dependency Loop for Aquila AM69

The dependency loop you’re encountering is a common issue when integrating meta-updater with Toradex hardware, particularly with the kernel initramfs bundling process. Here’s how to resolve this:

Configuration Adjustments

Your current configuration looks mostly correct, but you need to make a few adjustments to prevent the circular dependency:

  1. Remove kernel bundling conflicts by adjusting your local.conf:
# Basic OTA configuration
INHERIT += "sota"
DISTRO_FEATURES:append = " sota ostree"
OSTREE_REPO = "${DEPLOY_DIR_IMAGE}/ostree_repo"
OSTREE_OSNAME = "aquila-os"
SOTA_CLIENT_PROV = "aktualizr-shared-prov"

# Prevent initramfs bundling conflicts
INITRAMFS_IMAGE = ""
INITRAMFS_IMAGE_BUNDLE = "0"

# Core packages
CORE_IMAGE_EXTRA_INSTALL += "aktualizr ostree"
  1. Ensure proper image types are configured for OTA:
IMAGE_FSTYPES:append = " ota-ext4 ostree.tar.bz2 wic"

Understanding the Dependency Loop

The circular dependency occurs because:

  • The kernel (linux-toradex-ti) tries to bundle an initramfs
  • The initramfs-ostree-image depends on kernel modules
  • OSTree integration creates interdependencies between these components

Alternative Approaches

If the above doesn’t resolve the issue, try these alternatives:

  1. Use separate initramfs approach:
INITRAMFS_IMAGE = "initramfs-ostree-image"
INITRAMFS_IMAGE_BUNDLE = "0"
INITRAMFS_FSTYPES = "cpio.gz"
  1. Disable FIT image bundling temporarily:
KERNEL_IMAGETYPE = "Image"
KERNEL_IMAGETYPES = "Image"

Verification Steps

After making these changes:

  1. Clean your build environment:
bitbake -c cleanall linux-toradex-ti
bitbake -c cleanall initramfs-ostree-image
  1. Rebuild your image:
bitbake your-image-name

Expected OTA Functionality

Once successfully built, your Aquila AM69 image will support (1):

  • Atomic OTA updates using OSTree
  • Secure update verification through Uptane
  • Rollback capabilities in case of update failures
  • Remote update management through Torizon Platform Services

The configuration ensures that your system uses OSTree for filesystem versioning and aktualizr for communicating with update servers, providing robust OTA update capabilities for your embedded application.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hello @ToradexAI,

I am still facing errors with the alternate solution, but with 1st solution its showing one error.

This is the config currently I have:

Basic OTA configuration

INHERIT += “sota”
DISTRO_FEATURES:append = " sota ostree"
OSTREE_REPO = “${DEPLOY_DIR_IMAGE}/ostree_repo”
OSTREE_OSNAME = “aquila-os”
SOTA_CLIENT_PROV = “aktualizr-shared-prov”

Prevent initramfs bundling conflicts

INITRAMFS_IMAGE:unexport = “1”
INITRAMFS_IMAGE_BUNDLE = “0”
INITRAMFS_FSTYPES = “cpio.gz”

KERNEL_IMAGETYPE = “Image”
KERNEL_IMAGETYPES = “Image”

Core packages

CORE_IMAGE_EXTRA_INSTALL += “aktualizr ostree”
IMAGE_FSTYPES:append = " ota-ext4 ostree.tar.bz2 wic"

This is the error I am getting:

ERROR: Task /home/lpraktikant/Yocto_Toradex_new/oe-core/layers/meta-updater/recipes-core/images/initramfs-ostree-image.bb:do_image_complete has circular dependency on /home/lpraktikant/Yocto_Toradex_new/oe-core/layers/meta-updater/recipes-core/images/initramfs-ostree-image.bb:do_image_ostree
ERROR: Command execution failed: 1

I am waiting for the solution, its been 4 days I am waiting.

Resolving OTA Integration Circular Dependency for Aquila AM69

I understand you’re still facing circular dependency issues with OTA integration on your Aquila AM69 board. The error indicates a specific circular dependency within the initramfs-ostree-image.bb recipe itself.

Root Cause Analysis

The circular dependency error you’re seeing (do_image_complete has circular dependency on do_image_ostree) suggests that the OSTree image creation process is creating a loop within the same recipe. This is different from the kernel-initramfs loop we addressed earlier.

Recommended Configuration

For Torizon OS builds, all custom layers must be version controlled by Git (1). If you haven’t done this yet, initialize your build directory as a Git repository:

git init && git commit -m 'initial commit'

(1)

Updated Configuration Approach

Try this revised configuration in your local.conf:

# Basic OTA configuration
INHERIT += "sota"
DISTRO_FEATURES:append = " sota ostree"
OSTREE_REPO = "${DEPLOY_DIR_IMAGE}/ostree_repo"
OSTREE_OSNAME = "aquila-os"
SOTA_CLIENT_PROV = "aktualizr-shared-prov"

# Completely disable initramfs for now
INITRAMFS_IMAGE = ""
INITRAMFS_IMAGE_BUNDLE = "0"

# Use standard kernel image
KERNEL_IMAGETYPE = "Image"

# Core packages
CORE_IMAGE_EXTRA_INSTALL += "aktualizr ostree"

# Simplified image types - remove ota-ext4 temporarily
IMAGE_FSTYPES:append = " ostree.tar.bz2 wic"

Alternative Workaround

If the circular dependency persists, try building without the initramfs-ostree-image entirely by adding this to your local.conf:

# Skip problematic initramfs recipe
BBMASK += "initramfs-ostree-image.bb"

Build Steps

  1. Clean the problematic recipes:

    bitbake -c cleanall initramfs-ostree-image
    bitbake -c cleanall linux-toradex-ti
    
  2. Remove build artifacts:

    rm -rf tmp/work/*initramfs-ostree-image*
    rm -rf tmp/work/*linux-toradex-ti*
    
  3. Rebuild your image:

    bitbake your-image-name
    

Expected Outcome

This configuration should eliminate the circular dependency by:

  • Removing the problematic initramfs bundling
  • Simplifying the image creation process
  • Maintaining OTA functionality through OSTree and aktualizr

Once the build completes successfully, you can gradually add back features like specific image formats if needed.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hi @jayantpatil252

The recommended approach to do this is to start with Torizon Minimal,
and add your customizations on top of it.