diff options
author | Richard Purdie <richard@openedhand.com> | 2007-06-13 23:35:51 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-06-13 23:35:51 +0000 |
commit | c66c397c55a832e087ec1cbde6b3145d6cdca5f3 (patch) | |
tree | 4daf1399d3f969b8c604a7d39a51edde8a39d98d /meta | |
parent | f932b25caa2c9aad04184ec0e00ab7f977e2c532 (diff) | |
download | openembedded-core-c66c397c55a832e087ec1cbde6b3145d6cdca5f3.tar.gz openembedded-core-c66c397c55a832e087ec1cbde6b3145d6cdca5f3.tar.bz2 openembedded-core-c66c397c55a832e087ec1cbde6b3145d6cdca5f3.tar.xz openembedded-core-c66c397c55a832e087ec1cbde6b3145d6cdca5f3.zip |
meta-toolchain: Add ipks, pkgdata, pkgmaps and shlibs data to sdk archive. Add external-poky-toolchain to reassemble this.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1932 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r-- | meta/packages/meta/external-poky-toolchain.bb | 32 | ||||
-rw-r--r-- | meta/packages/meta/meta-toolchain.bb | 39 |
2 files changed, 69 insertions, 2 deletions
diff --git a/meta/packages/meta/external-poky-toolchain.bb b/meta/packages/meta/external-poky-toolchain.bb new file mode 100644 index 000000000..7cf657f5c --- /dev/null +++ b/meta/packages/meta/external-poky-toolchain.bb @@ -0,0 +1,32 @@ +PROVIDES = "\ + linux-libc-headers \ + virtual/arm-poky-linux-gnueabi-gcc \ + virtual/arm-poky-linux-gnueabi-gcc-initial \ + virtual/arm-poky-linux-binutils \ + virtual/arm-poky-linux-libc-for-gcc \ + virtual/libc \ + virtual/libintl \ + virtual/libiconv \ + glibc-thread-db \ + virtual/linux-libc-headers " +PR = "r1" + +inherit sdk + +do_stage() { + if [ ! -e ${prefix}/package-status ]; then + echo "The Poky toolchain could not be found in ${prefix}!" + exit 1 + fi + + install -d ${DEPLOY_DIR}/ipk/ + install -d ${STAGING_DIR}/pkgdata/ + install -d ${STAGING_DIR}/pkgmaps/ + install -d ${STAGING_DIR}/${TARGET_SYS}/shlibs/ + + cp -ar ${prefix}/ipk/* ${DEPLOY_DIR}/ipk/ + cp -ar ${prefix}/pkgdata/* ${STAGING_DIR}/pkgdata/ + cp -ar ${prefix}/pkgmaps/* ${STAGING_DIR}/pkgmaps/ + cp -ar ${prefix}/${TARGET_SYS}/shlibs/* ${STAGING_DIR}/${TARGET_SYS}/shlibs/ +} + diff --git a/meta/packages/meta/meta-toolchain.bb b/meta/packages/meta/meta-toolchain.bb index fbb2e92ee..bf922cd31 100644 --- a/meta/packages/meta/meta-toolchain.bb +++ b/meta/packages/meta/meta-toolchain.bb @@ -73,11 +73,46 @@ EOF echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libpthread.so echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libc.so + # remove unwanted housekeeping files mv ${SDK_OUTPUT}${libdir}/../${TARGET_SYS}/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status - rm -rf ${SDK_OUTPUT}${libdir}/ipkg + rm -Rf ${SDK_OUTPUT}${libdir}/ipkg mv ${SDK_OUTPUT}/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status-host - rm -rf ${SDK_OUTPUT}/usr/lib/ipkg + rm -Rf ${SDK_OUTPUT}/usr/lib/ipkg + + # extract and store ipks, pkgdata, pkgmaps and shlibs data + target_pkgs=`cat ${SDK_OUTPUT}/${prefix}/package-status | grep Package: | cut -f 2 -d ' '` + mkdir -p ${SDK_OUTPUT}/${prefix}/ipk/ + mkdir -p ${SDK_OUTPUT}/${prefix}/pkgdata/runtime/ + mkdir -p ${SDK_OUTPUT}/${prefix}/pkgmaps/debian/ + mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/shlibs/ + for pkg in $target_pkgs ; do + for arch in $ipkgarchs; do + echo "Looking for ${DEPLOY_DIR_IPK}/${pkg}_$arch.ipk" + if [ -e ${DEPLOY_DIR_IPK}/${pkg}_*_$arch.ipk ]; then + cp ${DEPLOY_DIR_IPK}/${pkg}_*_$arch.ipk ${SDK_OUTPUT}/${prefix}/ipk/ + orig_pkg=`ipkg-list-fields ${DEPLOY_DIR_IPK}/${pkg}_*_$arch.ipk | grep OE: | cut -d ' ' -f2` + echo $orig_pkg + cp ${STAGING_DIR}/pkgdata/$orig_pkg ${SDK_OUTPUT}/${prefix}/pkgdata/ + subpkgs=`cat ${STAGING_DIR}/pkgdata/$orig_pkg | grep PACKAGES: | cut -b 10-` + echo $subpkgs + for subpkg in $subpkgs; do + cp ${STAGING_DIR}/pkgdata/runtime/$subpkg ${SDK_OUTPUT}/${prefix}/pkgdata/runtime/ + if [ -e ${STAGING_DIR}/pkgdata/runtime/$subpkg.packaged ];then + cp ${STAGING_DIR}/pkgdata/runtime/$subpkg.packaged ${SDK_OUTPUT}/${prefix}/pkgdata/runtime/ + fi + if [ -e ${STAGING_DIR}/pkgmaps/debian/$subpkg ]; then + cp ${STAGING_DIR}/pkgmaps/debian/$subpkg ${SDK_OUTPUT}/${prefix}/pkgmaps/debian/ + fi + if [ -e ${STAGING_DIR}/${TARGET_SYS}/shlibs/$subpkg.list ]; then + cp ${STAGING_DIR}/${TARGET_SYS}/shlibs/$subpkg.* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/shlibs/ + fi + done + break + fi + done + done + # remove unwanted executables rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc |