summaryrefslogtreecommitdiffstats
path: root/oe-init-build-env
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@gmail.com>2024-02-15 23:53:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-19 11:34:33 +0000
commitdfe98713729ceb329813ac00f6035dcfb470b469 (patch)
treeaadd0cea16bc12138035692acd91f15d31d1dcc5 /oe-init-build-env
parenta510d455d3b93e2d7c5e1aef7b2dbe7d77d6a03d (diff)
downloadpoky-dfe98713729ceb329813ac00f6035dcfb470b469.tar.gz
oe-init-build-env: generate .vscode from template
Provide a reasonable default configuration for VSCode and the yocto.bitbake extension. The generated default configuration is generic and minimal. It's mostly supposed to prevent VSCode from OOM exceptions if the build directory is in the scope of the indexer plugins of VSCode. But it also configures the yocto-bitbake plugin to just work without manual user interaction. The configuration is only generated if VSCode is installed. Currently, VSCode is one of many popular editors for Yocto/OE. Removing the check would mean that the configuration would be generated by e.g. oe-selftest or for users not using VSCode. If it should prove useful, the check can be removed later. Customization for other layers is possible. A layer might provide it's own oe-setup-build-env script which calls the oe-setup-vscode script from poky with different folders. But it's also possible to override the oe-setup-vscode script by another layer with a custom implementation. (From OE-Core rev: 48829be7ab2edcbc2e4473f81cdaf35889d63f9c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'oe-init-build-env')
-rwxr-xr-xoe-init-build-env6
1 files changed, 6 insertions, 0 deletions
diff --git a/oe-init-build-env b/oe-init-build-env
index 38333ab858..82382f2707 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -47,6 +47,12 @@ export OEROOT
47 unset OEROOT 47 unset OEROOT
48 return 1 48 return 1
49} 49}
50
51# Generate an initial configuration for VSCode and the yocto-bitbake plugin.
52if command -v code > /dev/null && [ ! -d "$OEROOT/.vscode" ]; then
53 oe-setup-vscode "$OEROOT" "$BUILDDIR"
54fi
55
50unset OEROOT 56unset OEROOT
51 57
52[ -z "$BUILDDIR" ] || cd "$BUILDDIR" 58[ -z "$BUILDDIR" ] || cd "$BUILDDIR"