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-toolchain.bb103
1 files changed, 3 insertions, 100 deletions
diff --git a/meta/recipes-core/meta/meta-toolchain.bb b/meta/recipes-core/meta/meta-toolchain.bb
index 4aed9c276..feff9ac38 100644
--- a/meta/recipes-core/meta/meta-toolchain.bb
+++ b/meta/recipes-core/meta/meta-toolchain.bb
@@ -1,106 +1,9 @@
DESCRIPTION = "Meta package for building a installable toolchain"
LICENSE = "MIT"
-DEPENDS = "opkg-native opkg-utils-native virtual/fakeroot-native sed-native"
+
+PR = "r1"
LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
file://${POKYBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-inherit meta toolchain-scripts
-
-SDK_DIR = "${WORKDIR}/sdk"
-SDK_OUTPUT = "${SDK_DIR}/image"
-SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
-
-SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${TARGET_SYS}"
-
-IPKG_HOST = "opkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT} --force-overwrite"
-IPKG_TARGET = "opkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${SDKTARGETSYSROOT} --force-overwrite"
-
-TOOLCHAIN_HOST_TASK ?= "task-sdk-host task-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-TOOLCHAIN_TARGET_TASK ?= "task-poky-standalone-sdk-target task-poky-standalone-sdk-target-dbg"
-TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${DISTRO_VERSION}"
-
-RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
-
-EXCLUDE_FROM_WORLD = "1"
-
-do_populate_sdk() {
- rm -rf ${SDK_OUTPUT}
- mkdir -p ${SDK_OUTPUT}
- mkdir -p ${SDK_OUTPUT}${localstatedir}/lib/opkg/
- mkdir -p ${SDK_OUTPUT}/${SDKTARGETSYSROOT}${localstatedir}/lib/opkg/
-
- rm -f ${IPKGCONF_TARGET}
- touch ${IPKGCONF_TARGET}
- rm -f ${IPKGCONF_SDK}
- touch ${IPKGCONF_SDK}
-
- package_update_index_ipk
- package_generate_ipkg_conf
-
- for arch in ${PACKAGE_ARCHS}; do
- revipkgarchs="$arch $revipkgarchs"
- done
-
- ${IPKG_HOST} update
- ${IPKG_HOST} install ${TOOLCHAIN_HOST_TASK}
-
- ${IPKG_TARGET} update
- ${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK}
-
- install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg
- mv ${SDK_OUTPUT}/var/lib/opkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg/
- rm -Rf ${SDK_OUTPUT}/var
-
- # Don't ship any libGL in the SDK
- rm -rf ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/libGL*
-
- install -d ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/${sysconfdir}
- install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/${sysconfdir}/
-
- install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}
- install -m 0644 ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}/
-
- # Can copy pstage files here
- # target_pkgs=`cat ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/var/lib/opkg/status | grep Package: | cut -f 2 -d ' '`
-
- # Fix or remove broken .la files
- for i in `find ${SDK_OUTPUT}/${SDKTARGETSYSROOT} -name \*.la`; do
- sed -i -e "/^dependency_libs=/s,\([[:space:]']\)${base_libdir},\1${SDKTARGETSYSROOT}${base_libdir},g" \
- -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${SDKTARGETSYSROOT}${libdir},g" \
- -e "/^dependency_libs=/s,\-\([LR]\)${base_libdir},-\1${SDKTARGETSYSROOT}${base_libdir},g" \
- -e "/^dependency_libs=/s,\-\([LR]\)${libdir},-\1${SDKTARGETSYSROOT}${libdir},g" \
- -e 's/^installed=yes$/installed=no/' $i
- done
- #rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}/lib/*.la
- rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la
-
- # Link the ld.so.cache file into the hosts filesystem
- ln -s /etc/ld.so.cache ${SDK_OUTPUT}/${SDKPATHNATIVE}/etc/ld.so.cache
-
- # Setup site file for external use
- siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS}
- touch $siteconfig
- for sitefile in ${CONFIG_SITE} ; do
- cat $sitefile >> $siteconfig
- done
-
- toolchain_create_sdk_env_script
-
- # Add version information
- versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${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
-
- # Package it up
- mkdir -p ${SDK_DEPLOY}
- cd ${SDK_OUTPUT}
- tar --owner=root --group=root -cj --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
-}
-
-do_populate_sdk[nostamp] = "1"
-do_populate_sdk[recrdeptask] = "do_package_write"
-addtask populate_sdk before do_build after do_install
+inherit populate_sdk