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 (45de4d6943), 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 <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2024-11-26 12:52:58 +01:00
parent 248c3c7f4f
commit 2070d83e0b
3 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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 = ""

View File

@ -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}"