Yocto distro toolchain change to linaro


#1

Hello,
I try to force to change my current toolchain from arm-poky-linux-gnueabi to gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf. My base is Legato-Dist-Source-mdm9x15-SWI9X15Y_07.11.09.00. Using poky-linux there is no problem everything compile as it should. I found somewhere in internet that it is necessary in main directory make

  1. git clone git://git.linaro.org/openembedded/meta-linaro.git
  2. Add in build_bin/conf/local.conf following lines
    TCMODE = “external-linaro”
    EXTERNAL_TOOLCHAIN = “/path/to/linaro”

Unfortunately this two lines generate problems

Updating MANGOH_WIFI_REPO to /home/voloviq/Compilation_Folder/Legato/yocto/mangOH/WiFi
Updating KBRANCH_DEFAULT_MDM9X15 to standard/swi-mdm9x15-yocto-1.7-swi-le55
Updating KMETA_DEFAULT_MDM9X15 to meta-yocto-1.7-swi-le55
Build image of minimal rootfs (for swi-mdm9x15).
ERROR: Traceback (most recent call last):
File “/home/…/yocto/poky/bitbake/lib/bb/cookerdata.py”, line 174, in wrapped
return func(fn, *args)
File “/home/…/yocto/poky/bitbake/lib/bb/cookerdata.py”, line 184, in parse_config_file

ParseError: ParseError at /home/…/yocto/poky/meta/conf/distro/defaultsetup.conf:7: Could not include required file conf/distro/include/tcmode-external-linaro.inc

ERROR: Unable to parse conf/bitbake.conf: ParseError at /home/…/yocto/poky/meta/conf/distro/defaultsetup.conf:7: Could not include required file conf/distro/include/tcmode-external-linaro.inc

In meta-linaro->meta…toolchain I found missing tcmode-external-linaro.inc but how to handle this.

Why I want to change compiler, the answer is easy

/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/include/gnu/stubs.h:10:29: fatal error: gnu/stubs-hard.h: No such file or directory

include <gnu/stubs-hard.h>

                         ^

compilation terminated.

C++11 disabled.
ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
Please upgrade.

I’m stuck currently.

Thanks
Best Regards
Voloviq


#2

For the Sierra Wireless WP85xx (Yocto1.7-based) Linux distro, the toolchain provided (GCC 4.9.1) does support C++11.

https://gcc.gnu.org/projects/cxx-status.html#cxx11

Are you using an AR module? If so, please contact your Sierra Wireless customer support team.

I hope this helps.

–Jen


#3

Hi Jen,
thanks for answer. For my purposes I really need QT5 environment because I have already written application on it. Unfortunately I’m rather poor in yocto and do not understand how everything is organized in it. For other my Linux controllers I use linaro toolchain which works fine. Also I discover that simply application written in c like hello world compiled linaro toolchain can’t execute on current WP85xx yocto distribution. When I compile that preinstalled toolchain poky-linux… application works fine. So it means that linaro and poky-linux toolchains are not compatible. I would like to know where in yocto folders structure this toolchain exist and how to replace it. Ideally for me is to use only linaro for all my machines. Regarding to Your last question I used WP module so I can’t account to support.

Thanks
Best Regards
Voloviq


#4

Hi Voloviq,

Using another toolchain with the WP85 might not be so easy, as there is a lot of compatibility issues between libraries that are in the toolchain and on the target.
In the end building the QT5 support within the WP85 Yocto distribution might actually be a simpler course of action.

There is this article on how to use a meta-qt5 layer: http://wiki.wandboard.org/index.php/Building_Qt5_using_yocto_on_Wandboard

Yocto 1.7 is called dizzy so you would need to take https://github.com/meta-qt5/meta-qt5/tree/dizzy and configure build_bin/conf/bblayers.conf to use that layer.

If you add ‘inherit populate_sdk_qt5’ in meta-swi/common/recipes-core/meta/meta-toolchain-swi.bb it should include the QT5 dependencies.
Then do ‘make toolchain_bin’, and the resulting toolchain should have qt5 tools.

Best regards,
Bertrand


#5

Thanks Bertrand,
I try to apply Your suggestion soon, I made the similar thing for bbb and it works without one element toolchain.Where this new toolchain will be located?

Best Regards
Voloviq


#6

Hello again,

I make a small experiment. I recompile everything again with meta-toolchain compilation option. The result is very strangle. If I good understand compiled binaries are located in ~/…/build_bin/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-. So after compile simple hello world c application i get an error that wrong executable file format, if I’m correct this compiler don’t match to current arm architecture. So why this one match opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/. Very strangle. I used bitbake meta-toolchain.

Best Regards
Voloviq


#7

Hi,
after yocto compilation and after download produced images I get an following error
Android Bootloader - UART_DM Initialized!!!
[10] ERROR: No misc partition found
[10] ERROR: Invalid boot image pagesize. Device pagesize: 2048, Image pagesize: 4096
[20] ERROR: Could not do normal boot. Reverting to fastboot mode.
[60] udc_start()

I used standard option during compilation, justo download image, untar and simple type make. After 1h I used this manual to write an images http://legato.io/legato-docs/latest/yoctoLegatoOverview.html.

Any suggestion?

Thanks
Best Regards
Voloviq


#8

Hello again,

problems with firmware upgrade solved using swiflash. Additionally after download latest compiled images hello world also works. Tomorrow QT5 tests, I’m full of hope ;).

BR
Voloviq


#9

Legato_Yocto_Qt5_Compilation.pdf (48.7 KB)

Hello again,

I try to compile QT5 by modification some keys configuration files. I add some small document in which I try to describe what is necessary to do to generate images with qt5. Unfortunately when I upload boot-yocto_wp85.cwe (uboot,kernel rootfs) system not started. Currently I haven’t serial port to see where is the problem, I guess that the problem is related with rootfs size which now is much more than before. I modify some configuration file because it can’t make rootfs (small partition). So my question now is how to increase rootfs partition and how to decrease user partition in yocto.

PS. Bertrand
I was not able to generate toolchain with qt5 (sdk script not generated)- receipt don’t works. I need to find another solution to generate meta-toolchain-qt5.

Best Regards
Voloviq


#10

Hello Voloviq,

sorry to hear your were not able to generate the toolchain.

To resize partitions you might be able to use at!apppartchg?:

at!entercnd="A710"
OK
at!apppartchg?
Total APP partition size: 253952 kB
APPSBL,PAD,APPS,PAD,SYSTEM,PAD,USERDATA,PAD,USERAPP,PAD = 
896,128,20096,384,50048,384,37888,2560,140288,1280

OK
at!apppartchg=896,128,20096,384,150048,384,37888,2560,40288,1280
OK
at!reset

It will wipe the data on your device though.

root@swi-mdm9x15:/# free
             total       used       free     shared    buffers     cached
Mem:        151820      46652     105168          0       6572      15100
-/+ buffers/cache:      24980     126840
Swap:            0          0          0

The only thing that you have to be careful about is to keep the sum equal, and not to touch the padding (PAD parts, not sure the effect that it would have).

The original configuration was SYSTEM=50048 USERAPP=140288.
I took 100000 from USERAPP and added it to SYSTEM (=rootfs):

Before = 896,128,20096,384, 50048,384,37888,2560,140288,1280
After  = 896,128,20096,384,150048,384,37888,2560, 40288,1280

Bertrand