diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-core/meta | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/meta')
-rw-r--r-- | meta/recipes-core/meta/buildtools-tarball.bb | 55 | ||||
-rw-r--r-- | meta/recipes-core/meta/meta-environment.bb | 77 | ||||
-rw-r--r-- | meta/recipes-core/meta/meta-ide-support.bb | 17 | ||||
-rw-r--r-- | meta/recipes-core/meta/meta-toolchain.bb | 9 | ||||
-rw-r--r-- | meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb | 18 | ||||
-rw-r--r-- | meta/recipes-core/meta/package-index.bb | 28 | ||||
-rw-r--r-- | meta/recipes-core/meta/uninative-tarball.bb | 48 |
7 files changed, 252 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb new file mode 100644 index 0000000000..302510c798 --- /dev/null +++ b/meta/recipes-core/meta/buildtools-tarball.bb | |||
@@ -0,0 +1,55 @@ | |||
1 | DESCRIPTION = "SDK type target for building a standalone tarball containing python, chrpath, make, git and tar. The \ | ||
2 | tarball can be used to run bitbake builds on systems which don't meet the usual version requirements." | ||
3 | SUMMARY = "Standalone tarball for running builds on systems with inadequate software" | ||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | ||
6 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
7 | |||
8 | TOOLCHAIN_TARGET_TASK ?= "" | ||
9 | |||
10 | TOOLCHAIN_HOST_TASK ?= "\ | ||
11 | nativesdk-python-core \ | ||
12 | nativesdk-python-modules \ | ||
13 | nativesdk-python-misc \ | ||
14 | nativesdk-python-git \ | ||
15 | nativesdk-ncurses-terminfo-base \ | ||
16 | nativesdk-chrpath \ | ||
17 | nativesdk-tar \ | ||
18 | nativesdk-buildtools-perl-dummy \ | ||
19 | nativesdk-git \ | ||
20 | nativesdk-git-perltools \ | ||
21 | nativesdk-pigz \ | ||
22 | nativesdk-make \ | ||
23 | nativesdk-wget \ | ||
24 | nativesdk-ca-certificates \ | ||
25 | " | ||
26 | |||
27 | SDK_PACKAGE_ARCHS =+ "buildtools-dummy-${SDKPKGSUFFIX}" | ||
28 | |||
29 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}" | ||
30 | |||
31 | RDEPENDS = "${TOOLCHAIN_HOST_TASK}" | ||
32 | |||
33 | EXCLUDE_FROM_WORLD = "1" | ||
34 | |||
35 | inherit meta | ||
36 | inherit populate_sdk | ||
37 | |||
38 | create_sdk_files_append () { | ||
39 | rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-* | ||
40 | rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-* | ||
41 | rm -f ${SDK_OUTPUT}/${SDKPATH}/version-* | ||
42 | |||
43 | # Generate new (mini) sdk-environment-setup file | ||
44 | script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}} | ||
45 | touch $script | ||
46 | echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script | ||
47 | # In order for the self-extraction script to correctly extract and set up things, | ||
48 | # we need a 'OECORE_NATIVE_SYSROOT=xxx' line in environment setup script. | ||
49 | # However, buildtools-tarball is inherently a tool set instead of a fully functional SDK, | ||
50 | # so instead of exporting the variable, we use a comment here. | ||
51 | echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script | ||
52 | toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS} | ||
53 | |||
54 | echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script | ||
55 | } | ||
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb new file mode 100644 index 0000000000..90959b5fce --- /dev/null +++ b/meta/recipes-core/meta/meta-environment.bb | |||
@@ -0,0 +1,77 @@ | |||
1 | SUMMARY = "Package of environment files for SDK" | ||
2 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | ||
3 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | LICENSE = "MIT" | ||
5 | PR = "r8" | ||
6 | |||
7 | EXCLUDE_FROM_WORLD = "1" | ||
8 | |||
9 | MODIFYTOS = "0" | ||
10 | |||
11 | REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}" | ||
12 | |||
13 | inherit toolchain-scripts | ||
14 | TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib" | ||
15 | |||
16 | SDK_DIR = "${WORKDIR}/sdk" | ||
17 | SDK_OUTPUT = "${SDK_DIR}/image" | ||
18 | SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}" | ||
19 | |||
20 | inherit cross-canadian | ||
21 | |||
22 | do_generate_content[nostamp] = "1" | ||
23 | do_generate_content[cleandirs] = "${SDK_OUTPUT}" | ||
24 | do_generate_content[dirs] = "${SDK_OUTPUT}/${SDKPATH}" | ||
25 | python do_generate_content() { | ||
26 | # Handle multilibs in the SDK environment, siteconfig, etc files... | ||
27 | localdata = bb.data.createCopy(d) | ||
28 | |||
29 | # make sure we only use the WORKDIR value from 'd', or it can change | ||
30 | localdata.setVar('WORKDIR', d.getVar('WORKDIR', True)) | ||
31 | |||
32 | # make sure we only use the SDKTARGETSYSROOT value from 'd' | ||
33 | localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True)) | ||
34 | localdata.setVar('libdir', d.getVar('target_libdir', False)) | ||
35 | |||
36 | # Process DEFAULTTUNE | ||
37 | bb.build.exec_func("create_sdk_files", localdata) | ||
38 | |||
39 | variants = d.getVar("MULTILIB_VARIANTS", True) or "" | ||
40 | for item in variants.split(): | ||
41 | # Load overrides from 'd' to avoid having to reset the value... | ||
42 | overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item | ||
43 | localdata.setVar("OVERRIDES", overrides) | ||
44 | localdata.setVar("MLPREFIX", item + "-") | ||
45 | bb.data.update_data(localdata) | ||
46 | bb.build.exec_func("create_sdk_files", localdata) | ||
47 | } | ||
48 | addtask generate_content before do_install after do_compile | ||
49 | |||
50 | create_sdk_files() { | ||
51 | # Setup site file for external use | ||
52 | toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS} | ||
53 | |||
54 | toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} | ||
55 | |||
56 | # Add version information | ||
57 | toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS} | ||
58 | } | ||
59 | |||
60 | do_install[nostamp] = "1" | ||
61 | do_install() { | ||
62 | install -d ${D}/${SDKPATH} | ||
63 | install -m 0644 -t ${D}/${SDKPATH} ${SDK_OUTPUT}/${SDKPATH}/* | ||
64 | } | ||
65 | |||
66 | PN = "meta-environment-${MACHINE}" | ||
67 | PACKAGES = "${PN}" | ||
68 | FILES_${PN}= " \ | ||
69 | ${SDKPATH}/* \ | ||
70 | " | ||
71 | |||
72 | do_fetch[noexec] = "1" | ||
73 | do_unpack[noexec] = "1" | ||
74 | do_patch[noexec] = "1" | ||
75 | do_configure[noexec] = "1" | ||
76 | do_compile[noexec] = "1" | ||
77 | do_populate_sysroot[noexec] = "1" | ||
diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/recipes-core/meta/meta-ide-support.bb new file mode 100644 index 0000000000..2f92912816 --- /dev/null +++ b/meta/recipes-core/meta/meta-ide-support.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "Integrated Development Environment support" | ||
2 | DESCRIPTION = "Meta package for ensuring the build directory contains all appropriate toolchain packages for using an IDE" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | ||
5 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
6 | |||
7 | DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native" | ||
8 | PR = "r3" | ||
9 | |||
10 | inherit meta toolchain-scripts | ||
11 | |||
12 | do_populate_ide_support () { | ||
13 | toolchain_create_tree_env_script | ||
14 | } | ||
15 | |||
16 | do_populate_ide_support[nostamp] = "1" | ||
17 | addtask populate_ide_support before do_build after do_install | ||
diff --git a/meta/recipes-core/meta/meta-toolchain.bb b/meta/recipes-core/meta/meta-toolchain.bb new file mode 100644 index 0000000000..ba9fd88805 --- /dev/null +++ b/meta/recipes-core/meta/meta-toolchain.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | SUMMARY = "Meta package for building a installable toolchain" | ||
2 | LICENSE = "MIT" | ||
3 | |||
4 | PR = "r7" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | ||
7 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
8 | |||
9 | inherit populate_sdk | ||
diff --git a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb new file mode 100644 index 0000000000..a3cf9d754a --- /dev/null +++ b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "Dummy package which ensures perl is excluded from buildtools" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
4 | |||
5 | inherit nativesdk | ||
6 | |||
7 | # Put it somewhere separate to ensure it's never used except when we want it | ||
8 | PACKAGE_ARCH = "buildtools-dummy-${SDKPKGSUFFIX}" | ||
9 | |||
10 | PERLPACKAGES = "nativesdk-perl \ | ||
11 | nativesdk-perl-module-file-path" | ||
12 | |||
13 | ALLOW_EMPTY_${PN} = "1" | ||
14 | |||
15 | python populate_packages_prepend() { | ||
16 | d.appendVar('RPROVIDES_${PN}', '${PERLPACKAGES}') | ||
17 | d.appendVar('RCONFLICTS_${PN}', '${PERLPACKAGES}') | ||
18 | } | ||
diff --git a/meta/recipes-core/meta/package-index.bb b/meta/recipes-core/meta/package-index.bb new file mode 100644 index 0000000000..3c46b49977 --- /dev/null +++ b/meta/recipes-core/meta/package-index.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Rebuilds the package index" | ||
2 | LICENSE = "MIT" | ||
3 | |||
4 | INHIBIT_DEFAULT_DEPS = "1" | ||
5 | PACKAGES = "" | ||
6 | |||
7 | do_fetch[noexec] = "1" | ||
8 | do_unpack[noexec] = "1" | ||
9 | do_patch[noexec] = "1" | ||
10 | do_configure[noexec] = "1" | ||
11 | do_compile[noexec] = "1" | ||
12 | do_install[noexec] = "1" | ||
13 | do_package[noexec] = "1" | ||
14 | do_packagedata[noexec] = "1" | ||
15 | do_package_write_ipk[noexec] = "1" | ||
16 | do_package_write_rpm[noexec] = "1" | ||
17 | do_package_write_deb[noexec] = "1" | ||
18 | do_populate_sysroot[noexec] = "1" | ||
19 | |||
20 | do_package_index[nostamp] = "1" | ||
21 | do_package_index[depends] += "${PACKAGEINDEXDEPS}" | ||
22 | |||
23 | python do_package_index() { | ||
24 | from oe.rootfs import generate_index_files | ||
25 | generate_index_files(d) | ||
26 | } | ||
27 | addtask do_package_index before do_build | ||
28 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb new file mode 100644 index 0000000000..e17685a117 --- /dev/null +++ b/meta/recipes-core/meta/uninative-tarball.bb | |||
@@ -0,0 +1,48 @@ | |||
1 | SUMMARY = "libc and patchelf tarball for use with uninative.bbclass" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ | ||
4 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
5 | |||
6 | TOOLCHAIN_TARGET_TASK = "" | ||
7 | |||
8 | TOOLCHAIN_HOST_TASK = "\ | ||
9 | nativesdk-glibc \ | ||
10 | nativesdk-patchelf \ | ||
11 | " | ||
12 | |||
13 | INHIBIT_DEFAULT_DEPS = "1" | ||
14 | DEPENDS += "patchelf-native" | ||
15 | |||
16 | TOOLCHAIN_OUTPUTNAME ?= "${BUILD_ARCH}-nativesdk-libc" | ||
17 | |||
18 | RDEPENDS = "${TOOLCHAIN_HOST_TASK}" | ||
19 | |||
20 | EXCLUDE_FROM_WORLD = "1" | ||
21 | |||
22 | inherit meta | ||
23 | inherit populate_sdk | ||
24 | |||
25 | deltask install | ||
26 | deltask package | ||
27 | |||
28 | SDK_PACKAGING_FUNC = "" | ||
29 | |||
30 | fakeroot 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 | |||
40 | fakeroot 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 | } | ||