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.

On Wed, Feb 24, 2021 at 10:59 PM kai <[email protected]> wrote:

> From: Kai Kang <[email protected]>
>
> 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 <[email protected]>
> ---
> 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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148599): 
https://lists.openembedded.org/g/openembedded-core/message/148599
Mute This Topic: https://lists.openembedded.org/mt/80896619/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to