* [PATCH 1/2] populate_sdk_ext: Add variable to indicate running in eSDK
@ 2017-07-17 16:20 Saul Wold
2017-07-17 16:20 ` [PATCH 2/2 v4] pkgconfig: allow kernel to be build with esdk Saul Wold
0 siblings, 1 reply; 2+ messages in thread
From: Saul Wold @ 2017-07-17 16:20 UTC (permalink / raw)
To: openembedded-core, richard.purdie
This allows for other scripts to know that they are being executed in
the context of the eSDK in order to provide different behaviour as
needed.
[YOCTO #11155]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
meta/classes/populate_sdk_ext.bbclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 4791d74..c70c435 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -352,6 +352,9 @@ python copy_buildsystem () {
# Hide the config information from bitbake output (since it's fixed within the SDK)
f.write('BUILDCFG_HEADER = ""\n\n')
+ f.write('# Provide a flag to indicate we are in the EXT_SDK Context\n')
+ f.write('WITHIN_EXT_SDK = "1"\n\n')
+
# Map gcc-dependent uninative sstate cache for installer usage
f.write('SSTATE_MIRRORS += " file://universal/(.*) file://universal-4.9/\\1 file://universal-4.9/(.*) file://universal-4.8/\\1"\n\n')
--
2.7.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2 v4] pkgconfig: allow kernel to be build with esdk
2017-07-17 16:20 [PATCH 1/2] populate_sdk_ext: Add variable to indicate running in eSDK Saul Wold
@ 2017-07-17 16:20 ` Saul Wold
0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2017-07-17 16:20 UTC (permalink / raw)
To: openembedded-core, richard.purdie
When the kernel's menuconfig target is called while using the esdk or an
esdk-based container, the pkg-config info that is found is not correct.
The pkg-config info is for the target, but we need the eSDK's information
in order to build the host based menuconfig.
The new pkg-config-esdk script checks both that it's in SDK and being
called from the check-lxdialog script in order to limit the scope of when
the pkg-config automagically switches to pkg-config-native.
The pkg-config-esdk is only installed as pkg-config inside the eSDK, which
is why we use the sstate post install script and check for if we are in the
esdk environment using the WITHIN_EXT_SDK
[YOCTO #11155]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
.../pkgconfig/pkgconfig/pkg-config-esdk.in | 24 ++++++++++++++++++++++
meta/recipes-devtools/pkgconfig/pkgconfig_git.bb | 16 +++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
new file mode 100644
index 0000000..4fc9b0a
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Orignal pkg-config-native action when called as pkg-config-native
+# NO Change here
+if [ "pkg-config-native" = "`basename $0`" ] ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+else
+ # in this case check if we are in the esdk
+ if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then
+ parentpid=`ps -o ppid= -p $$`
+ parentpid_info=`ps -wo comm= -o args= -p $parentpid`
+
+ # check if we are being called from the kernel's make menuconfig
+ if ( echo $parentpid_info | grep -q check-lxdialog ) ; then
+ PKG_CONFIG_PATH="@PATH_NATIVE@"
+ PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+ unset PKG_CONFIG_SYSROOT_DIR
+ fi
+ fi
+fi
+
+pkg-config.real "$@"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index e634021..52ef2a9 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -12,6 +12,7 @@ SRCREV = "edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b"
PV = "0.29.2+git${SRCPV}"
SRC_URI = "git://anongit.freedesktop.org/pkg-config \
+ file://pkg-config-esdk.in \
file://pkg-config-native.in \
file://fix-glib-configure-libtool-usage.patch \
file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
@@ -54,4 +55,19 @@ do_install_append_class-native () {
-e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
< ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+ sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+ -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+ < ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
+ install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
}
+
+pkgconfig_sstate_fixup_esdk () {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
+ pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
+ mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
+ lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+ sed -i -e "s|^pkg-config|pkg-config.real|" $pkgconfdir/pkg-config-native
+ fi
+}
+
+SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconfig_sstate_fixup_esdk"
--
2.7.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-17 16:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17 16:20 [PATCH 1/2] populate_sdk_ext: Add variable to indicate running in eSDK Saul Wold
2017-07-17 16:20 ` [PATCH 2/2 v4] pkgconfig: allow kernel to be build with esdk Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox