[PATCH] sdk: force set IMAGE_FSTYPES to SDK_FORMATS

2 views
Skip to first unread message

Benedikt Niedermayr

unread,
Mar 23, 2026, 5:10:32 AM (5 days ago) Mar 23
to isar-...@googlegroups.com
The image formats for the SDK should be set with SDK_FORMATS rather than
configuring the IMAGE_FSTYPES.
There are even cases were unwanted image types make it into the sdk
image format because of using append syntax which is stronger than:

```
IMAGE_FSTYPES:class-sdk = "${SDK_FORMATS}"
```

Setting IMAGE_FSTYPES to SDK_FORMATS during recipe pre finalize time
force overrides the value and thus ignores every append syntax override
assignment before.

Signed-off-by: Benedikt Niedermayr <benedikt....@siemens.com>
---
meta/classes-recipe/sdk.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/sdk.bbclass b/meta/classes-recipe/sdk.bbclass
index 17b56bcf7371..dc5863465958 100644
--- a/meta/classes-recipe/sdk.bbclass
+++ b/meta/classes-recipe/sdk.bbclass
@@ -18,6 +18,7 @@ python sdk_virtclass_handler() {
# sdkchroot deploy only for sdk image
bb.build.addtask('deploy_sdkchroot', 'do_build', 'do_rootfs', d)
bb.build.deltask('copy_boot_files', d)
+ e.data.setVar('IMAGE_FSTYPES', e.data.getVar('SDK_FORMATS'))
else:
# add do_populate_sdk only to the non-sdk variant
# it only exists to preserve the interface...
@@ -52,7 +53,6 @@ ROOTFS_FEATURES:append:class-sdk = " clean-package-cache generate-manifest expor
ROOTFS_MANIFEST_DEPLOY_DIR:class-sdk = "${DEPLOY_DIR_SDKCHROOT}"
ROOTFS_DPKGSTATUS_DEPLOY_DIR:class-sdk = "${DEPLOY_DIR_SDKCHROOT}"

-IMAGE_FSTYPES:class-sdk = "${SDK_FORMATS}"
TAR_TRANSFORM:class-sdk = " --transform='s|rootfs|${IMAGE_FULLNAME}|'"

# bitbake dependencies
--
2.43.0

Jan Kiszka

unread,
Mar 23, 2026, 5:39:53 AM (5 days ago) Mar 23
to Benedikt Niedermayr, isar-...@googlegroups.com
You may want to mention that the effect of building undesired
IMAGE_FSTYPES along the SDK can be observed via isar-cip-core's update
images.

Patch looks good to me.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Benedikt Niedermayr

unread,
Mar 23, 2026, 6:27:14 AM (5 days ago) Mar 23
to isar-...@googlegroups.com
The image formats for the SDK should be set with SDK_FORMATS rather than
configuring the IMAGE_FSTYPES.
There are even cases were unwanted image types make it into the sdk
image format because of using append syntax which is stronger than:

```
IMAGE_FSTYPES:class-sdk = "${SDK_FORMATS}"
```

Setting IMAGE_FSTYPES to SDK_FORMATS during recipe pre finalize time
force overrides the value and thus ignores every append syntax override
assignment before.

This fixes a build error when building the isar-cip-core
(swupdate and fTPM support enabled) SDK without building the image
upfront.

Signed-off-by: Benedikt Niedermayr <benedikt....@siemens.com>
---
meta/classes-recipe/sdk.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/sdk.bbclass b/meta/classes-recipe/sdk.bbclass
index 17b56bcf7371..dc5863465958 100644
--- a/meta/classes-recipe/sdk.bbclass
+++ b/meta/classes-recipe/sdk.bbclass
@@ -18,6 +18,7 @@ python sdk_virtclass_handler() {
# sdkchroot deploy only for sdk image
bb.build.addtask('deploy_sdkchroot', 'do_build', 'do_rootfs', d)
bb.build.deltask('copy_boot_files', d)
+ e.data.setVar('IMAGE_FSTYPES', e.data.getVar('SDK_FORMATS'))
else:
# add do_populate_sdk only to the non-sdk variant
# it only exists to preserve the interface...
@@ -52,7 +53,6 @@ ROOTFS_FEATURES:append:class-sdk = " clean-package-cache generate-manifest expor
ROOTFS_MANIFEST_DEPLOY_DIR:class-sdk = "${DEPLOY_DIR_SDKCHROOT}"
ROOTFS_DPKGSTATUS_DEPLOY_DIR:class-sdk = "${DEPLOY_DIR_SDKCHROOT}"

-IMAGE_FSTYPES:class-sdk = "${SDK_FORMATS}"
TAR_TRANSFORM:class-sdk = " --transform='s|rootfs|${IMAGE_FULLNAME}|'"

# bitbake dependencies
--
2.43.0

Benedikt Niedermayr

unread,
Mar 23, 2026, 6:27:14 AM (5 days ago) Mar 23
to isar-...@googlegroups.com
Changes since v1:

- Add origin details for issue resolution to the commit message

Benedikt Niedermayr (1):
sdk: force set IMAGE_FSTYPES to SDK_FORMATS

meta/classes-recipe/sdk.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--
2.43.0

Zhihang Wei

unread,
Mar 26, 2026, 9:06:31 AM (2 days ago) Mar 26
to Benedikt Niedermayr, isar-...@googlegroups.com
Applied to next, thanks.

Zhihang
Reply all
Reply to author
Forward
0 new messages