0

The workbench OS is Ubuntu12.04 x64.

Build cross-compiler.

mkdir app_devkit; cd app_devkit repo init -u git://codeaurora.org/quic/le/manifest.git -b release -m LNX.LE.5.1-66056-9x40.xm repo sync cd oe-core; . build/conf/set_bb_env.sh bitbake gcc

Test cross-compiler --> OK.

tmp-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc -o hello_world hello_world.c

Pack with some 'socket ignored'

cd ../../.. tar zcf app_devkit.tgz app_devkit tar: app_devkit/oe-core/build/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/linux-libc-headers/3.8-r0/pseudo/pseudo.socket: socket ignored ... tar: app_devkit/oe-core/build/tmp-eglibc/sysroots/x86_64-linux/var/pseudo/pseudo.socket: socket ignored

Unpack and test again --> NG

cd <somewhere else> tar zxf <path to app_devkit.tgz> cd app_devkit/oe-core/build tmp-eglibc/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc -o hello_world hello_world.c as: unrecognized option '-meabi=5'

1 Answers1

0

The toolchain deployed under tmp-eglibc/sysroot/... is not intended to directly be moved.

Instead do either of the following:

  1. Run bitbake meta-toolchain to create a generic toolchain.
  2. Run bitbake -c populate_sdk <image-name>, where you replace <image-name> with the name of the image you're using.

The first will create a generic toolchain, while the latter will ensure that the sysroot in the toolchain matches your image.

In both cases, the toolchain will be found in tmp-eglic/deploy/sdk/, as a .sh-file. Just execute this file, and tell it where you want your toolchain to be installed.

Anders
  • 8,541
  • 1
  • 27
  • 34
  • Sorry, I don't understand. What do you mean by a "generic" toolchain ? How to find possible ? Itried "bitbake -c populate_sdk app_devkit" and result is "ERROR: Nothing PROVIDES 'app_devkit'" – Yulin Huang Nov 09 '15 at 11:22
  • A generic sdk doesn't contain you image's sysroot. Thus, you won't get all the header files and libraries that can be found in your image. Regarding your failed attempt to create a image-based sdk; what's the name of the image that should be built? Check the doc's for your layer / vendor in question, order to see if they've documented this. Images are normally found under `layer/recipes-*/images/XXX.bb`. You could also try the generic SDK. – Anders Nov 09 '15 at 12:27
  • Thanks Anders. Invoking the resulting meta-toolchain/../arm-oe-linux-gnueabi-gcc returns "No such file or directory". It is a "ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16". The workbench PC is a "Linux 3.2.0-88-generic #126-Ubuntu SMP Mon Jul 6 21:33:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux". Does this imply meta-toolchain is not supported by this distribution ? I will try populate_sdk. – Yulin Huang Nov 09 '15 at 14:48
  • meta-toolchain should work, it's a party of the image based toolchain. (This, of our doesn't work the latter won't work either). Have you installed the toolchain? If not, execute the sh-file add indicated in my response. After that, source the environment-file in the install location. Then you can call $CC directly. – Anders Nov 09 '15 at 14:59
  • Thanks Anders. When installing SDK, some "ERROR: could not relocate ***, interp size = 78 and 90 is needed." show and finally "SDK has been successfully set up and is ready to be used". Whether environment-setup-armv7a-vfp-neon-oe-linux-gnueabi is sourced or not, invoking arm-oe-linux-gnueabi-gcc returns "No such file or directory". – Yulin Huang Nov 10 '15 at 01:52
  • Well, if it fails to relocate, that might very well expain the behaviour. Just to note, you should always source the environment-file, prior to calling $CC. I'd double check that the path and linker path is correct in the environment file. (It sounds as your cross-compiler can't find a linked library). Apart from that, you could try the oe-core mailinglist, though the version used is __really__ old; I'd definitely approach the vendor to get a more up-to-date version. – Anders Nov 10 '15 at 05:32