summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2021-01-08 09:02:59 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-03 21:45:42 +0000
commit3576d8739417957026a02e01289159a72767f159 (patch)
tree4c39eb0a04b13050a735b4d3ef8c9bdb7f68b6ee
parent50f17d0a655a3a2556f9fcad67259101c2814a36 (diff)
downloadopenembedded-core-3576d8739417957026a02e01289159a72767f159.tar.gz
openembedded-core-3576d8739417957026a02e01289159a72767f159.tar.bz2
openembedded-core-3576d8739417957026a02e01289159a72767f159.zip
Customize prompt string for SDKs
Introduce a new variable SDK_PS1 to customize prompt string for SDKs when source script environment-setup-script. The prompt string of SDKs is set by default with something looks like: SDK-poky-glibc-x86_64--cortexa57-qemuarm64$ Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/toolchain-scripts.bbclass1
-rw-r--r--meta/conf/bitbake.conf1
-rw-r--r--meta/recipes-core/meta/buildtools-tarball.bb1
3 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..88df373d0b 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -45,6 +45,7 @@ toolchain_create_sdk_env_script () {
EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH' >> $script
+ echo 'export PS1="${SDK_PS1}"' >>$script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig' >> $script
echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 3438be92b7..790859e8ae 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -422,6 +422,7 @@ PKGDATA_DIR = "${TMPDIR}/pkgdata/${MACHINE}"
SDK_NAME_PREFIX ?= "oecore"
SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_ARCH}-${TUNE_PKGARCH}"
+SDK_PS1 ?= "SDK-${SDK_NAME}:\\\\$ "
SDKPATH = "/usr/local/${SDK_NAME_PREFIX}-${SDK_ARCH}"
SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 9da81d5523..59cfc64ce8 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -71,6 +71,7 @@ create_sdk_files_append () {
echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
+ echo 'export PS1="${SDK_PS1}"' >>$script
toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}