From 2070d83e0b3c16a7ff7c77ba34880db1004576b3 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Tue, 26 Nov 2024 12:52:58 +0100 Subject: [PATCH] toolchains: don't overwrite default SDKIMAGE_FEATURES contents This variable is used to determine the types of complementary packages included in the SDK: dbg-pkgs, dev-pkgs, doc-pkgs, src-pkgs... We added staticdev-pkgs to this variable back in Yocto 2.0 (45de4d694348), but instead of appending it to the original list, we redefined it with its original value ("dev-pkgs dbg-pkgs") plus "staticdev-pkgs". However, the default value of SDKIMAGE_FEATURES in poky has changed over time: * Starting in Yocto 2.3 (eb345ca720e5), doc-pkgs is included if "api-documentation" is in DISTRO_FEATURES. We don't include this feature by default, but if a customer were to include it manually, the doc packages wouldn't get included in their custom SDKs. * Starting in Yocto 2.7 (ba3aa5311291), bitbake changed the default PACKAGE_DEBUG_SPLIT_STYLE value so debug packages get split in two: one for binaries with debug symbols and another for the source code. In turn, src-pkgs was added to the default SDKIMAGE_FEATURES so that SDKs wouldn't change behavior, but since we overwrite the default value, we aren't including src-pkgs in our SDKs, only dbg-pkgs. * Any future changes would be ignored as well, which could potentially lead to unexpected behavior. Make sure we don't overwrite the default SDKIMAGE_FEATURES value to include src-pkgs in our SDKs, as well as the optional doc-pkgs logic. Also, include staticdev-pkgs in our recently created dey-toolchain recipe. Signed-off-by: Gabriel Valcazar --- meta-digi-dey/recipes-core/images/core-image-base.bbappend | 4 ++-- meta-digi-dey/recipes-core/images/dey-image-graphical.inc | 4 ++-- meta-digi-dey/recipes-core/meta/dey-toolchain.bb | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/meta-digi-dey/recipes-core/images/core-image-base.bbappend b/meta-digi-dey/recipes-core/images/core-image-base.bbappend index 6736d81ed..f34365cf0 100644 --- a/meta-digi-dey/recipes-core/images/core-image-base.bbappend +++ b/meta-digi-dey/recipes-core/images/core-image-base.bbappend @@ -22,8 +22,8 @@ CORE_IMAGE_BASE_INSTALL += "dey-examples-digiapix" # non-graphical core-image-base. CORE_IMAGE_BASE_INSTALL:append:ccimx6ul = " connectcore-demo-example" -# SDK features (for toolchains generated from an image with populate_sdk) -SDKIMAGE_FEATURES ?= "dev-pkgs dbg-pkgs staticdev-pkgs" +# Add staticdev packages to SDK +SDKIMAGE_FEATURES:append = " staticdev-pkgs" # Add our dey-image tweaks to the final image (like /etc/buildinfo info) inherit dey-image diff --git a/meta-digi-dey/recipes-core/images/dey-image-graphical.inc b/meta-digi-dey/recipes-core/images/dey-image-graphical.inc index e78dcfcf5..8df53d800 100644 --- a/meta-digi-dey/recipes-core/images/dey-image-graphical.inc +++ b/meta-digi-dey/recipes-core/images/dey-image-graphical.inc @@ -29,8 +29,8 @@ IMAGE_FEATURES += " \ ${@bb.utils.contains('MACHINE_FEATURES', 'wifi', 'dey-wireless', '', d)} \ " -# SDK features (for toolchains generated from an image with populate_sdk) -SDKIMAGE_FEATURES ?= "dev-pkgs dbg-pkgs staticdev-pkgs" +# Add staticdev packages to SDK +SDKIMAGE_FEATURES:append = " staticdev-pkgs" IMAGE_LINGUAS = "" diff --git a/meta-digi-dey/recipes-core/meta/dey-toolchain.bb b/meta-digi-dey/recipes-core/meta/dey-toolchain.bb index 2cc5c4fec..153b9efe2 100644 --- a/meta-digi-dey/recipes-core/meta/dey-toolchain.bb +++ b/meta-digi-dey/recipes-core/meta/dey-toolchain.bb @@ -6,5 +6,8 @@ LICENSE = "MIT" inherit core-image qt-version inherit populate_sdk ${QT_POPULATE_SDK} +# Add staticdev packages to SDK +SDKIMAGE_FEATURES:append = " staticdev-pkgs" + SDK_NAME = "${PN}-${MACHINE}" TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-${SDK_VERSION}"