summaryrefslogtreecommitdiff
path: root/meta/recipes-core
diff options
context:
space:
mode:
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 0000000000..da8d6612c9
--- /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 7170faaa96..64e53fe3a5 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} \
"