summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2008-03-14 16:31:03 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2008-03-14 16:31:03 +0000
commit2c74957ce29e6446593b374bef537de17dc7a82b (patch)
treebf8afed16f84158396c020dfee7c7655b1eccfc7 /meta
parent6b77c9ec31d1bcb8084a014aaafe6b6652924c29 (diff)
downloadopenembedded-core-2c74957ce29e6446593b374bef537de17dc7a82b.tar.gz
openembedded-core-2c74957ce29e6446593b374bef537de17dc7a82b.tar.bz2
openembedded-core-2c74957ce29e6446593b374bef537de17dc7a82b.zip
meta-toolchain: many changes to make it expandable with ipkg
After initialization there are two aliases available: - ipkg - allows to remove/install SDK packages - ipkg-target - allows to remove/install target packages As a result user can extend SDK to contain any target library from Poky build. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4013 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/meta/meta-toolchain.bb49
1 files changed, 9 insertions, 40 deletions
diff --git a/meta/packages/meta/meta-toolchain.bb b/meta/packages/meta/meta-toolchain.bb
index 525d090916..bf9b5765de 100644
--- a/meta/packages/meta/meta-toolchain.bb
+++ b/meta/packages/meta/meta-toolchain.bb
@@ -10,7 +10,7 @@ SDK_OUTPUT2 = "${SDK_DIR}/image-extras"
SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
IPKG_HOST = "ipkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
-IPKG_TARGET = "ipkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/temp-target"
+IPKG_TARGET = "ipkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${SDK_PREFIX}/${TARGET_SYS}"
TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
TOOLCHAIN_TARGET_TASK ?= "task-poky-standalone-sdk-target task-poky-standalone-sdk-target-dbg"
@@ -30,45 +30,17 @@ do_populate_sdk() {
done
${IPKG_HOST} update
- ${IPKG_HOST} -force-depends install ${TOOLCHAIN_HOST_TASK}
+ ${IPKG_HOST} install ${TOOLCHAIN_HOST_TASK} ipkg-sdk
${IPKG_TARGET} update
${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK}
- mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include
- mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/
- mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/share
- mv ${SDK_OUTPUT}/temp-target/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status
- rm -rf ${SDK_OUTPUT}/temp-target/usr/lib/ipkg/
- cp -pPR ${SDK_OUTPUT}/temp-target/usr/include/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
- cp -pPR ${SDK_OUTPUT}/temp-target/usr/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/
- if [ -d ${SDK_OUTPUT}/temp-target/usr/lib/.debug ]; then
- cp -pPR ${SDK_OUTPUT}/temp-target/usr/lib/.debug/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/
- fi
- cp -pPR ${SDK_OUTPUT}/temp-target/usr/share/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/share/
- cp -pPR ${SDK_OUTPUT}/temp-target/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/
- if [ -d ${SDK_OUTPUT}/temp-target/lib/.debug ]; then
- cp -pPR ${SDK_OUTPUT}/temp-target/lib/.debug/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/
- fi
- rm -rf ${SDK_OUTPUT}/temp-target/
-
- for fn in `ls ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/`; do
- if [ -h ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn ]; then
- link=`readlink ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn`
- bname=`basename $link`
- if [ ! -e $link -a -e ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$bame ]; then
- rm ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn
- ln -s $bname ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn
- fi
- fi
- done
+ install -d ${SDK_OUTPUT}/${prefix}/usr/lib/ipkg
+ mv ${SDK_OUTPUT}/usr/lib/ipkg/* ${SDK_OUTPUT}/${prefix}/usr/lib/ipkg/
+ #rm -Rf ${SDK_OUTPUT}/usr/lib
- 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}/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status-host
- rm -Rf ${SDK_OUTPUT}/usr/lib
+ install -d ${SDK_OUTPUT}/${sysconfdir}
+ install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${sysconfdir}
# extract and store ipks, pkgdata and shlibs data
target_pkgs=`cat ${SDK_OUTPUT}/${prefix}/package-status | grep Package: | cut -f 2 -d ' '`
@@ -103,11 +75,6 @@ do_populate_sdk() {
# Remove broken .la files
rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la
- # Generate link for sysroot use
- # /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/usr -> .
- cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
- ln -sf . usr
-
# Setup site file for external use
siteconfig=${SDK_OUTPUT}/${prefix}/site-config
touch $siteconfig
@@ -122,6 +89,8 @@ do_populate_sdk() {
echo 'export PKG_CONFIG_SYSROOT_DIR=${prefix}/${TARGET_SYS}' >> $script
echo 'export PKG_CONFIG_PATH=${prefix}/${TARGET_SYS}/lib/pkgconfig' >> $script
echo 'export CONFIG_SITE=${prefix}/site-config' >> $script
+ echo "alias ipkg='LD_LIBRARY_PATH=${prefix}/lib ${prefix}/bin/ipkg-cl -f ${sysconfdir}/ipkg-sdk.conf -o ${prefix}'" >> $script
+ echo "alias ipkg-target='LD_LIBRARY_PATH=${prefix}/lib ${prefix}/bin/ipkg-cl -f ${sysconfdir}/ipkg.conf -o ${prefix}/${TARGET_SYS}'" >> $script
# Add version information
versionfile=${SDK_OUTPUT}/${prefix}/version