Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "kai" <kai.kang@windriver.com>
To: Christopher Larson <kergoth@gmail.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH v2] toolchain-scripts.bbclass: customize prompt string for SDKs
Date: Fri, 26 Feb 2021 09:57:00 +0800	[thread overview]
Message-ID: <0a2eff5a-9121-e31f-abee-47c096799e85@windriver.com> (raw)
In-Reply-To: <CABcZANm-+8uOoAskLz7GM4DDGrYM4c2O4NZyAz2WuHhdiH7jMg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3235 bytes --]

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.kang@windriver.com 
> <mailto:kai.kang@windriver.com>> wrote:
>
>     From: Kai Kang <kai.kang@windriver.com
>     <mailto: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
>     <mailto: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
>
>
>     
>
>
>
> -- 
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics


-- 
Kai Kang
Wind River Linux


[-- Attachment #2: Type: text/html, Size: 5367 bytes --]

  reply	other threads:[~2021-02-26  1:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25  5:59 [PATCH v2] toolchain-scripts.bbclass: customize prompt string for SDKs kai
2021-02-25 15:29 ` [OE-core] " Christopher Larson
2021-02-26  1:57   ` kai [this message]
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=0a2eff5a-9121-e31f-abee-47c096799e85@windriver.com \
    --to=kai.kang@windriver.com \
    --cc=kergoth@gmail.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