summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/meta/uninative-tarball.bb48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb
new file mode 100644
index 0000000000..ed1279f09b
--- /dev/null
+++ b/meta/recipes-core/meta/uninative-tarball.bb
@@ -0,0 +1,48 @@
1SUMMARY = "libc and patchelf tarball for use with uninative.bbclass"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
4 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
5
6TOOLCHAIN_TARGET_TASK = ""
7
8TOOLCHAIN_HOST_TASK = "\
9 nativesdk-eglibc \
10 nativesdk-patchelf \
11 "
12
13INHIBIT_DEFAULT_DEPS = "1"
14DEPENDS += "patchelf-native"
15
16TOOLCHAIN_OUTPUTNAME ?= "${BUILD_ARCH}-nativesdk-libc"
17
18RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
19
20EXCLUDE_FROM_WORLD = "1"
21
22inherit meta
23inherit populate_sdk
24
25deltask install
26deltask package
27
28SDK_PACKAGING_FUNC = ""
29
30fakeroot create_sdk_files() {
31 cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
32
33 # Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
34 # Escape special characters like '+' and '.' in the SDKPATH
35 escaped_sdkpath=$(echo ${SDKPATH}/sysroots/${SDK_SYS} |sed -e "s:[\+\.]:\\\\\\\\\0:g")
36 sed -i -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" ${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py
37}
38
39
40fakeroot tar_sdk() {
41 mkdir -p ${SDK_DEPLOY}
42 cd ${SDK_OUTPUT}/${SDKPATH}
43 mv sysroots/${SDK_SYS} ./${BUILD_SYS}
44 rm sysroots -rf
45 patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} ./${BUILD_SYS}/usr/bin/patchelf
46 mv ./${BUILD_SYS}/usr/bin/patchelf ./${BUILD_SYS}/usr/bin/patchelf-uninative
47 tar ${SDKTAROPTS} -c --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
48}