# Yocto distro toolchain change to linaro

**URL:** <https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237>\
**Category:** Legato Linux distribution (Yocto project)\
**Created:** [November 5, 2016, 7:54pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237 "2016-11-05T19:54:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![voloviq](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/voloviq/32/77_2.png) [@voloviq](https://forum.legato.io/u/voloviq)\
**Post date:** [November 5, 2016, 7:54pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/1 "2016-11-05T19:54:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jchitty](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jchitty/32/72_2.png) [@jchitty](https://forum.legato.io/u/jchitty)\
**Post date:** [November 21, 2016, 10:04pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/2 "2016-11-21T22:04:42Z")

</div>

> [@voloviq](#):
>
> 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
> 
> ```
> ^
> 
> ```
> 
> compilation terminated.  
> …  
> C++11 disabled.  
> ERROR: Qt requires a C++11 compiler and yours does not seem to be that.  
> Please upgrade.

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](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

---

<div class="post-metadata">

**Author:** ![voloviq](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/voloviq/32/77_2.png) [@voloviq](https://forum.legato.io/u/voloviq)\
**Post date:** [November 21, 2016, 11:47pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/3 "2016-11-21T23:47:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![CoRfr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/corfr/32/69_2.png) [@CoRfr](https://forum.legato.io/u/CoRfr)\
**Post date:** [November 22, 2016, 11:21pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/4 "2016-11-22T23:21:28Z")

</div>

> [@voloviq](#):
>
> 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

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](http://wiki.wandboard.org/index.php/Building_Qt5_using_yocto_on_Wandboard)

Yocto 1.7 is called dizzy so you would need to take [GitHub - meta-qt5/meta-qt5 at dizzy](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

---

<div class="post-metadata">

**Author:** ![voloviq](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/voloviq/32/77_2.png) [@voloviq](https://forum.legato.io/u/voloviq)\
**Post date:** [November 23, 2016, 12:35am UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/5 "2016-11-23T00:35:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![voloviq](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/voloviq/32/77_2.png) [@voloviq](https://forum.legato.io/u/voloviq)\
**Post date:** [November 28, 2016, 8:19pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/6 "2016-11-28T20:19:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![voloviq](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/voloviq/32/77_2.png) [@voloviq](https://forum.legato.io/u/voloviq)\
**Post date:** [November 28, 2016, 8:45pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/7 "2016-11-28T20:45:06Z")

</div>

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](http://legato.io/legato-docs/latest/yoctoLegatoOverview.html).

Any suggestion?

Thanks  
Best Regards  
Voloviq

---

<div class="post-metadata">

**Author:** ![voloviq](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/voloviq/32/77_2.png) [@voloviq](https://forum.legato.io/u/voloviq)\
**Post date:** [November 28, 2016, 11:35pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/8 "2016-11-28T23:35:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![voloviq](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/voloviq/32/77_2.png) [@voloviq](https://forum.legato.io/u/voloviq)\
**Post date:** [December 22, 2016, 7:41pm UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/9 "2016-12-22T19:41:58Z")

</div>

[Legato\_Yocto\_Qt5\_Compilation.pdf](https://forum.legato.io/uploads/short-url/z9jvMxq6zGAks10Ze5ndElF6Vc7.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

---

<div class="post-metadata">

**Author:** ![CoRfr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/corfr/32/69_2.png) [@CoRfr](https://forum.legato.io/u/CoRfr)\
**Post date:** [January 24, 2017, 6:26am UTC](https://forum.legato.io/t/yocto-distro-toolchain-change-to-linaro/2237/10 "2017-01-24T06:26:57Z")

</div>

Hello Voloviq,

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

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

```auto
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.

```auto
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
