summaryrefslogtreecommitdiff
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2010-12-16 09:40:08 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-21 08:53:20 +0000
commit6a31a2a89e60a3890239b7ff889b9ee1c249faf5 (patch)
treee4737eebba32c602837dcec80f1e06bff4cdd490 /meta/recipes-core
parent05963b0a1b1a685a3df3d39477312bb629579fb4 (diff)
downloadopenembedded-core-6a31a2a89e60a3890239b7ff889b9ee1c249faf5.tar.gz
openembedded-core-6a31a2a89e60a3890239b7ff889b9ee1c249faf5.tar.bz2
openembedded-core-6a31a2a89e60a3890239b7ff889b9ee1c249faf5.tar.xz
openembedded-core-6a31a2a89e60a3890239b7ff889b9ee1c249faf5.zip
meta-environment: Added package of meta-environment-${TARGET_ARCH} for
environment files. [BUGID #565] Fixing bug #565, added package of meta-environment-${TARGET_ARCH} for environment files used by cross-canadian toolchain. Also corrected the situation of empty config site file for target. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/meta/meta-environment.bb64
-rw-r--r--meta/recipes-core/tasks/task-cross-canadian.bb1
2 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
new file mode 100644
index 000000000..da8d6612c
--- /dev/null
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -0,0 +1,64 @@
+DESCRIPTION = "Packge of environment files for SDK"
+LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+ file://${POKYBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LICENSE = "MIT"
+PR = "r0"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit toolchain-scripts
+# get target config site before inheritting corss-canadian
+TARGET_CONFIG_SITE := "${@siteinfo_get_files(d)}"
+
+SDK_DIR = "${WORKDIR}/sdk"
+SDK_OUTPUT = "${SDK_DIR}/image"
+SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
+
+inherit cross-canadian
+
+GXX_INCLUDEDIR := "${target_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 ${TARGET_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 7170faaa9..64e53fe3a 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} \
"