diff options
-rw-r--r-- | classes/package_deb.bbclass | 33 | ||||
-rw-r--r-- | classes/package_ipk.bbclass | 84 | ||||
-rw-r--r-- | classes/package_rpm.bbclass | 17 | ||||
-rw-r--r-- | classes/package_tar.bbclass | 14 | ||||
-rw-r--r-- | classes/rootfs_ipk.bbclass | 39 | ||||
-rw-r--r-- | classes/sdk.bbclass | 20 | ||||
-rw-r--r-- | conf/bitbake.conf | 1 | ||||
-rw-r--r-- | packages/angstrom/angstrom-x11-gpe-image.bb | 6 | ||||
-rw-r--r-- | packages/angstrom/angstrom-x11-image.bb | 6 | ||||
-rw-r--r-- | packages/angstrom/angstrom-x11-office-image.bb | 6 | ||||
-rw-r--r-- | packages/angstrom/angstrom-x11-pimlico-image.bb | 6 | ||||
-rw-r--r-- | packages/images/e-image-core.bb | 7 | ||||
-rw-r--r-- | packages/meta/meta-toolchain.bb | 55 | ||||
-rw-r--r-- | packages/tasks/task-sdk-host.bb | 24 |
14 files changed, 177 insertions, 141 deletions
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index c322af1f15..94db9238c2 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -64,9 +64,7 @@ python do_package_deb_install () { } python do_package_deb () { - import copy # to back up env data - import sys - import re + import sys, re, fcntl, copy workdir = bb.data.getVar('WORKDIR', d, 1) if not workdir: @@ -99,10 +97,21 @@ python do_package_deb () { bb.debug(1, "No packages; nothing to do") return + def lockfile(name): + lf = open(name, "a+") + fcntl.flock(lf.fileno(), fcntl.LOCK_EX) + return lf + + def unlockfile(lf): + fcntl.flock(lf.fileno(), fcntl.LOCK_UN) + lf.close + for pkg in packages.split(): localdata = bb.data.createCopy(d) root = "%s/install/%s" % (workdir, pkg) + lf = lockfile(root + ".lock") + bb.data.setVar('ROOT', '', localdata) bb.data.setVar('ROOT_%s' % pkg, root, localdata) pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1) @@ -133,6 +142,7 @@ python do_package_deb () { if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1": from bb import note note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1))) + unlockfile(lf) continue controldir = os.path.join(root, 'DEBIAN') bb.mkdirhier(controldir) @@ -246,5 +256,20 @@ python do_package_deb () { os.rmdir(controldir) except OSError: pass - del localdata + + unlockfile(lf) } + +python () { + import bb + if bb.data.getVar('PACKAGES', d, True) != '': + bb.data.setVarFlag('do_package_write_deb', 'depends', 'dpkg-native:do_populate_staging fakeroot-native:do_populate_staging', d) +} + +python do_package_write_deb () { + bb.build.exec_func("read_subpackage_metadata", d) + bb.build.exec_func("do_package_deb", d) +} +do_package_write_deb[dirs] = "${D}" +#addtask package_write_deb before do_package_write after do_package + diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index b7d378b20c..8f963b4dd5 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -6,6 +6,9 @@ BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg" PACKAGE_WRITE_FUNCS += "do_package_ipk" IMAGE_PKGTYPE ?= "ipk" +IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/ipkg.conf" +IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/ipkg-sdk.conf" + python package_ipk_fn () { from bb import data bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d) @@ -53,7 +56,7 @@ python package_ipk_install () { ret = os.system('ipkg-make-index -p %s %s ' % (os.path.join(ipkdir, "Packages"), ipkdir)) if (ret != 0 ): raise bb.build.FuncFailed - f=open(os.path.join(tmpdir, "stamps" ,"do_packages"),"w") + f=open(os.path.join(tmpdir, "stamps", "do_packages"),"w") f.close() ret = os.system('ipkg-cl -o %s -f %s update' % (rootfs, conffile)) @@ -62,10 +65,53 @@ python package_ipk_install () { raise bb.build.FuncFailed } +# +# Update the Packages index files in ${DEPLOY_DIR_IPK} +# +package_update_index_ipk () { + set -x + + ipkgarchs="${PACKAGE_ARCHS}" + + if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then + return + fi + + touch ${DEPLOY_DIR_IPK}/Packages + ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} + + for arch in $ipkgarchs; do + if [ -e ${DEPLOY_DIR_IPK}/$arch/ ] ; then + touch ${DEPLOY_DIR_IPK}/$arch/Packages + ipkg-make-index -r ${DEPLOY_DIR_IPK}/$arch/Packages -p ${DEPLOY_DIR_IPK}/$arch/Packages -l ${DEPLOY_DIR_IPK}/$arch/Packages.filelist -m ${DEPLOY_DIR_IPK}/$arch/ + fi + done +} + +# +# Generate an ipkg conf file ${IPKGCONF_TARGET} suitable for use against +# the target system and an ipkg conf file ${IPKGCONF_SDK} suitable for +# use against the host system in sdk builds +# +package_generate_ipkg_conf () { + mkdir -p ${STAGING_ETCDIR_NATIVE}/ + echo "src oe file:${DEPLOY_DIR_IPK}" > ${IPKGCONF_TARGET} + echo "src oe file:${DEPLOY_DIR_IPK}" > ${IPKGCONF_SDK} + ipkgarchs="${PACKAGE_ARCHS}" + priority=1 + for arch in $ipkgarchs; do + echo "arch $arch $priority" >> ${IPKGCONF_TARGET} + echo "arch ${BUILD_ARCH}-$arch-sdk $priority" >> ${IPKGCONF_SDK} + priority=$(expr $priority + 5) + if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then + echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET} + echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_SDK} + fi + done +} + python do_package_ipk () { - import copy # to back up env data - import sys - import re + import sys, re, fcntl, copy workdir = bb.data.getVar('WORKDIR', d, 1) if not workdir: @@ -96,16 +142,27 @@ python do_package_ipk () { tmpdir = bb.data.getVar('TMPDIR', d, 1) # Invalidate the packages file if os.access(os.path.join(tmpdir, "stamps", "do_packages"),os.R_OK): - os.unlink(os.path.join(tmpdir, "stamps" ,"do_packages")) + os.unlink(os.path.join(tmpdir, "stamps", "do_packages")) if packages == []: bb.debug(1, "No packages; nothing to do") return + def lockfile(name): + lf = open(name, "a+") + fcntl.flock(lf.fileno(), fcntl.LOCK_EX) + return lf + + def unlockfile(lf): + fcntl.flock(lf.fileno(), fcntl.LOCK_UN) + lf.close + for pkg in packages.split(): localdata = bb.data.createCopy(d) root = "%s/install/%s" % (workdir, pkg) + lf = lockfile(root + ".lock") + bb.data.setVar('ROOT', '', localdata) bb.data.setVar('ROOT_%s' % pkg, root, localdata) pkgname = bb.data.getVar('PKG_%s' % pkg, localdata, 1) @@ -134,6 +191,7 @@ python do_package_ipk () { if not g and bb.data.getVar('ALLOW_EMPTY', localdata) != "1": from bb import note note("Not creating empty archive for %s-%s-%s" % (pkg, bb.data.getVar('PV', localdata, 1), bb.data.getVar('PR', localdata, 1))) + unlockfile(lf) continue controldir = os.path.join(root, 'CONTROL') @@ -154,7 +212,7 @@ python do_package_ipk () { fields.append(["Priority: %s\n", ['PRIORITY']]) fields.append(["Maintainer: %s\n", ['MAINTAINER']]) fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']]) - fields.append(["OE: %s\n", ['P']]) + fields.append(["OE: %s\n", ['PN']]) fields.append(["Homepage: %s\n", ['HOMEPAGE']]) def pullData(l, d): @@ -241,4 +299,18 @@ python do_package_ipk () { os.rmdir(controldir) except OSError: pass + unlockfile(lf) } + +python () { + import bb + if bb.data.getVar('PACKAGES', d, True) != '': + bb.data.setVarFlag('do_package_write_ipk', 'depends', 'ipkg-utils-native:do_populate_staging fakeroot-native:do_populate_staging', d) +} + +python do_package_write_ipk () { + bb.build.exec_func("read_subpackage_metadata", d) + bb.build.exec_func("do_package_ipk", d) +} +do_package_write_ipk[dirs] = "${D}" + diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass index 4955792916..bd4a0c2798 100644 --- a/classes/package_rpm.bbclass +++ b/classes/package_rpm.bbclass @@ -54,7 +54,6 @@ python write_specfile() { except OSError: raise bb.build.FuncFailed("unable to open spec file for writing.") -# fd = sys.__stdout__ fd = specfile for var in out_vartranslate.keys(): if out_vartranslate[var][0] == "%": @@ -123,7 +122,7 @@ python do_package_rpm () { bb.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata) bb.data.update_data(localdata) -# stuff + root = bb.data.getVar('ROOT', localdata) basedir = os.path.dirname(root) pkgoutdir = outdir @@ -132,3 +131,17 @@ python do_package_rpm () { bb.build.exec_func('write_specfile', localdata) del localdata } + +python () { + import bb + if bb.data.getVar('PACKAGES', d, True) != '': + bb.data.setVarFlag('do_package_write_rpm', 'depends', 'rpm-native:do_populate_staging', d) +} + + +python do_package_write_rpm () { + bb.build.exec_func("read_subpackage_metadata", d) + bb.build.exec_func("do_package_rpm", d) +} +do_package_write_rpm[dirs] = "${D}" +#addtask package_write_rpm before do_build after do_package diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass index ced7400ac8..a56f2e2b00 100644 --- a/classes/package_tar.bbclass +++ b/classes/package_tar.bbclass @@ -98,3 +98,17 @@ python do_package_tar () { if ret != 0: bb.error("Creation of tar %s failed." % tarfn) } + +python () { + import bb + if bb.data.getVar('PACKAGES', d, True) != '': + bb.data.setVarFlag('do_package_write_tar', 'depends', 'tar-native:do_populate_staging', d) +} + + +python do_package_write_tar () { + bb.build.exec_func("read_subpackage_metadata", d) + bb.build.exec_func("do_package_tar", d) +} +do_package_write_tar[dirs] = "${D}" +#addtask package_write_tar before do_build after do_package diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index e445c0dd07..8154318311 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -8,50 +8,19 @@ do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging" do_rootfs[recrdeptask] += "do_package_write" -IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}" +IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}" DISTRO_EXTRA_RDEPENDS += " ipkg ipkg-collateral " PACKAGE_INSTALL_NO_DEPS ?= "0" -rootfs_ipk_do_indexes () { - set -x - - ipkgarchs="${PACKAGE_ARCHS}" - - if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then - touch ${DEPLOY_DIR_IPK}/Packages - ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} - fi - - for arch in $ipkgarchs; do - if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then - if [ -e ${DEPLOY_DIR_IPK}/$arch/ ] ; then - touch ${DEPLOY_DIR_IPK}/$arch/Packages - ipkg-make-index -r ${DEPLOY_DIR_IPK}/$arch/Packages -p ${DEPLOY_DIR_IPK}/$arch/Packages -l ${DEPLOY_DIR_IPK}/$arch/Packages.filelist -m ${DEPLOY_DIR_IPK}/$arch/ - fi - fi - done -} - fakeroot rootfs_ipk_do_rootfs () { set -x - rootfs_ipk_do_indexes + package_update_index_ipk + package_generate_ipkg_conf mkdir -p ${T} - #Add deploy/ipk as well for backward compat - echo "src oe file:${DEPLOY_DIR_IPK}" > ${T}/ipkg.conf - ipkgarchs="${PACKAGE_ARCHS}" - - priority=1 - for arch in $ipkgarchs; do - echo "arch $arch $priority" >> ${T}/ipkg.conf - priority=$(expr $priority + 5) - if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then - echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${T}/ipkg.conf - fi - done ipkg-cl ${IPKG_ARGS} update # Uclibc builds don't provide this stuff... @@ -71,7 +40,7 @@ fakeroot rootfs_ipk_do_rootfs () { export OFFLINE_ROOT=${IMAGE_ROOTFS} export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} mkdir -p ${IMAGE_ROOTFS}/etc/ipkg/ - grep "^arch" ${T}/ipkg.conf >${IMAGE_ROOTFS}/etc/ipkg/arch.conf + grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/ipkg/arch.conf for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.preinst; do if [ -f $i ] && ! sh $i; then diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass index 0950e3293b..8067798000 100644 --- a/classes/sdk.bbclass +++ b/classes/sdk.bbclass @@ -24,23 +24,3 @@ FILES_${PN} = "${prefix}" FILES_${PN}-dbg += "${prefix}/bin/.debug \ ${prefix}/sbin/.debug \ " - -sdk_ipk_do_indexes () { - set -x - - ipkgarchs="${PACKAGE_ARCHS}" - - if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then - touch ${DEPLOY_DIR_IPK}/Packages - ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} - fi - - for arch in $ipkgarchs; do - if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then - if [ -e ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ ] ; then - touch ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages - ipkg-make-index -r ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -p ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -l ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages.filelist -m ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ - fi - fi - done -} diff --git a/conf/bitbake.conf b/conf/bitbake.conf index e357eb1730..5f8f91240d 100644 --- a/conf/bitbake.conf +++ b/conf/bitbake.conf @@ -171,6 +171,7 @@ STAGING_BINDIR_CROSS = "${STAGING_DIR}/${BUILD_SYS}/bin/${HOST_SYS}" STAGING_BINDIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}/bin" STAGING_LIBDIR = "${STAGING_DIR}/${HOST_SYS}/lib" STAGING_LIBDIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}/lib" +STAGING_ETCDIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}/etc" STAGING_INCDIR = "${STAGING_DIR}/${HOST_SYS}/include" STAGING_DATADIR = "${STAGING_DIR}/${HOST_SYS}/share" STAGING_LOADER_DIR = "${STAGING_DIR}/${HOST_SYS}/loader" diff --git a/packages/angstrom/angstrom-x11-gpe-image.bb b/packages/angstrom/angstrom-x11-gpe-image.bb index 59ef3b95ba..ffd401b6a8 100644 --- a/packages/angstrom/angstrom-x11-gpe-image.bb +++ b/packages/angstrom/angstrom-x11-gpe-image.bb @@ -1,11 +1,5 @@ #Angstrom X11 image, with apps and kernel modules included -PREFERRED_PROVIDER_libgpewidget ?= "libgpewidget" -PREFERRED_PROVIDER_tslib ?= "tslib" -PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11" -PREFERRED_PROVIDER_virtual/libxine ?= "libxine-x11" -PREFERRED_PROVIDER_virtual/libx11 ?= "diet-x11" - ANGSTROM_EXTRA_INSTALL += " \ ${@base_contains("MACHINE_FEATURES", "phone", "openmoko-dialer2", "",d)} \ " diff --git a/packages/angstrom/angstrom-x11-image.bb b/packages/angstrom/angstrom-x11-image.bb index 4446c52a8d..e430590a7f 100644 --- a/packages/angstrom/angstrom-x11-image.bb +++ b/packages/angstrom/angstrom-x11-image.bb @@ -1,11 +1,5 @@ #Angstrom X11 image -PREFERRED_PROVIDER_libgpewidget ?= "libgpewidget" -PREFERRED_PROVIDER_tslib ?= "tslib" -PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11" -PREFERRED_PROVIDER_virtual/libxine ?= "libxine-x11" -PREFERRED_PROVIDER_virtual/libx11 ?= "diet-x11" - ANGSTROM_EXTRA_INSTALL += " \ ${@base_contains("MACHINE_FEATURES", "phone", "openmoko-dialer2", "",d)} \ " diff --git a/packages/angstrom/angstrom-x11-office-image.bb b/packages/angstrom/angstrom-x11-office-image.bb index e2c6167604..f9dcb8cf43 100644 --- a/packages/angstrom/angstrom-x11-office-image.bb +++ b/packages/angstrom/angstrom-x11-office-image.bb @@ -1,11 +1,5 @@ #Angstrom X11 image, with apps and kernel modules included -PREFERRED_PROVIDER_libgpewidget ?= "libgpewidget" -PREFERRED_PROVIDER_tslib ?= "tslib" -PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11" -PREFERRED_PROVIDER_virtual/libxine ?= "libxine-x11" -PREFERRED_PROVIDER_virtual/libx11 ?= "diet-x11" - ANGSTROM_EXTRA_INSTALL += " \ ${@base_contains("MACHINE_FEATURES", "phone", "openmoko-dialer2", "",d)} \ " diff --git a/packages/angstrom/angstrom-x11-pimlico-image.bb b/packages/angstrom/angstrom-x11-pimlico-image.bb index 1b40227347..c7acedfa0d 100644 --- a/packages/angstrom/angstrom-x11-pimlico-image.bb +++ b/packages/angstrom/angstrom-x11-pimlico-image.bb @@ -1,11 +1,5 @@ #Angstrom X11 image, with apps and kernel modules included -PREFERRED_PROVIDER_libgpewidget ?= "libgpewidget" -PREFERRED_PROVIDER_tslib ?= "tslib" -PREFERRED_PROVIDER_virtual/libsdl ?= "libsdl-x11" -PREFERRED_PROVIDER_virtual/libxine ?= "libxine-x11" -PREFERRED_PROVIDER_virtual/libx11 ?= "diet-x11" - ANGSTROM_EXTRA_INSTALL += " \ ${@base_contains("MACHINE_FEATURES", "phone", "openmoko-dialer2", "",d)} \ " diff --git a/packages/images/e-image-core.bb b/packages/images/e-image-core.bb index 3ee3932c1e..f6e0c33659 100644 --- a/packages/images/e-image-core.bb +++ b/packages/images/e-image-core.bb @@ -4,13 +4,6 @@ DEPENDS = "${MACHINE_TASK_PROVIDER} \ xserver-kdrive \ task-e-x11-core" -PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive" -PREFERRED_PROVIDER_virtual/evas = "evas-x11" -PREFERRED_PROVIDER_virtual/ecore = "ecore-x11" -PREFERRED_PROVIDER_virtual/imlib2 = "imlib2-x11" -PREFERRED_PROVIDER_virtual/libxine = "libxine-x11" -PREFERRED_PROVIDER_libx11 = "libx11" - IMAGE_INSTALL = "${MACHINE_TASK_PROVIDER} task-e-x11-core xserver-kdrive-fbdev glibc-charmap-utf-8 glibc-localedata-i18n" IMAGE_LINGUAS = "" diff --git a/packages/meta/meta-toolchain.bb b/packages/meta/meta-toolchain.bb index 415b3ca3ec..a734005819 100644 --- a/packages/meta/meta-toolchain.bb +++ b/packages/meta/meta-toolchain.bb @@ -2,67 +2,36 @@ DESCRIPTION = "Meta package for building a installable toolchain" LICENSE = "MIT" DEPENDS = "ipkg-native ipkg-utils-native fakeroot-native sed-native" -inherit rootfs_ipk sdk meta - -PACKAGES = "" - -do_build[recrdeptask] = "do_build" +inherit sdk meta SDK_DIR = "${WORKDIR}/sdk" SDK_OUTPUT = "${SDK_DIR}/image" SDK_DEPLOY = "${TMPDIR}/deploy/sdk" -IPKG_HOST = "ipkg-cl -f ${SDK_DIR}/ipkg-host.conf -o ${SDK_OUTPUT}" -IPKG_TARGET = "ipkg-cl -f ${SDK_DIR}/ipkg-target.conf -o ${SDK_OUTPUT}/${prefix}" +IPKG_HOST = "ipkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}" +IPKG_TARGET = "ipkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${prefix}" -HOST_INSTALL = "\ - binutils-cross-sdk \ - gcc-cross-sdk \ - gdb-cross" -TARGET_INSTALL = "\ - task-sdk-bare \ - " +TOOLCHAIN_HOST_TASK ?= "task-sdk-host" +TOOLCHAIN_TARGET_TASK ?= "task-sdk-bare" -RDEPENDS = "${TARGET_INSTALL} ${HOST_INSTALL}" - -sdk_ipk_do_indexes () { - set -ex - rootfs_ipk_do_indexes - set +ex -} +RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}" do_populate_sdk() { - sdk_ipk_do_indexes rm -rf ${SDK_OUTPUT} mkdir -p ${SDK_OUTPUT} - cat <<EOF >${SDK_DIR}/ipkg-host.conf -src oe file:${DEPLOY_DIR_IPK}/${BUILD_ARCH} -arch ${BUILD_ARCH} 1 -EOF - cat <<EOF >${SDK_DIR}/ipkg-target.conf -src oe file:${DEPLOY_DIR_IPK} -EOF - ipkgarchs="${PACKAGE_ARCHS}" - priority=1 - for arch in $ipkgarchs; do - echo "arch $arch $priority" >> ${SDK_DIR}/ipkg-target.conf - echo "arch ${BUILD_ARCH}-$arch-sdk $priority" >> ${SDK_DIR}/ipkg-host.conf - priority=$(expr $priority + 5) + package_update_index_ipk + package_generate_ipkg_conf + + for arch in ${PACKAGE_ARCHS}; do revipkgarchs="$arch $revipkgarchs" - if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then - echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${SDK_DIR}/ipkg-target.conf - fi done - rm -r ${SDK_OUTPUT} - mkdir -p ${SDK_OUTPUT} - ${IPKG_HOST} update - ${IPKG_HOST} -force-depends install ${HOST_INSTALL} + ${IPKG_HOST} -force-depends install ${TOOLCHAIN_HOST_TASK} ${IPKG_TARGET} update - ${IPKG_TARGET} install ${TARGET_INSTALL} + ${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK} mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} cp -pPR ${SDK_OUTPUT}/${prefix}/usr/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} diff --git a/packages/tasks/task-sdk-host.bb b/packages/tasks/task-sdk-host.bb new file mode 100644 index 0000000000..d238b46144 --- /dev/null +++ b/packages/tasks/task-sdk-host.bb @@ -0,0 +1,24 @@ +# +# Copyright (C) 2007 OpenedHand Ltd +# + +DESCRIPTION = "Host packages for the standalone SDK or external toolchain" +PR = "r1" +LICENSE = "MIT" +ALLOW_EMPTY = "1" + +inherit sdk + +PACKAGES = "${PN}" + +RDEPENDS_${PN} = "\ + binutils-cross-sdk \ + gcc-cross-sdk \ + gdb-cross-sdk \ + g++ \ + cpp \ + libgcc \ + libgcc-dev \ + libstdc++ \ + libstdc++-dev \ + " |