From patchwork Sun Dec 28 18:08:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AdrianF X-Patchwork-Id: 77589 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 951F5D3B7E5 for ; Sun, 28 Dec 2025 18:09:56 +0000 (UTC) Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net [185.136.65.225]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.29082.1766945391865248844 for ; Sun, 28 Dec 2025 10:09:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=adrian.freihofer@siemens.com header.s=fm2 header.b=KDmjBSH+; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.65.225, mailfrom: fm-1329275-20251228180948eac5dae7de0002074d-n6lxy5@rts-flowmailer.siemens.com) Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 20251228180948eac5dae7de0002074d for ; Sun, 28 Dec 2025 19:09:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm2; d=siemens.com; i=adrian.freihofer@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=GNobPU3cHY3TnMiiVvcwA8h5YraTCUxyoB3QXryLg6k=; b=KDmjBSH+D74r3In8O6Nmspks7Zo2Pld2zbul1meEqL7XOyJWdLQBn/8AgJrl7Kuixi7+Lu ZkMxNkhYcM7yITAmGrEtIEdedv5BerxglhtEhkYeE3pckh+9gTk/eu8Bu1Gb1gDQu7G2hGsW KuloX5uvznMvmYKWVymMaH/m59OotThNRfDWru68TYKX9ugV9tCSOMDypX4YZMSkXcBRXTmL hL8iz76ybineJWuaO3umMv5Cu3W4LZ3RaEpaJVzOOObzYMVWQgABOEK/+faA3uTG50TrvFWf +PtNnCrFtddJCdtQJqOgWI6U/z1nrCTZHknE/SCuRcdnxE8f3wJqwgXw==; From: AdrianF To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH v2 1/3] fragments: add a 'devtool-ide-sdk' fragment Date: Sun, 28 Dec 2025 19:08:31 +0100 Message-ID: <20251228180935.2077478-2-adrian.freihofer@siemens.com> In-Reply-To: <20251228180935.2077478-1-adrian.freihofer@siemens.com> References: <20251228180935.2077478-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1329275:519-21489:flowmailer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Dec 2025 18:09:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228589 From: Adrian Freihofer Add a configuration fragment that enables devtool ide-sdk workflow for development and remote debugging. The configuration is intended to streamline the development workflow where developers can modify recipes with devtool and debug them remotely on target devices using IDEs like VSCode. Signed-off-by: Adrian Freihofer --- .../conf/fragments/yocto/devtool-ide-sdk.conf | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta/conf/fragments/yocto/devtool-ide-sdk.conf diff --git a/meta/conf/fragments/yocto/devtool-ide-sdk.conf b/meta/conf/fragments/yocto/devtool-ide-sdk.conf new file mode 100644 index 0000000000..9b4b57f009 --- /dev/null +++ b/meta/conf/fragments/yocto/devtool-ide-sdk.conf @@ -0,0 +1,26 @@ +BB_CONF_FRAGMENT_SUMMARY = "Use devtool ide-sdk for development and remote debugging." +BB_CONF_FRAGMENT_DESCRIPTION = "\ +This configuration enables the use of devtool ide-sdk. \ +Example usage: \ + 1. bitbake-config-build enable-fragment core/yocto/devtool-ide-sdk \ + bitbake-config-build enable-fragment core/yocto/root-login-with-empty-password \ + 2. The recipe (my-recipe in this case) must be in IMAGE_INSTALL. \ + 3. Devtool modify --debug-build my-recipe \ + 4. devtool ide-sdk my-recipe core-image-full-cmdline --target root@192.168.7.2' \ + 5. runqemu snapshot \ + 6. code $BUILDDIR/workspace/sources/my-recipe \ + 7. Develop and debug the sources of my-recipe from VSCode remotely on the device. \ +" + +# Build the companion debug file system +IMAGE_GEN_DEBUGFS = "1" + +# Optimize build time: with devtool ide-sdk the dbg tar is not needed +# (if booting the target via NFS is not used for remote debugging) +IMAGE_FSTYPES_DEBUGFS = "" + +# Without copying the binaries into roofs-dbg, GDB does not find all source files. +IMAGE_CLASSES += "image-combined-dbg" + +# Remote debugging needs gdbserver on the target device +IMAGE_INSTALL:append = " gdbserver" From patchwork Sun Dec 28 18:08:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AdrianF X-Patchwork-Id: 77587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8652AE9271B for ; Sun, 28 Dec 2025 18:09:56 +0000 (UTC) Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net [185.136.65.226]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.28963.1766945391866809577 for ; Sun, 28 Dec 2025 10:09:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=adrian.freihofer@siemens.com header.s=fm2 header.b=NoEpTmdi; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.65.226, mailfrom: fm-1329275-20251228180948a9e9942d2c00020780-fepu_6@rts-flowmailer.siemens.com) Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20251228180948a9e9942d2c00020780 for ; Sun, 28 Dec 2025 19:09:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm2; d=siemens.com; i=adrian.freihofer@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=lg+S77c2Mzt0DVLdY4KAC1dkD0A9Cxe2KsC28dDRYL0=; b=NoEpTmdiZBul8vcxuEwKHXnfau133HTAsBUSi4BzJhPexWc9TRNaYXsw+0DvPqyIs4ZoPh dTXcDTnxiflgokjiK7krsGB15GJFgD9AmSjyjv6gbdIPuJX668YxKohexqdHaCNlmERmoEjh Kkn2tR0t14422ZD54/LXSA+Gdqkc7W5yip2WexX/Wb7ve7PisA4fUirpv+UJEVIl4fw5ZJll DIlpE4lNEglfv4rA+bRPUdAxBaQyejj3Ucmqk8aZWTNPeEYY+bTh9ZVKrFr/Az6Go+j3574J Xh2HKrRb2+vqRZWxExlsDAmlmi8cnlIgubcMhBkFPKkCH8ysT1FX5X6g==; From: AdrianF To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH v2 2/3] oe-selftest: case: support fragments in write_config Date: Sun, 28 Dec 2025 19:08:32 +0100 Message-ID: <20251228180935.2077478-3-adrian.freihofer@siemens.com> In-Reply-To: <20251228180935.2077478-1-adrian.freihofer@siemens.com> References: <20251228180935.2077478-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1329275:519-21489:flowmailer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Dec 2025 18:09:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228588 From: Adrian Freihofer When writing configuration files during selftests, also handle the inclusion of fragment files via the toolcfg.conf mechanism. By default the toolcfg.conf file from build/conf/toolcfg.conf is copied to build-st/conf/toolcfg.conf. This comes with a risk for using fragments by accident from the main build in the selftest build. To avoid this, support writing a reproducible set of fragments per selftest case via the write_config() method. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/case.py | 9 ++++++++- meta/lib/oeqa/selftest/context.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py index da35b25f68..148b120371 100644 --- a/meta/lib/oeqa/selftest/case.py +++ b/meta/lib/oeqa/selftest/case.py @@ -30,6 +30,7 @@ class OESelftestTestCase(OETestCase): cls.localconf_path = cls.tc.config_paths['localconf'] cls.local_bblayers_path = cls.tc.config_paths['bblayers'] + cls.toolcfgconf_path = cls.tc.config_paths['toolcfgconf'] cls.testinc_path = os.path.join(cls.tc.config_paths['builddir'], "conf/selftest.inc") @@ -161,7 +162,7 @@ class OESelftestTestCase(OETestCase): self.logger.debug("Adding path '%s' to be cleaned up when test is over" % path) self._track_for_cleanup.append(path) - def write_config(self, data, multiconfig=None): + def write_config(self, data, multiconfig=None, fragments=None): """Write to config file""" if multiconfig: multiconfigdir = "%s/conf/multiconfig" % self.builddir @@ -174,6 +175,12 @@ class OESelftestTestCase(OETestCase): self.logger.debug("Writing to: %s\n%s\n" % (dest_path, data)) ftools.write_file(dest_path, data) + if fragments: + toolscfg_str = '# Added by oe-selftest' + os.linesep + \ + 'OE_FRAGMENTS += "' + ' '.join(fragments) + '"' + os.linesep + self.logger.debug("Over writing fragments: %s\n%s" % (self.toolcfgconf_path, toolscfg_str)) + ftools.write_file(self.toolcfgconf_path, toolscfg_str) + def append_config(self, data): """Append to /conf/selftest.inc""" self.logger.debug("Appending to: %s\n%s\n" % (self.testinc_path, data)) diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index c9eb481725..02a4832553 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py @@ -278,6 +278,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor): self.tc_kwargs['init']['config_paths']['builddir'] = builddir self.tc_kwargs['init']['config_paths']['localconf'] = os.path.join(builddir, "conf/local.conf") self.tc_kwargs['init']['config_paths']['bblayers'] = os.path.join(builddir, "conf/bblayers.conf") + self.tc_kwargs['init']['config_paths']['toolcfgconf'] = os.path.join(builddir, "conf/toolcfg.conf") self.tc_kwargs['init']['newbuilddir'] = args.newbuilddir self.tc_kwargs['init']['keep_builddir'] = args.keep_builddir From patchwork Sun Dec 28 18:08:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AdrianF X-Patchwork-Id: 77588 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83C15E784BE for ; Sun, 28 Dec 2025 18:09:56 +0000 (UTC) Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net [185.136.64.225]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.28962.1766945391866649926 for ; Sun, 28 Dec 2025 10:09:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=adrian.freihofer@siemens.com header.s=fm2 header.b=lYv0VEYb; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.225, mailfrom: fm-1329275-202512281809496d7b8367e50002072a-bkiuay@rts-flowmailer.siemens.com) Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 202512281809496d7b8367e50002072a for ; Sun, 28 Dec 2025 19:09:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm2; d=siemens.com; i=adrian.freihofer@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=2KZLrrsQGplu6qPoEALlw8YZwstM76NRkJPC/SFMZFo=; b=lYv0VEYbJTXGgwNzbUHTAf6dYzeGOZOYYMTje/WfDbqQ6oqDFOxYctmKk0uJ0F2WYRoWyJ VOPAfWq9wJaxU8673enPi2FB67Jn9SqHGltSFA7PQigDM+wWsZ0T1ql8Hnv/ffFTuFmXa/pT tmTphsQkR2mhnlP3092XjWaKeMJumnUuqdZOouD2aQaryT1pvkiZhfYDp8S3g6k5BT5x2yL8 Tti8AD6E+VfckucDQNDWe8pKBnAUb4XggarL8SuaOii66Uppl/rTA03kw/GvxbsEWSwpNuRh HhApeyw2H+5wOyT2pmZ8AD+Y0VyvIk7M/qMkdG7W90tbQt0MCwhC0mRQ==; From: AdrianF To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH v2 3/3] oe-selftest: ide_sdk: use the ide-sdk fragment Date: Sun, 28 Dec 2025 19:08:33 +0100 Message-ID: <20251228180935.2077478-4-adrian.freihofer@siemens.com> In-Reply-To: <20251228180935.2077478-1-adrian.freihofer@siemens.com> References: <20251228180935.2077478-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1329275:519-21489:flowmailer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 28 Dec 2025 18:09:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/228587 From: Adrian Freihofer Test also the new ide-sdk fragment when setting up the ide-sdk test environment. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/devtool.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 8d7e984753..2173590030 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -2526,13 +2526,11 @@ class DevtoolIdeSdkTests(DevtoolBase): def _write_bb_config(self, recipe_names): """Helper to write the bitbake local.conf file""" conf_lines = [ - 'IMAGE_CLASSES += "image-combined-dbg"', - 'IMAGE_GEN_DEBUGFS = "1"', - 'IMAGE_INSTALL:append = " gdbserver %s"' % ' '.join( - [r + '-ptest' for r in recipe_names]), + 'IMAGE_INSTALL:append = " %s"' % ' '.join([r + '-ptest' for r in recipe_names]), 'DISTRO_FEATURES:append = " ptest"' ] - self.write_config("\n".join(conf_lines)) + fragments = ['core/yocto/devtool-ide-sdk'] + self.write_config("\n".join(conf_lines), fragments=fragments) def _check_workspace(self): """Check if a workspace directory is available and setup the cleanup"""