summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/recipes-core/meta
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-core/meta')
-rw-r--r--yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb59
-rw-r--r--yocto-poky/meta/recipes-core/meta/meta-environment-extsdk.bb12
-rw-r--r--yocto-poky/meta/recipes-core/meta/meta-environment.bb75
-rw-r--r--yocto-poky/meta/recipes-core/meta/meta-ide-support.bb17
-rw-r--r--yocto-poky/meta/recipes-core/meta/meta-toolchain.bb9
-rw-r--r--yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb19
-rw-r--r--yocto-poky/meta/recipes-core/meta/package-index.bb28
-rw-r--r--yocto-poky/meta/recipes-core/meta/uninative-tarball.bb50
8 files changed, 269 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb b/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
new file mode 100644
index 000000000..840434ccd
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
@@ -0,0 +1,59 @@
+DESCRIPTION = "SDK type target for building a standalone tarball containing python, chrpath, make, git and tar. The \
+ tarball can be used to run bitbake builds on systems which don't meet the usual version requirements."
+SUMMARY = "Standalone tarball for running builds on systems with inadequate software"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+TOOLCHAIN_TARGET_TASK ?= ""
+
+TOOLCHAIN_HOST_TASK ?= "\
+ nativesdk-python-core \
+ nativesdk-python-modules \
+ nativesdk-python-misc \
+ nativesdk-python-git \
+ nativesdk-python-pexpect \
+ nativesdk-ncurses-terminfo-base \
+ nativesdk-chrpath \
+ nativesdk-tar \
+ nativesdk-buildtools-perl-dummy \
+ nativesdk-git \
+ nativesdk-git-perltools \
+ nativesdk-pigz \
+ nativesdk-make \
+ nativesdk-wget \
+ nativesdk-ca-certificates \
+ "
+
+SDK_PACKAGE_ARCHS =+ "buildtools-dummy-${SDKPKGSUFFIX}"
+
+TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
+
+SDK_TITLE = "Build tools"
+
+RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
+
+EXCLUDE_FROM_WORLD = "1"
+
+inherit meta
+inherit populate_sdk
+inherit toolchain-scripts
+
+create_sdk_files_append () {
+ rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
+ rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
+ rm -f ${SDK_OUTPUT}/${SDKPATH}/version-*
+
+ # Generate new (mini) sdk-environment-setup file
+ script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
+ touch $script
+ echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
+ # In order for the self-extraction script to correctly extract and set up things,
+ # we need a 'OECORE_NATIVE_SYSROOT=xxx' line in environment setup script.
+ # However, buildtools-tarball is inherently a tool set instead of a fully functional SDK,
+ # so instead of exporting the variable, we use a comment here.
+ echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
+ toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
+
+ echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
+}
diff --git a/yocto-poky/meta/recipes-core/meta/meta-environment-extsdk.bb b/yocto-poky/meta/recipes-core/meta/meta-environment-extsdk.bb
new file mode 100644
index 000000000..d9e596143
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/meta-environment-extsdk.bb
@@ -0,0 +1,12 @@
+# meta-environment for extensible SDK
+
+require meta-environment.bb
+
+PN = "meta-environment-extsdk-${MACHINE}"
+
+create_sdk_files_append() {
+ local sysroot=${SDKPATH}/${@os.path.relpath(d.getVar('STAGING_DIR_TARGET', True), d.getVar('TOPDIR', True))}
+ local sdkpathnative=${SDKPATH}/${@os.path.relpath(d.getVar('STAGING_DIR_NATIVE',True), d.getVar('TOPDIR', True))}
+
+ toolchain_create_sdk_env_script '' '' $sysroot '' ${bindir_native} ${prefix_native} $sdkpathnative
+}
diff --git a/yocto-poky/meta/recipes-core/meta/meta-environment.bb b/yocto-poky/meta/recipes-core/meta/meta-environment.bb
new file mode 100644
index 000000000..49d45f6ec
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/meta-environment.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Package of environment files for SDK"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LICENSE = "MIT"
+PR = "r8"
+
+EXCLUDE_FROM_WORLD = "1"
+
+MODIFYTOS = "0"
+
+REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
+
+inherit toolchain-scripts
+TOOLCHAIN_NEED_CONFIGSITE_CACHE_append = " zlib"
+
+SDK_DIR = "${WORKDIR}/sdk"
+SDK_OUTPUT = "${SDK_DIR}/image"
+SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
+
+inherit cross-canadian
+
+do_generate_content[cleandirs] = "${SDK_OUTPUT}"
+do_generate_content[dirs] = "${SDK_OUTPUT}/${SDKPATH}"
+python do_generate_content() {
+ # Handle multilibs in the SDK environment, siteconfig, etc files...
+ localdata = bb.data.createCopy(d)
+
+ # make sure we only use the WORKDIR value from 'd', or it can change
+ localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
+
+ # make sure we only use the SDKTARGETSYSROOT value from 'd'
+ localdata.setVar('SDKTARGETSYSROOT', d.getVar('SDKTARGETSYSROOT', True))
+ localdata.setVar('libdir', d.getVar('target_libdir', False))
+
+ # Process DEFAULTTUNE
+ bb.build.exec_func("create_sdk_files", localdata)
+
+ variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+ for item in variants.split():
+ # Load overrides from 'd' to avoid having to reset the value...
+ overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", item + "-")
+ bb.data.update_data(localdata)
+ bb.build.exec_func("create_sdk_files", localdata)
+}
+addtask generate_content before do_install after do_compile
+
+create_sdk_files() {
+ # Setup site file for external use
+ toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}
+
+ toolchain_create_sdk_env_script ${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
+
+ # Add version information
+ toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS}
+}
+
+do_install() {
+ install -d ${D}/${SDKPATH}
+ install -m 0644 -t ${D}/${SDKPATH} ${SDK_OUTPUT}/${SDKPATH}/*
+}
+
+PN = "meta-environment-${MACHINE}"
+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_populate_sysroot[noexec] = "1"
diff --git a/yocto-poky/meta/recipes-core/meta/meta-ide-support.bb b/yocto-poky/meta/recipes-core/meta/meta-ide-support.bb
new file mode 100644
index 000000000..2f9291281
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/meta-ide-support.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Integrated Development Environment support"
+DESCRIPTION = "Meta package for ensuring the build directory contains all appropriate toolchain packages for using an IDE"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native"
+PR = "r3"
+
+inherit meta toolchain-scripts
+
+do_populate_ide_support () {
+ toolchain_create_tree_env_script
+}
+
+do_populate_ide_support[nostamp] = "1"
+addtask populate_ide_support before do_build after do_install
diff --git a/yocto-poky/meta/recipes-core/meta/meta-toolchain.bb b/yocto-poky/meta/recipes-core/meta/meta-toolchain.bb
new file mode 100644
index 000000000..ba9fd8880
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/meta-toolchain.bb
@@ -0,0 +1,9 @@
+SUMMARY = "Meta package for building a installable toolchain"
+LICENSE = "MIT"
+
+PR = "r7"
+
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+inherit populate_sdk
diff --git a/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
new file mode 100644
index 000000000..d971c3ca3
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Dummy package which ensures perl is excluded from buildtools"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit nativesdk
+
+# Put it somewhere separate to ensure it's never used except when we want it
+PACKAGE_ARCH = "buildtools-dummy-${SDKPKGSUFFIX}"
+
+PERLPACKAGES = "nativesdk-perl \
+ nativesdk-perl-module-file-path"
+
+ALLOW_EMPTY_${PN} = "1"
+
+python populate_packages_prepend() {
+ d.appendVar('RPROVIDES_${PN}', '${PERLPACKAGES}')
+ d.appendVar('RCONFLICTS_${PN}', '${PERLPACKAGES}')
+}
+
diff --git a/yocto-poky/meta/recipes-core/meta/package-index.bb b/yocto-poky/meta/recipes-core/meta/package-index.bb
new file mode 100644
index 000000000..3c46b4997
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/package-index.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Rebuilds the package index"
+LICENSE = "MIT"
+
+INHIBIT_DEFAULT_DEPS = "1"
+PACKAGES = ""
+
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_install[noexec] = "1"
+do_package[noexec] = "1"
+do_packagedata[noexec] = "1"
+do_package_write_ipk[noexec] = "1"
+do_package_write_rpm[noexec] = "1"
+do_package_write_deb[noexec] = "1"
+do_populate_sysroot[noexec] = "1"
+
+do_package_index[nostamp] = "1"
+do_package_index[depends] += "${PACKAGEINDEXDEPS}"
+
+python do_package_index() {
+ from oe.rootfs import generate_index_files
+ generate_index_files(d)
+}
+addtask do_package_index before do_build
+EXCLUDE_FROM_WORLD = "1"
diff --git a/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb b/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
new file mode 100644
index 000000000..41f7927e1
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
@@ -0,0 +1,50 @@
+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 = ""
+
+TOOLCHAIN_HOST_TASK = "\
+ nativesdk-glibc \
+ nativesdk-patchelf \
+ "
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+TOOLCHAIN_OUTPUTNAME ?= "${BUILD_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}
+ mv sysroots/${SDK_SYS} ./${BUILD_SYS}
+ rm sysroots -rf
+ patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} ./${BUILD_SYS}/usr/bin/patchelf
+ mv ./${BUILD_SYS}/usr/bin/patchelf ./${BUILD_SYS}/usr/bin/patchelf-uninative
+ tar ${SDKTAROPTS} -c -j --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
+}