All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Fix bug #565.
  2010-12-13 12:07 [PATCH 0/1] bug#565: adding environment files Lianhao Lu
@ 2010-12-13 10:47 ` Lianhao Lu
  2010-12-13 19:12 ` [PATCH 0/1] bug#565: adding environment files Saul Wold
  1 sibling, 0 replies; 4+ messages in thread
From: Lianhao Lu @ 2010-12-13 10:47 UTC (permalink / raw)
  To: yocto

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

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 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

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index c393d99..4093635 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -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
+}
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
new file mode 100644
index 0000000..e8d4a80
--- /dev/null
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -0,0 +1,74 @@
+DESCRIPTION = "Packge of environment files for SDK"
+LICENSE = "MIT"
+PR = "r0"
+
+inherit meta toolchain-scripts
+
+TRANSLATED_TARGET_ARCH ?= "${TARGET_ARCH}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+SDK_DIR = "${WORKDIR}/sdk"
+SDK_OUTPUT = "${SDK_DIR}/image"
+SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
+
+SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
+
+# Save MULTIMACH_TARGET_SYS
+OLD_MULTIMACH_TARGET_SYS := "${MULTIMACH_TARGET_SYS}"
+MULTIMACH_TARGET_SYS = "${MULTIMACH_ARCH}${SDK_VENDOR}-${SDK_OS}"
+
+# Save PACKAGE_ARCH
+OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
+BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
+
+#change SSTATE_PKGARCH due to the PACKAGE_ARCH change
+SSTATE_PKGARCH = "${SDK_ARCH}"
+
+CONFIG_SITE = "${@siteinfo_get_files(d)}"
+GXX_INCLUDEDIR := "${includedir}/c++"
+
+do_generate_content[nostamp] = "1"
+do_generate_content() {
+
+    rm -rf ${SDK_OUTPUT}
+    mkdir -p ${SDK_OUTPUT}/${SDKPATH}
+
+    siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${OLD_MULTIMACH_TARGET_SYS}
+    
+    touch $siteconfig
+    for sitefile in ${CONFIG_SITE} ; do
+	cat $sitefile >> $siteconfig
+    done
+
+    toolchain_create_sdk_env_script_for_installer
+
+    # Add version information
+    versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${OLD_MULTIMACH_TARGET_SYS}
+    touch $versionfile
+    echo 'Distro: ${DISTRO}' >> $versionfile
+    echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
+    echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
+    echo 'Timestamp: ${DATETIME}' >> $versionfile
+}
+do_generate_content[recrdeptask] = "do_compile"
+addtask generate_content before do_install after do_compile
+
+do_install[nostamp] = "1"
+do_install() {
+    install -d ${D}/${SDKPATH}
+    install -m 0644 -t ${D}/${SDKPATH} ${SDK_OUTPUT}/${SDKPATH}/*
+}
+
+PN = "meta-environment-${TRANSLATED_TARGET_ARCH}"
+PACKAGES = "${PN}"
+FILES_${PN}= " \
+    ${SDKPATH}/* \
+    "
+
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_populage_sysroot[noexec] = "1"
diff --git a/meta/recipes-core/tasks/task-cross-canadian.bb b/meta/recipes-core/tasks/task-cross-canadian.bb
index 7170faa..64e53fe 100644
--- a/meta/recipes-core/tasks/task-cross-canadian.bb
+++ b/meta/recipes-core/tasks/task-cross-canadian.bb
@@ -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} \
     "
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 0/1] bug#565: adding environment files
@ 2010-12-13 12:07 Lianhao Lu
  2010-12-13 10:47 ` [PATCH 1/1] Fix bug #565 Lianhao Lu
  2010-12-13 19:12 ` [PATCH 0/1] bug#565: adding environment files Saul Wold
  0 siblings, 2 replies; 4+ messages in thread
From: Lianhao Lu @ 2010-12-13 12:07 UTC (permalink / raw)
  To: yocto

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 <lianhao.lu@intel.com>
---


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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/1] bug#565: adding environment files
  2010-12-13 12:07 [PATCH 0/1] bug#565: adding environment files Lianhao Lu
  2010-12-13 10:47 ` [PATCH 1/1] Fix bug #565 Lianhao Lu
@ 2010-12-13 19:12 ` Saul Wold
  2010-12-16  1:58   ` Lu, Lianhao
  1 sibling, 1 reply; 4+ messages in thread
From: Saul Wold @ 2010-12-13 19:12 UTC (permalink / raw)
  To: yocto

On 12/13/2010 04:07 AM, Lianhao Lu wrote:
> 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 
poky@yoctoproject.org for bug submissions.

Sau!

> 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<lianhao.lu@intel.com>
> ---
>
>
> 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
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/1] bug#565: adding environment files
  2010-12-13 19:12 ` [PATCH 0/1] bug#565: adding environment files Saul Wold
@ 2010-12-16  1:58   ` Lu, Lianhao
  0 siblings, 0 replies; 4+ messages in thread
From: Lu, Lianhao @ 2010-12-16  1:58 UTC (permalink / raw)
  To: Saul Wold, yocto@yoctoproject.org

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:
> On 12/13/2010 04:07 AM, Lianhao Lu wrote:
>> 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
> poky@yoctoproject.org for bug submissions.
> 
> Sau!
> 
>> 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<lianhao.lu@intel.com>
>> ---
>> 
>> 
>> 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
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>> 
> 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

Best Regards,
Lianhao




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-16  1:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-13 12:07 [PATCH 0/1] bug#565: adding environment files Lianhao Lu
2010-12-13 10:47 ` [PATCH 1/1] Fix bug #565 Lianhao Lu
2010-12-13 19:12 ` [PATCH 0/1] bug#565: adding environment files Saul Wold
2010-12-16  1:58   ` Lu, Lianhao

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.