From patchwork Thu Feb 26 20:19:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: AdrianF X-Patchwork-Id: 82036 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 EBBCEFD9E0E for ; Thu, 26 Feb 2026 20:20:33 +0000 (UTC) Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.79821.1772137222307364761 for ; Thu, 26 Feb 2026 12:20:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=adrian.freihofer@siemens.com header.s=fm2 header.b=b/w7qEB+; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.228, mailfrom: fm-1329275-20260226202019a3bb066dfe000207a3-vw48vh@rts-flowmailer.siemens.com) Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20260226202019a3bb066dfe000207a3 for ; Thu, 26 Feb 2026 21:20:19 +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; bh=+GIaAQYOJ0BkTE9+9ocyQqLt05OLviPtR+wsu8c6Av4=; b=b/w7qEB+xjnbCla2Cc/RrOr391qqz9+cJZSo7Fy/VXrre6lWiqZkB9TBHoQtC0hW0but0i 6Ntl0oxEkoA/2PTF1m9BFYfdc0xXJqoJb/fryrshHZ9cFfAE4sEHlD8uIFmvRSJ3uX3Z6iKQ leOoU0R4M7YWAK8NXyDjwKta/pb4SgxY2oEFs1Ug1lh24wYsWsVLOTI+pPTFgzd8wPT/J9xG C7NDeK98/B2bn35C+ZgVccMCZKLiu9MW1FcL9djko3tOitMx14P3RKZa/RAKId4n8rmGj0SP bg01r1kq3rnJdvZHGq5gVSTp0ZAtGlwn4qzsMY0tboy1xUydGCTwuOEQ==; From: AdrianF To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH] oe-init-build-env: Drop VSCode setup Date: Thu, 26 Feb 2026 21:19:50 +0100 Message-ID: <20260226201950.3882698-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 ; Thu, 26 Feb 2026 20:20:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/232061 From: Adrian Freihofer Remove the VSCode setup from oe-init-build-env. Since poky as a combo-layer repository is no longer available, using the oe-init-build-env script from openembedded-core is no longer straightforward. There are too many ways to set up a build environment, with different directory structures, with containers involved or not, etc. Each of these setups may have its own way to provide IDE support. A simple shell script like oe-init-vscode cannot address all these use cases. Rather than trying to make oe-init-build-env smart enough to cover all these cases, it is better to delegate the responsibility to whatever tool or repository is used to set up the build environment. If no tool such as bitbake-setup is used, it is still possible to use a variant of the oe-setup-vscode script from a custom layer. One way which works well is to create a custom oe-init-build-env script in the custom layer repository which calls the custom oe-setup-vscode script from the custom layer repository. Example directory structure: my-project/ ├── .vscode # generated by oe-setup-vscode | # when oe-init-build-env is called ├── layers/ │ └── openembedded-core/ | └── bitbake/ ├── scripts/ │ └── oe-setup-vscode ├── build/ │ └── conf └── oe-init-build-env Signed-off-by: Adrian Freihofer --- oe-init-build-env | 5 --- scripts/oe-setup-vscode | 93 ----------------------------------------- 2 files changed, 98 deletions(-) delete mode 100755 scripts/oe-setup-vscode diff --git a/oe-init-build-env b/oe-init-build-env index 82382f2707..5a2bd0f4d9 100755 --- a/oe-init-build-env +++ b/oe-init-build-env @@ -48,11 +48,6 @@ export OEROOT return 1 } -# Generate an initial configuration for VSCode and the yocto-bitbake plugin. -if command -v code > /dev/null && [ ! -d "$OEROOT/.vscode" ]; then - oe-setup-vscode "$OEROOT" "$BUILDDIR" -fi - unset OEROOT [ -z "$BUILDDIR" ] || cd "$BUILDDIR" diff --git a/scripts/oe-setup-vscode b/scripts/oe-setup-vscode deleted file mode 100755 index b8642780d5..0000000000 --- a/scripts/oe-setup-vscode +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -usage() { - echo "$0 " - echo " OEINIT: path to directory where the .vscode folder is" - echo " BUILDDIR: directory passed to the oe-init-setup-env script" -} - -if [ "$#" -ne 2 ]; then - usage - exit 1 -fi - -OEINIT=$(readlink -f "$1") -BUILDDIR=$(readlink -f "$2") -VSCODEDIR=$OEINIT/.vscode - -if [ ! -d "$OEINIT" ] || [ ! -d "$BUILDDIR" ]; then - echo "$OEINIT and/or $BUILDDIR directories are not present." - exit 1 -fi - -VSCODE_SETTINGS=$VSCODEDIR/settings.json -ws_builddir="$(echo "$BUILDDIR" | sed -e "s|$OEINIT|\${workspaceFolder}|g")" - -# If BUILDDIR is in scope of VSCode ensure VSCode does not try to index the build folder. -# This would lead to a busy CPU and finally to an OOM exception. -mkdir -p "$VSCODEDIR" -cat < "$VSCODE_SETTINGS" -{ - "bitbake.pathToBitbakeFolder": "\${workspaceFolder}/bitbake", - "bitbake.pathToEnvScript": "\${workspaceFolder}/oe-init-build-env", - "bitbake.pathToBuildFolder": "$ws_builddir", - "bitbake.commandWrapper": "", - "bitbake.workingDirectory": "\${workspaceFolder}", - "files.exclude": { - "**/.git/**": true, - "**/_build/**": true, - "**/buildhistory/**": true, - "**/cache/**": true, - "**/downloads/**": true, - "**/node_modules/**": true, - "**/oe-logs/**": true, - "**/oe-workdir/**": true, - "**/sstate-cache/**": true, - "**/tmp*/**": true, - "**/workspace/attic/**": true, - "**/workspace/sources/**": true - }, - "files.watcherExclude": { - "**/.git/**": true, - "**/_build/**": true, - "**/buildhistory/**": true, - "**/cache/**": true, - "**/downloads/**": true, - "**/node_modules/**": true, - "**/oe-logs/**": true, - "**/oe-workdir/**": true, - "**/sstate-cache/**": true, - "**/tmp*/**": true, - "**/workspace/attic/**": true, - "**/workspace/sources/**": true - }, - "python.analysis.exclude": [ - "**/_build/**", - "**/.git/**", - "**/buildhistory/**", - "**/cache/**", - "**/downloads/**", - "**/node_modules/**", - "**/oe-logs/**", - "**/oe-workdir/**", - "**/sstate-cache/**", - "**/tmp*/**", - "**/workspace/attic/**", - "**/workspace/sources/**" - ] -} -EOMsettings - - -# Ask the user if the yocto-bitbake extension should be installed -VSCODE_EXTENSIONS=$VSCODEDIR/extensions.json -cat < "$VSCODE_EXTENSIONS" -{ - "recommendations": [ - "yocto-project.yocto-bitbake" - ] -} -EOMextensions - -echo "You had no $VSCODEDIR configuration." -echo "These configuration files have therefore been created for you."