summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2025-10-30 14:03:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-04 17:25:45 +0000
commitec569c235dc5eabbeb9353ab1d8e0a3eeef574e1 (patch)
tree54a177f45001444ea147d48f5f770cfc345040fc /bitbake/bin
parent5d7abe740e26a34216236e0b00f6d2bc001e3156 (diff)
downloadpoky-ec569c235dc5eabbeb9353ab1d8e0a3eeef574e1.tar.gz
bitbake: toaster: support bitbake-setup
This adds support for the new bitbake-setup: * Maintain backwards compatibility for poky-classic releases * Assume bitbake-setup for all releases 'master' and forward * When no ".templateconf" assume Poky and not OE * Generate and use "init-build-env" script instead of 'oe-init-build-env' directly, but "cd" to the clone and not the local installation. * Include "bblayers.conf" because "cookerdata.py" now explicitly required it, and let it be over-ridden by the usual "toaster-bblayers.conf". * Force the value "TOPDIR" in "toaster.conf" to the local project's directory. Normally "cookerdata.py" sets TOPDIR from getcwd(), but somehow in bitbake-setup mode the CWD at this point has become ".../layers/openembedded-core", so "bitbake.conf and all other files cannot be found. This non-obvious problem was hard to discover. Until this is understood, the forced value will make things work. [YOCTO #16012] (Bitbake rev: 22b3fd418efc10da7e4a8c1725de285714d2396b) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/toaster21
1 files changed, 14 insertions, 7 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index f002c8c159..d20cbe90ba 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -164,14 +164,20 @@ fi
164# in the local layers that currently make using an arbitrary 164# in the local layers that currently make using an arbitrary
165# toasterconf.json difficult. 165# toasterconf.json difficult.
166 166
167. $OE_ROOT/.templateconf 167# BBSETUP no longer supports .templateconf
168if [ -n "$TEMPLATECONF" ]; then 168if [ -f $OE_ROOT/.templateconf ] ; then
169 if [ ! -d "$TEMPLATECONF" ]; then 169 . $OE_ROOT/.templateconf
170 # Allow TEMPLATECONF=meta-xyz/conf as a shortcut 170 if [ -n "$TEMPLATECONF" ]; then
171 if [ -d "$OE_ROOT/$TEMPLATECONF" ]; then 171 if [ ! -d "$TEMPLATECONF" ]; then
172 TEMPLATECONF="$OE_ROOT/$TEMPLATECONF" 172 # Allow TEMPLATECONF=meta-xyz/conf as a shortcut
173 if [ -d "$OE_ROOT/$TEMPLATECONF" ]; then
174 TEMPLATECONF="$OE_ROOT/$TEMPLATECONF"
175 fi
173 fi 176 fi
174 fi 177 fi
178else
179 # Force poky
180 TEMPLATECONF="layers/meta-yocto/meta-poky/conf/templates/default"
175fi 181fi
176 182
177unset OE_ROOT 183unset OE_ROOT
@@ -255,7 +261,8 @@ fi
255# 2) the build dir (in build) 261# 2) the build dir (in build)
256# 3) the sqlite db if that is being used. 262# 3) the sqlite db if that is being used.
257# 4) pid's we need to clean up on exit/shutdown 263# 4) pid's we need to clean up on exit/shutdown
258export TOASTER_DIR=$TOASTERDIR 264# By default we move this all into the Toaster's parent build directory
265export TOASTER_DIR=$BUILDDIR
259export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS TOASTER_DIR" 266export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS TOASTER_DIR"
260 267
261# Determine the action. If specified by arguments, fine, if not, toggle it 268# Determine the action. If specified by arguments, fine, if not, toggle it