fixing. Added package of meta-environment-${TARGET_ARCH}
cover fixing. Added package of meta-environment-${TARGET_ARCH}
This fixing is dependant upon the commit 78c0263 of bug #586 fixing on branch jzhang/sdkversion.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: llu/bug565
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=llu/bug565
Thanks,
Lianhao Lu <[email protected]>
---
Lianhao Lu (1):
meta-environment: Added package of meta-environment-${TARGET_ARCH}
for environment files.
meta/classes/toolchain-scripts.bbclass | 32 ++++++++++ meta/recipes-core/meta/meta-environment.bb | 75 ++++++++++++++++++++++++ meta/recipes-core/tasks/task-cross-canadian.bb | 1 + 3 files changed, 108 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/meta/meta-environment.bb
PATCH 1/1 meta-environment: Added package of meta-environment-${TARGET_ARCH} for environment files.
[BUGID #565] Fixing bug #565, added package of meta-environment-${TARGET_ARCH} for environment files used by cross-canadian toolchain.
Also corrected the situation of empty config site file for target.
--- meta/classes/toolchain-scripts.bbclass | 32 ++++++++++ meta/recipes-core/meta/meta-environment.bb | 75 ++++++++++++++++++++++++ meta/recipes-core/tasks/task-cross-canadian.bb | 1 + 3 files changed, 108 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/meta/meta-environment.bb
meta/classes/toolchain-scripts.bbclass +32 -0
@@ -60,3 +60,35 @@ toolchain_create_tree_env_script () { echo 'export POKY_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script echo 'export POKY_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script } + +# This function creates an environment-setup-script for use by the ADT installer +toolchain_create_sdk_env_script_for_installer () { + # Create environment setup script + script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${OLD_MULTIMACH_TARGET_SYS} + rm -f $script + touch $script + echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${OLD_MULTIMACH_TARGET_SYS}:$PATH' >> $script + echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script + echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${libdir}/pkgconfig' >> $script + echo 'export CONFIG_SITE=${SDKPATH}/site-config-${OLD_MULTIMACH_TARGET_SYS}' >> $script + echo 'export CC=${TARGET_PREFIX}gcc' >> $script + echo 'export CXX=${TARGET_PREFIX}g++' >> $script + echo 'export GDB=${TARGET_PREFIX}gdb' >> $script + echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script + echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux"' >> $script + if [ "${TARGET_OS}" = "darwin8" ]; then + echo 'export TARGET_CFLAGS="-I##SDKTARGETSYSROOT##${includedir}"' >> $script + echo 'export TARGET_LDFLAGS="-L##SDKTARGETSYSROOT##{libdir}"' >> $script + # Workaround darwin toolchain sysroot path problems + cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr + ln -s /usr/local local + fi + echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script + echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT## -I##SDKTARGETSYSROOT##${GXX_INCLUDEDIR}"' >> $script + echo "# alias opkg='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ${SDKPATHNATIVE}/${sysconfdir}/opkg-sdk.conf -o ${SDKPATHNATIVE}'" >> $script + echo "# alias opkg-target='LD_LIBRARY_PATH=${SDKPATHNATIVE}${libdir_nativesdk} ${SDKPATHNATIVE}${bindir_nativesdk}/opkg-cl -f ##SDKTARGETSYSROOT##${sysconfdir}/opkg.conf -o ##SDKTARGETSYSROOT##'" >> $script + echo 'export POKY_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script + echo 'export POKY_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script + echo 'export POKY_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script + echo 'export POKY_SDK_VERSION="${SDK_VERSION}"' >> $script +}
meta/recipes-core/meta/meta-environment.bb new file +75 -0
75 lines not on this page · raw message
meta/recipes-core/tasks/task-cross-canadian.bb +1 -0
@@ -12,5 +12,6 @@ RDEPENDS_${PN} = "\ binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \ gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \ gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \ + meta-environment-${TRANSLATED_TARGET_ARCH} \ "
Signature · 1 line
1.7.0.4
Re: [PATCH 1/1] meta-environment: Added package of meta-environment-${TARGET_ARCH} for environment files.
Hi Lianhao,
Quoted 6 lines · Lianhao Lu
[BUGID #565] Fixing bug #565, added package of meta-environment-${TARGET_ARCH} for environment files used by cross-canadian toolchain.
Also corrected the situation of empty config site file for target.
Quoted 7 lines
Signed-off-by Lianhao Lu <[email protected]>--- meta/classes/toolchain-scripts.bbclass | 32 ++++++++++ meta/recipes-core/meta/meta-environment.bb | 75 ++++++++++++++++++++++++ meta/recipes-core/tasks/task-cross-canadian.bb | 1 + 3 files changed, 108 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-core/meta/meta-environment.bb
This recipe looks complex and seems to include a lot of cross-canadian.bbclass.
Would it be possible to inherit that class instead and try and keep the recipe simpler? You can always drop the "meta" inherit. I'm worried about the amount of code duplication here.
Cheers,
Richard
Re: [PATCH 1/1] meta-environment: Added package of meta-environment-${TARGET_ARCH} for environment files.
Hi Richard,
Richard Purdie wrote on 2010-12-16:
Quoted 18 lines
Hi Lianhao,
Quoted 6 lines · Lianhao Lu
[BUGID #565] Fixing bug #565, added package of meta-environment-${TARGET_ARCH} for environment files used by cross-canadian toolchain.
Also corrected the situation of empty config site file for target.
Quoted 8 lines
Signed-off-by Lianhao Lu <[email protected]>--- meta/classes/toolchain-scripts.bbclass | 32 ++++++++++ meta/recipes-core/meta/meta-environment.bb | 75++++++++++++++++++++++++
meta/recipes-core/tasks/task-cross-canadian.bb | 1 + 3 files
changed, 108 insertions(+), 0 deletions(-) create mode
100644 meta/recipes-core/meta/meta-environment.bb
Quoted 6 lines
This recipe looks complex and seems to include a lot of cross-canadian.bbclass.
Would it be possible to inherit that class instead and try and keep the recipe simpler? You can always drop the "meta" inherit. I'm worried about the amount of code duplication here.
The reason I didn't inherit the cross-canadian.bbclass in meta-environment.bb is that by doing this, there would be a problem in the siteinfo.bbclass which is used to generate the autoconf site config file for the target. It uses the variables of HOST_ARCH and HOST_OS which is replaced by SDK_ARCH and SDK_OS respectively in cross-canadian.bbclass. If we inherit the cross-canadian, we need to duplicate the code in siteinfo.bbclass to use TARGET_ARCH(OS) instead of the HOST_ARCH(OS). So we duplicate either for siteinfo.bbclass or for cross-canadian.bbclass. Any comment?
Best Regards,
-Lianhao Lu
Re: [PATCH 1/1] meta-environment: Added package of meta-environment-${TARGET_ARCH} for environment files.
Quoted 28 lines · Lianhao
Hi Richard,
Richard Purdie wrote on 2010-12-16:
Quoted 18 lines
Hi Lianhao,
Quoted 6 lines · Lianhao Lu
[BUGID #565] Fixing bug #565, added package of meta-environment-${TARGET_ARCH} for environment files used by cross-canadian toolchain.
Also corrected the situation of empty config site file for target.
Quoted 8 lines
Signed-off-by Lianhao Lu <[email protected]>--- meta/classes/toolchain-scripts.bbclass | 32 ++++++++++ meta/recipes-core/meta/meta-environment.bb | 75++++++++++++++++++++++++
meta/recipes-core/tasks/task-cross-canadian.bb | 1 + 3 files
changed, 108 insertions(+), 0 deletions(-) create mode
100644 meta/recipes-core/meta/meta-environment.bbQuoted 6 lines
This recipe looks complex and seems to include a lot of cross-canadian.bbclass.
Would it be possible to inherit that class instead and try and keep the recipe simpler? You can always drop the "meta" inherit. I'm worried about the amount of code duplication here.
Quoted 9 lines
The reason I didn't inherit the cross-canadian.bbclass in meta-environment.bb is that by doing this, there would be a problem in the siteinfo.bbclass which is used to generate the autoconf site config file for the target. It uses the variables of
HOST_ARCHandHOST_OSwhich is replaced bySDK_ARCHandSDK_OSrespectively in cross-canadian.bbclass. If we inherit the cross-canadian, we need to duplicate the code in siteinfo.bbclass to useTARGET_ARCH(OS)instead of theHOST_ARCH(OS). So we duplicate either for siteinfo.bbclass or for cross-canadian.bbclass. Any comment?
I see your problem. Normally I'd not suggest something like this but there is a way we can solve the problem. You can put this at the top of the file before HOST_ARCH and HOST_OS are changed:
TARGET_SITE_CONFIG := "${CONFIG_SITE}"
Then the data you need should be preserved in TARGET_SITE_CONFIG.
Cheers,
Richard