From: "kai" <kai.kang@windriver.com>
To: <richard.purdie@linuxfoundation.org>
Cc: <openembedded-core@lists.openembedded.org>
Subject: [PATCH v2] toolchain-scripts.bbclass: customize prompt string for SDKs
Date: Thu, 25 Feb 2021 13:59:14 +0800 [thread overview]
Message-ID: <20210225055914.34860-1-kai.kang@windriver.com> (raw)
From: Kai Kang <kai.kang@windriver.com>
Introduce a new variable SDK_PS1 to customize prompt string for SDKs
when source script environment-setup-script.
The default prompt string of SDKs looks like:
SDK-poky-glibc-x86_64--cortexa57-qemuarm64$
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
v2: not set PS1 for buildtools-tarball
meta/classes/toolchain-scripts.bbclass | 1 +
meta/conf/bitbake.conf | 1 +
2 files changed, 2 insertions(+)
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 48af17fbf7..6075749a5e 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}"
--
2.17.1
next reply other threads:[~2021-02-25 5:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 5:59 kai [this message]
2021-02-25 15:29 ` [OE-core] [PATCH v2] toolchain-scripts.bbclass: customize prompt string for SDKs Christopher Larson
2021-02-26 1:57 ` kai
2021-02-26 2:39 ` Christopher Larson
2021-02-26 11:02 ` Richard Purdie
2021-02-26 17:25 ` kai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210225055914.34860-1-kai.kang@windriver.com \
--to=kai.kang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox