* [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment
@ 2014-10-09 21:53 Otavio Salvador
2014-10-09 21:53 ` [PATCH 2/2] meta-toolchain-qt: Fix environment population Otavio Salvador
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Otavio Salvador @ 2014-10-09 21:53 UTC (permalink / raw)
To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador
Sometimes we require extra environment settings to be available on the
environment for proper SDK work. This were done, in past, using
'_append' tasks however with the split of the environment in a
canadian package this has been broken.
The easier and more flexible solution is to use environment subscripts
which are sources by the main script. These are now looked at:
$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh
and sourced.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
meta/classes/toolchain-scripts.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 6cc8eba..11ffbe5 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -72,6 +72,16 @@ toolchain_shared_env_script () {
echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
echo 'export ARCH=${ARCH}' >> $script
echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
+
+ cat >> $script <<EOF
+
+# Append environment subscripts
+if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
+ for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
+ source \$envfile
+ done
+fi
+EOF
}
#we get the cached site config in the runtime
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] meta-toolchain-qt: Fix environment population
2014-10-09 21:53 [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Otavio Salvador
@ 2014-10-09 21:53 ` Otavio Salvador
2014-10-09 23:27 ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Mark Hatle
2014-10-10 13:17 ` Paul Eggleton
2 siblings, 0 replies; 9+ messages in thread
From: Otavio Salvador @ 2014-10-09 21:53 UTC (permalink / raw)
To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador
The generation of the environment has change since the change to use a
meta-environment canadian package in the OE-Core, the SDK environment
setting has been broken. This uses the new subscript environment to
fix it.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
meta/recipes-qt/meta/meta-toolchain-qt.inc | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/meta/recipes-qt/meta/meta-toolchain-qt.inc b/meta/recipes-qt/meta/meta-toolchain-qt.inc
index 53e5322..7e75d93 100644
--- a/meta/recipes-qt/meta/meta-toolchain-qt.inc
+++ b/meta/recipes-qt/meta/meta-toolchain-qt.inc
@@ -4,29 +4,32 @@ TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${QTNAME}-${DISTRO_VERSION}"
require recipes-core/meta/meta-toolchain.bb
-QT_TOOLS_PREFIX = "${SDKPATHNATIVE}${bindir_nativesdk}"
+QT_TOOLS_PREFIX = "$OECORE_NATIVE_SYSROOT${bindir_nativesdk}"
-toolchain_create_sdk_env_script_append() {
- echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script
+create_sdk_files_append() {
+ mkdir -p ${SDK_OUTPUT}${SDKPATHNATIVE}/environment-setup.d/
+ script=${SDK_OUTPUT}${SDKPATHNATIVE}/environment-setup.d/${QT_DIR_NAME}.sh
+
+ echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' > $script
echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script
echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script
echo 'export OE_QMAKE_CC=$CC' >> $script
echo 'export OE_QMAKE_CXX=$CXX' >> $script
echo 'export OE_QMAKE_LINK=$CXX' >> $script
echo 'export OE_QMAKE_AR=$AR' >> $script
- echo 'export OE_QMAKE_LIBDIR_QT=${SDKTARGETSYSROOT}/${libdir}' >> $script
- echo 'export OE_QMAKE_INCDIR_QT=${SDKTARGETSYSROOT}/${includedir}/${QT_DIR_NAME}' >> $script
+ echo 'export OE_QMAKE_LIBDIR_QT=$OECORE_TARGET_SYSROOT${libdir}' >> $script
+ echo 'export OE_QMAKE_INCDIR_QT=$OECORE_TARGET_SYSROOT${includedir}/${QT_DIR_NAME}' >> $script
echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc4' >> $script
echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic4' >> $script
echo 'export OE_QMAKE_UIC3=${QT_TOOLS_PREFIX}/uic34' >> $script
echo 'export OE_QMAKE_RCC=${QT_TOOLS_PREFIX}/rcc4' >> $script
echo 'export OE_QMAKE_QDBUSCPP2XML=${QT_TOOLS_PREFIX}/qdbuscpp2xml4' >> $script
echo 'export OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script
- echo 'export OE_QMAKE_QT_CONFIG=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
- echo 'export QMAKESPEC=${SDKTARGETSYSROOT}/${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
- echo 'export QT_CONF_PATH=${SDKPATHNATIVE}/${sysconfdir}/qt.conf' >> $script
+ echo 'export OE_QMAKE_QT_CONFIG=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
+ echo 'export QMAKESPEC=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
+ echo 'export QT_CONF_PATH=$OECORE_NATIVE_SYSROOT${sysconfdir}/qt.conf' >> $script
# make a symbolic link to mkspecs for compatibility with Qt SDK
# and Qt Creator
- (cd ${SDK_OUTPUT}/${QT_TOOLS_PREFIX}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;)
+ (cd ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;)
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment
2014-10-09 21:53 [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Otavio Salvador
2014-10-09 21:53 ` [PATCH 2/2] meta-toolchain-qt: Fix environment population Otavio Salvador
@ 2014-10-09 23:27 ` Mark Hatle
2014-10-10 0:41 ` Otavio Salvador
2014-10-10 13:17 ` Paul Eggleton
2 siblings, 1 reply; 9+ messages in thread
From: Mark Hatle @ 2014-10-09 23:27 UTC (permalink / raw)
To: openembedded-core
On 10/9/14, 4:53 PM, Otavio Salvador wrote:
> Sometimes we require extra environment settings to be available on the
> environment for proper SDK work. This were done, in past, using
> '_append' tasks however with the split of the environment in a
> canadian package this has been broken.
>
> The easier and more flexible solution is to use environment subscripts
> which are sources by the main script. These are now looked at:
>
> $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh
>
> and sourced.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
I really like this approach. However, is there any way for the subscripts to be
arch specific?
--Mark
> ---
> meta/classes/toolchain-scripts.bbclass | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
> index 6cc8eba..11ffbe5 100644
> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -72,6 +72,16 @@ toolchain_shared_env_script () {
> echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
> echo 'export ARCH=${ARCH}' >> $script
> echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
> +
> + cat >> $script <<EOF
> +
> +# Append environment subscripts
> +if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
> + for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
> + source \$envfile
> + done
> +fi
> +EOF
> }
>
> #we get the cached site config in the runtime
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment
2014-10-09 23:27 ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Mark Hatle
@ 2014-10-10 0:41 ` Otavio Salvador
2014-10-10 0:53 ` Mark Hatle
0 siblings, 1 reply; 9+ messages in thread
From: Otavio Salvador @ 2014-10-10 0:41 UTC (permalink / raw)
To: Mark Hatle; +Cc: Patches and discussions about the oe-core layer
On Thu, Oct 9, 2014 at 8:27 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 10/9/14, 4:53 PM, Otavio Salvador wrote:
>>
>> Sometimes we require extra environment settings to be available on the
>> environment for proper SDK work. This were done, in past, using
>> '_append' tasks however with the split of the environment in a
>> canadian package this has been broken.
>>
>> The easier and more flexible solution is to use environment subscripts
>> which are sources by the main script. These are now looked at:
>>
>> $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh
>>
>> and sourced.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>
>
> I really like this approach. However, is there any way for the subscripts
> to be arch specific?
I think we can plan on that but this would be 1.8 material IMO. This
is enough for what we need today and can easily be improved in future
work. What do you think?
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment
2014-10-10 0:41 ` Otavio Salvador
@ 2014-10-10 0:53 ` Mark Hatle
2014-10-10 10:36 ` [PATCH] toolchains-scripts: Add support for target environment scripts Richard Purdie
2014-10-10 10:37 ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Richard Purdie
0 siblings, 2 replies; 9+ messages in thread
From: Mark Hatle @ 2014-10-10 0:53 UTC (permalink / raw)
To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer
On 10/9/14, 7:41 PM, Otavio Salvador wrote:
> On Thu, Oct 9, 2014 at 8:27 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
>> On 10/9/14, 4:53 PM, Otavio Salvador wrote:
>>>
>>> Sometimes we require extra environment settings to be available on the
>>> environment for proper SDK work. This were done, in past, using
>>> '_append' tasks however with the split of the environment in a
>>> canadian package this has been broken.
>>>
>>> The easier and more flexible solution is to use environment subscripts
>>> which are sources by the main script. These are now looked at:
>>>
>>> $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh
>>>
>>> and sourced.
>>>
>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>
>>
>> I really like this approach. However, is there any way for the subscripts
>> to be arch specific?
>
> I think we can plan on that but this would be 1.8 material IMO. This
> is enough for what we need today and can easily be improved in future
> work. What do you think?
>
I think it's a fairly low risk change.. I'm certainly not against it.
--Mark
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] toolchains-scripts: Add support for target environment scripts
2014-10-10 0:53 ` Mark Hatle
@ 2014-10-10 10:36 ` Richard Purdie
2014-10-10 12:31 ` Otavio Salvador
2014-10-10 10:37 ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Richard Purdie
1 sibling, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2014-10-10 10:36 UTC (permalink / raw)
To: Mark Hatle
Cc: Otavio Salvador, Patches and discussions about the oe-core layer
In a similar way to the previous script which adds support for native
environment scripts, this adds support for target environment scripts
too.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 11ffbe5..2244cf7 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -76,6 +76,11 @@ toolchain_shared_env_script () {
cat >> $script <<EOF
# Append environment subscripts
+if [ -d "\$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then
+ for envfile in \$OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do
+ source \$envfile
+ done
+fi
if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
source \$envfile
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment
2014-10-10 0:53 ` Mark Hatle
2014-10-10 10:36 ` [PATCH] toolchains-scripts: Add support for target environment scripts Richard Purdie
@ 2014-10-10 10:37 ` Richard Purdie
1 sibling, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2014-10-10 10:37 UTC (permalink / raw)
To: Mark Hatle
Cc: Otavio Salvador, Patches and discussions about the oe-core layer
On Thu, 2014-10-09 at 19:53 -0500, Mark Hatle wrote:
> On 10/9/14, 7:41 PM, Otavio Salvador wrote:
> > On Thu, Oct 9, 2014 at 8:27 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> >> On 10/9/14, 4:53 PM, Otavio Salvador wrote:
> >>>
> >>> Sometimes we require extra environment settings to be available on the
> >>> environment for proper SDK work. This were done, in past, using
> >>> '_append' tasks however with the split of the environment in a
> >>> canadian package this has been broken.
> >>>
> >>> The easier and more flexible solution is to use environment subscripts
> >>> which are sources by the main script. These are now looked at:
> >>>
> >>> $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh
> >>>
> >>> and sourced.
> >>>
> >>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >>
> >>
> >> I really like this approach. However, is there any way for the subscripts
> >> to be arch specific?
> >
> > I think we can plan on that but this would be 1.8 material IMO. This
> > is enough for what we need today and can easily be improved in future
> > work. What do you think?
> >
>
> I think it's a fairly low risk change.. I'm certainly not against it.
We can easily add the target part too, I've just sent out a patch which
does this. I do agree that this is probably a good way forward for being
able to extend the scripts.
Cheers,
Richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] toolchains-scripts: Add support for target environment scripts
2014-10-10 10:36 ` [PATCH] toolchains-scripts: Add support for target environment scripts Richard Purdie
@ 2014-10-10 12:31 ` Otavio Salvador
0 siblings, 0 replies; 9+ messages in thread
From: Otavio Salvador @ 2014-10-10 12:31 UTC (permalink / raw)
To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer
On Fri, Oct 10, 2014 at 7:36 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> In a similar way to the previous script which adds support for native
> environment scripts, this adds support for target environment scripts
> too.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment
2014-10-09 21:53 [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Otavio Salvador
2014-10-09 21:53 ` [PATCH 2/2] meta-toolchain-qt: Fix environment population Otavio Salvador
2014-10-09 23:27 ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Mark Hatle
@ 2014-10-10 13:17 ` Paul Eggleton
2 siblings, 0 replies; 9+ messages in thread
From: Paul Eggleton @ 2014-10-10 13:17 UTC (permalink / raw)
To: Otavio Salvador; +Cc: openembedded-core
On Thursday 09 October 2014 18:53:13 Otavio Salvador wrote:
> Sometimes we require extra environment settings to be available on the
> environment for proper SDK work. This were done, in past, using
> '_append' tasks however with the split of the environment in a
> canadian package this has been broken.
>
> The easier and more flexible solution is to use environment subscripts
> which are sources by the main script. These are now looked at:
>
> $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh
>
> and sourced.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> meta/classes/toolchain-scripts.bbclass | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/meta/classes/toolchain-scripts.bbclass
> b/meta/classes/toolchain-scripts.bbclass index 6cc8eba..11ffbe5 100644
> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -72,6 +72,16 @@ toolchain_shared_env_script () {
> echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
> echo 'export ARCH=${ARCH}' >> $script
> echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
> +
> + cat >> $script <<EOF
> +
> +# Append environment subscripts
> +if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
> + for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
> + source \$envfile
> + done
> +fi
> +EOF
> }
>
> #we get the cached site config in the runtime
This series looks great to me, and adds a much better extension mechanism than
we've had here previously.
Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-10-10 13:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-09 21:53 [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Otavio Salvador
2014-10-09 21:53 ` [PATCH 2/2] meta-toolchain-qt: Fix environment population Otavio Salvador
2014-10-09 23:27 ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Mark Hatle
2014-10-10 0:41 ` Otavio Salvador
2014-10-10 0:53 ` Mark Hatle
2014-10-10 10:36 ` [PATCH] toolchains-scripts: Add support for target environment scripts Richard Purdie
2014-10-10 12:31 ` Otavio Salvador
2014-10-10 10:37 ` [PATCH 1/2] toolchain-scripts.bbclass: Allow sourcing of subscript for environment Richard Purdie
2014-10-10 13:17 ` Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.