diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-03-14 16:31:03 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-03-14 16:31:03 +0000 |
commit | 2c74957ce29e6446593b374bef537de17dc7a82b (patch) | |
tree | bf8afed16f84158396c020dfee7c7655b1eccfc7 /meta/packages | |
parent | 6b77c9ec31d1bcb8084a014aaafe6b6652924c29 (diff) | |
download | poky-2c74957ce29e6446593b374bef537de17dc7a82b.tar.gz |
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/packages')
-rw-r--r-- | meta/packages/meta/meta-toolchain.bb | 49 |
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" | |||
10 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" | 10 | SDK_DEPLOY = "${TMPDIR}/deploy/sdk" |
11 | 11 | ||
12 | IPKG_HOST = "ipkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}" | 12 | IPKG_HOST = "ipkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}" |
13 | IPKG_TARGET = "ipkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/temp-target" | 13 | IPKG_TARGET = "ipkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/${SDK_PREFIX}/${TARGET_SYS}" |
14 | 14 | ||
15 | TOOLCHAIN_HOST_TASK ?= "task-sdk-host" | 15 | TOOLCHAIN_HOST_TASK ?= "task-sdk-host" |
16 | TOOLCHAIN_TARGET_TASK ?= "task-poky-standalone-sdk-target task-poky-standalone-sdk-target-dbg" | 16 | TOOLCHAIN_TARGET_TASK ?= "task-poky-standalone-sdk-target task-poky-standalone-sdk-target-dbg" |
@@ -30,45 +30,17 @@ do_populate_sdk() { | |||
30 | done | 30 | done |
31 | 31 | ||
32 | ${IPKG_HOST} update | 32 | ${IPKG_HOST} update |
33 | ${IPKG_HOST} -force-depends install ${TOOLCHAIN_HOST_TASK} | 33 | ${IPKG_HOST} install ${TOOLCHAIN_HOST_TASK} ipkg-sdk |
34 | 34 | ||
35 | ${IPKG_TARGET} update | 35 | ${IPKG_TARGET} update |
36 | ${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK} | 36 | ${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK} |
37 | 37 | ||
38 | mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include | 38 | install -d ${SDK_OUTPUT}/${prefix}/usr/lib/ipkg |
39 | mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/ | 39 | mv ${SDK_OUTPUT}/usr/lib/ipkg/* ${SDK_OUTPUT}/${prefix}/usr/lib/ipkg/ |
40 | mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/share | 40 | #rm -Rf ${SDK_OUTPUT}/usr/lib |
41 | mv ${SDK_OUTPUT}/temp-target/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status | ||
42 | rm -rf ${SDK_OUTPUT}/temp-target/usr/lib/ipkg/ | ||
43 | cp -pPR ${SDK_OUTPUT}/temp-target/usr/include/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/ | ||
44 | cp -pPR ${SDK_OUTPUT}/temp-target/usr/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/ | ||
45 | if [ -d ${SDK_OUTPUT}/temp-target/usr/lib/.debug ]; then | ||
46 | cp -pPR ${SDK_OUTPUT}/temp-target/usr/lib/.debug/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/ | ||
47 | fi | ||
48 | cp -pPR ${SDK_OUTPUT}/temp-target/usr/share/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/share/ | ||
49 | cp -pPR ${SDK_OUTPUT}/temp-target/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/ | ||
50 | if [ -d ${SDK_OUTPUT}/temp-target/lib/.debug ]; then | ||
51 | cp -pPR ${SDK_OUTPUT}/temp-target/lib/.debug/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/ | ||
52 | fi | ||
53 | rm -rf ${SDK_OUTPUT}/temp-target/ | ||
54 | |||
55 | for fn in `ls ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/`; do | ||
56 | if [ -h ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn ]; then | ||
57 | link=`readlink ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn` | ||
58 | bname=`basename $link` | ||
59 | if [ ! -e $link -a -e ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$bame ]; then | ||
60 | rm ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn | ||
61 | ln -s $bname ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn | ||
62 | fi | ||
63 | fi | ||
64 | done | ||
65 | 41 | ||
66 | echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libpthread.so | 42 | install -d ${SDK_OUTPUT}/${sysconfdir} |
67 | echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libc.so | 43 | install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${sysconfdir} |
68 | |||
69 | # remove unwanted housekeeping files | ||
70 | mv ${SDK_OUTPUT}/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status-host | ||
71 | rm -Rf ${SDK_OUTPUT}/usr/lib | ||
72 | 44 | ||
73 | # extract and store ipks, pkgdata and shlibs data | 45 | # extract and store ipks, pkgdata and shlibs data |
74 | target_pkgs=`cat ${SDK_OUTPUT}/${prefix}/package-status | grep Package: | cut -f 2 -d ' '` | 46 | target_pkgs=`cat ${SDK_OUTPUT}/${prefix}/package-status | grep Package: | cut -f 2 -d ' '` |
@@ -103,11 +75,6 @@ do_populate_sdk() { | |||
103 | # Remove broken .la files | 75 | # Remove broken .la files |
104 | rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la | 76 | rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la |
105 | 77 | ||
106 | # Generate link for sysroot use | ||
107 | # /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/usr -> . | ||
108 | cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} | ||
109 | ln -sf . usr | ||
110 | |||
111 | # Setup site file for external use | 78 | # Setup site file for external use |
112 | siteconfig=${SDK_OUTPUT}/${prefix}/site-config | 79 | siteconfig=${SDK_OUTPUT}/${prefix}/site-config |
113 | touch $siteconfig | 80 | touch $siteconfig |
@@ -122,6 +89,8 @@ do_populate_sdk() { | |||
122 | echo 'export PKG_CONFIG_SYSROOT_DIR=${prefix}/${TARGET_SYS}' >> $script | 89 | echo 'export PKG_CONFIG_SYSROOT_DIR=${prefix}/${TARGET_SYS}' >> $script |
123 | echo 'export PKG_CONFIG_PATH=${prefix}/${TARGET_SYS}/lib/pkgconfig' >> $script | 90 | echo 'export PKG_CONFIG_PATH=${prefix}/${TARGET_SYS}/lib/pkgconfig' >> $script |
124 | echo 'export CONFIG_SITE=${prefix}/site-config' >> $script | 91 | echo 'export CONFIG_SITE=${prefix}/site-config' >> $script |
92 | echo "alias ipkg='LD_LIBRARY_PATH=${prefix}/lib ${prefix}/bin/ipkg-cl -f ${sysconfdir}/ipkg-sdk.conf -o ${prefix}'" >> $script | ||
93 | echo "alias ipkg-target='LD_LIBRARY_PATH=${prefix}/lib ${prefix}/bin/ipkg-cl -f ${sysconfdir}/ipkg.conf -o ${prefix}/${TARGET_SYS}'" >> $script | ||
125 | 94 | ||
126 | # Add version information | 95 | # Add version information |
127 | versionfile=${SDK_OUTPUT}/${prefix}/version | 96 | versionfile=${SDK_OUTPUT}/${prefix}/version |