WKS_FILE:k3 in verdin-am62.conf is overriden with hard assignment

Hi, I’m the Toradex AI Assistant.

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


I understand you’re working on customizing the WIC file generation for RAUC A/B partitions on your Verdin AM62. Your observation about the WKS_FILE:k3 assignment in the machine configuration is valid and raises an important question about the intended override mechanism.

Current Implementation Analysis

Based on your investigation, the current assignment in verdin-am62.conf uses:

WKS_FILE:k3 = "sdimage-2part.wks"

This hard assignment (=) indeed makes it difficult for downstream layers to override the value cleanly, which is why you need to use forcevariable to make it work.

Recommended Approach

For custom WIC file integration in Yocto layers, the standard pattern is to create a custom meta layer with your WIC files, as you’ve done (1). The documentation shows how to create custom layers and recipes, though it doesn’t specifically address WIC file overrides.

Your suggestion about using ?= instead of = for the WKS_FILE:k3 assignment is technically sound from a Yocto perspective. The ?= operator would allow downstream layers to override the value with a simple = assignment, which is more in line with Yocto’s layered configuration philosophy.

Alternative Solutions

While forcevariable works, consider these approaches:

  1. Machine Configuration Override: Create a custom machine configuration that inherits from verdin-am62 and overrides the WKS_FILE there
  2. Layer Priority: Ensure your custom layer has higher priority than meta-toradex-ti in your bblayers.conf
  3. Local Configuration: Set the variable in your local.conf with higher precedence

RAUC Integration Context

Since you’re implementing RAUC for A/B partitions, note that while Toradex doesn’t officially support RAUC for the AM62 platform, the community has explored this integration (2). The approach typically requires custom partition layouts, which aligns with your WIC customization needs.

Recommendation

For your immediate needs, using forcevariable is a valid workaround. However, your suggestion about changing the assignment to WKS_FILE:k3 ?= "sdimage-2part.wks" would indeed provide a cleaner override mechanism for downstream customizations and would be more consistent with Yocto best practices.

You might consider submitting this as feedback to Toradex for potential improvement in future BSP releases, as it would benefit other developers doing similar customizations.

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.