Overrides for different targets?

5 views
Skip to first unread message

Stephen Ecker

unread,
Dec 19, 2024, 9:39:34 PM12/19/24
to isar-users
Is there a way to set overrides only for specific targets?  ...let me explain my problem:

I have a wks file I use for the base image, and a separate one for installer.  In my installer recipe, I have 
WKS_FILE = <my installer file>

but in another kas file loaded for a given option, I am defining an override 

OVERRIDES .= ":my_override"

and

WKS_FILE:my_override = "different wks file"

unfortunately this means that it uses my overridden wks file when this option is used... In my opinion, the right solution would be to use a different variable for the installer wks file, unless there's a solution here I'm not seeing.


Thanks,
    Stephen

Anton Mikanovich

unread,
Dec 20, 2024, 2:35:56 AM12/20/24
to Stephen Ecker, isar-users
Hello Stephen,

To have "different wks file" value used only for one target you need to set
OVERRIDES .= ":my_override" only for this target (in multiconfig config
file),
while WKS_FILE and WKS_FILE:my_override values can be declared globally
in yaml
(which makes it be copied to local.conf).

Note that you already have ${MACHINE} and ${DISTRO} in default overrides, so
it can be quite enough for target specific settings. See example of
usage in:
meta-test/recipes-core/images/isar-image-ci.bb

But if you only need to set specific WKS_FILE value for installer itself
(not a target), you should use INSTALLER_WKS_FILE variable.

Reply all
Reply to author
Forward
0 new messages