summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2016-08-17 14:31:25 -0500
committerPatrick Williams <patrick@stwcx.xyz>2016-08-22 16:43:26 +0000
commit60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch)
treeecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
parente18c61205e0234b03697129c20cc69c9b3940efc (diff)
downloadtalos-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz
talos-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to hold all of the layers that we import with git-subtree. Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb')
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb56
1 files changed, 56 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
new file mode 100644
index 000000000..a983e42c6
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
@@ -0,0 +1,56 @@
+SUMMARY = "libc and patchelf tarball for use with uninative.bbclass"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+TOOLCHAIN_TARGET_TASK = ""
+
+# ibm850 - mcopy from mtools
+# iso8859-1 - guile
+TOOLCHAIN_HOST_TASK = "\
+ nativesdk-glibc \
+ nativesdk-glibc-gconv-ibm850 \
+ nativesdk-glibc-gconv-iso8859-1 \
+ nativesdk-patchelf \
+ "
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-nativesdk-libc"
+
+RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit meta
+inherit populate_sdk
+
+deltask install
+deltask package
+deltask packagedata
+
+SDK_DEPENDS += "patchelf-native"
+
+SDK_PACKAGING_FUNC = ""
+
+fakeroot create_sdk_files() {
+ cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
+
+ # Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
+ # Escape special characters like '+' and '.' in the SDKPATH
+ escaped_sdkpath=$(echo ${SDKPATH}/sysroots/${SDK_SYS} |sed -e "s:[\+\.]:\\\\\\\\\0:g")
+ sed -i -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" ${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py
+}
+
+
+fakeroot tar_sdk() {
+ mkdir -p ${SDK_DEPLOY}
+ cd ${SDK_OUTPUT}/${SDKPATH}
+
+ DEST="./${SDK_ARCH}-${SDK_OS}"
+ mv sysroots/${SDK_SYS} $DEST
+ rm sysroots -rf
+ patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} $DEST/usr/bin/patchelf
+ mv $DEST/usr/bin/patchelf $DEST/usr/bin/patchelf-uninative
+ tar ${SDKTAROPTS} -c -j --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
+}
OpenPOWER on IntegriCloud