On 2/25/21 11:29 PM, Christopher Larson wrote:
Are we sure we want to completely override it rather than adding to
it? I'd be rather irritated if this blows away my prompt without my
asking for it. I think either it should append or have a variable
controlling whether this is enabled when building the SDK.
The original requirement is that the PS1 after source sdk environment
file is as same as the original one. It can not tell whether in a sdk
environment.
The default assignment of SDK_PS1 is '?=', you can set it in conf file
to override it.
Regards,
Kai
On Wed, Feb 24, 2021 at 10:59 PM kai <kai.k...@windriver.com
<mailto:kai.k...@windriver.com>> wrote:
From: Kai Kang <kai.k...@windriver.com
<mailto:kai.k...@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.k...@windriver.com
<mailto:kai.k...@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
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
--
Kai Kang
Wind River Linux
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148632):
https://lists.openembedded.org/g/openembedded-core/message/148632
Mute This Topic: https://lists.openembedded.org/mt/80896619/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-