]> code.ossystems Code Review - openembedded-core.git/commitdiff
meta-toolchain: Add ipks, pkgdata, pkgmaps and shlibs data to sdk archive. Add extern...
authorRichard Purdie <richard@openedhand.com>
Wed, 13 Jun 2007 23:35:51 +0000 (23:35 +0000)
committerRichard Purdie <richard@openedhand.com>
Wed, 13 Jun 2007 23:35:51 +0000 (23:35 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1932 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/meta/external-poky-toolchain.bb [new file with mode: 0644]
meta/packages/meta/meta-toolchain.bb

diff --git a/meta/packages/meta/external-poky-toolchain.bb b/meta/packages/meta/external-poky-toolchain.bb
new file mode 100644 (file)
index 0000000..7cf657f
--- /dev/null
@@ -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/
+}
+
index fbb2e92ee2c28793a8fce5dbfd4037d03af66c31..bf922cd31bc47a8869018c686ac09684f4071d34 100644 (file)
@@ -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