diff options
Diffstat (limited to 'meta')
-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 525d09091..bf9b5765d 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 |