Skip to contentSkip to conversation

bug#565: adding environment files

PATCH In review Lianhao Lu 2 participants 4 messages Dec 13, 2010 – Dec 16, 2010

lore
Share & tools
lore

Lianhao Lu

author
#0 lore raw

cover bug#565: adding environment files

I rebased the previous patch of adding package of environment files to be compatible with the new cross-canadian.bbclass

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: llu/bug565
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bug565

Thanks,
Lianhao Lu <[email protected]>
---

Lianhao Lu (1):
Fix bug #565.

 meta/classes/toolchain-scripts.bbclass         |   32 ++++++++++
 meta/recipes-core/meta/meta-environment.bb     |   74 ++++++++++++++++++++++++
 meta/recipes-core/tasks/task-cross-canadian.bb |    1 +
 3 files changed, 107 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/meta/meta-environment.bb
author
#1 lore raw

PATCH 1/1 Fix bug #565.

Added package of meta-environment-${TARGET_ARCH} for environment files.

---
 meta/classes/toolchain-scripts.bbclass         |   32 ++++++++++
 meta/recipes-core/meta/meta-environment.bb     |   74 ++++++++++++++++++++++++
 meta/recipes-core/tasks/task-cross-canadian.bb |    1 +
 3 files changed, 107 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/meta/meta-environment.bb
meta/classes/toolchain-scripts.bbclass +32 -0
index c393d99..4093635 100644
@@ -60,3 +60,35 @@ toolchain_create_tree_env_script () {
 	echo 'export POKY_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
 	echo 'export POKY_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script
 }
+
+# This function creates an environment-setup-script for use by the ADT installer
+toolchain_create_sdk_env_script_for_installer () {
+	# Create environment setup script
+	script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${OLD_MULTIMACH_TARGET_SYS}
+	rm -f $script
+	touch $script
+	echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${OLD_MULTIMACH_TARGET_SYS}:$PATH' >> $script
+	echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script
+	echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${libdir}/pkgconfig' >> $script
+	echo 'export CONFIG_SITE=${SDKPATH}/site-config-${OLD_MULTIMACH_TARGET_SYS}' >> $script
+	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
+	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
+	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
+	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
+	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux"' >> $script
+	if [ "${TARGET_OS}" = "darwin8" ]; then
+		echo 'export TARGET_CFLAGS="-I##SDKTARGETSYSROOT##${includedir}"' >> $script
+		echo 'export TARGET_LDFLAGS="-L##SDKTARGETSYSROOT##{libdir}"' >> $script
+		# Workaround darwin toolchain sysroot path problems
+		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
+		ln -s /usr/local local
+	fi
+	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
+	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT## -I##SDKTARGETSYSROOT##${GXX_INCLUDEDIR}"' >> $script
+	echo "# alias opkg='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKPATHNATIVE}/${sysconfdir}/opkg-sdk.conf -o ${SDKPATHNATIVE}'" >> $script
+	echo "# alias opkg-target='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ##SDKTARGETSYSROOT##${sysconfdir}/opkg.conf -o ##SDKTARGETSYSROOT##'" >> $script
+	echo 'export POKY_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
+	echo 'export POKY_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script
+	echo 'export POKY_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
+	echo 'export POKY_SDK_VERSION="${SDK_VERSION}"' >> $script
+}
meta/recipes-core/meta/meta-environment.bb new file +74 -0

74 lines not on this page · raw message

meta/recipes-core/tasks/task-cross-canadian.bb +1 -0
index 7170faa..64e53fe 100644
@@ -12,5 +12,6 @@ RDEPENDS_${PN} = "\
     binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
     gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
     gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+    meta-environment-${TRANSLATED_TARGET_ARCH} \
     "
 
Signature · 1 line
1.7.0.4
#2 lore raw
In reply to Lianhao Lu
Quoted 3 lines · Lianhao Lu

I rebased the previous patch of adding package of environment files to be compatible with the new cross-canadian.bbclass

Lianhao,

This may require Richard to look at a little more closely, I do notice that you are missing the LIC_FILES_CHKSUM, for this on you can use one similar to recipes-core/tasks/task-base.bb

The first line of the commit message synopsis needs to be more descriptive, and the bug id needs to be in the commit message so that we can parse it out later.

Synopsis is normally
<recipe | file> : Synopsis

Example:
meta-environment: Added package of meta-environment-${TARGET_ARCH} for environment files.

In the body of the commit message you can add the bug id according to this format:

[BUGID# NNN], where NNN is the bugid

Please fix these issues and resubmit, also you should use the [email protected] for bug submissions.

Sau!

Quoted 23 lines

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: llu/bug565
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bug565

Thanks,
Lianhao Lu<[email protected]>
---

Lianhao Lu (1):

   Fix bug #565.
  meta/classes/toolchain-scripts.bbclass         |   32 ++++++++++
  meta/recipes-core/meta/meta-environment.bb     |   74 ++++++++++++++++++++++++
  meta/recipes-core/tasks/task-cross-canadian.bb |    1 +
  3 files changed, 107 insertions(+), 0 deletions(-)

create mode 100644 meta/recipes-core/meta/meta-environment.bb

_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#3 lore raw

Hi Saul,

I've fixed and resubmitted the patch. Sorry for not following the patch submission convention.

Best Regards,
-Lianhao

Saul Wold wrote on 2010-12-14:

Quoted 55 lines · Lianhao Lu
Quoted 3 lines

I rebased the previous patch of adding package of environment files to be compatible with the new cross-canadian.bbclass

Lianhao,

This may require Richard to look at a little more closely, I do notice that you are missing the LIC_FILES_CHKSUM, for this on you can use one similar to recipes-core/tasks/task-base.bb

The first line of the commit message synopsis needs to be more descriptive, and the bug id needs to be in the commit message so that we can parse it out later.

Synopsis is normally
<recipe | file> : Synopsis

Example:
meta-environment: Added package of meta-environment-${TARGET_ARCH} for environment files.

In the body of the commit message you can add the bug id according to this format:

[BUGID# NNN], where NNN is the bugid

Please fix these issues and resubmit, also you should use the [email protected] for bug submissions.

Sau!

Quoted 14 lines

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: llu/bug565
Browse:
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bug565

Thanks,
Lianhao Lu<[email protected]>
---

Lianhao Lu (1):

   Fix bug #565.
  meta/classes/toolchain-scripts.bbclass         |   32 ++++++++++
  meta/recipes-core/meta/meta-environment.bb     |   74
Quoted 9 lines

++++++++++++++++++++++++
meta/recipes-core/tasks/task-cross-canadian.bb | 1 + 3 files
changed, 107 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/meta/meta-environment.bb
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Quoted 4 lines

_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Best Regards,
Lianhao