Task #7 - Create the toolchain

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Task #7 - Create the toolchain

Task #7 - Create the toolchain

Build the tool chain image. It generates the toolchain that will be installed on your host machine and used to build any source code:

$ bitbake meta-toolchain

It does take some time to build.

Why to create a toolchain?

Yocto is not intended to be used to package development. Yocto is a linux distribution creator. It´s intended to be a image builder, a rootfs creator. (please, see more about "what is yocto" here and here)

So, yocto itself should not be used to "develop" a new package. Although, Yocto can help creating a environment for development like meta-toolchain or Eclipse ADT.

Go HOME

Go Task #6 - Customize the image

Labels (1)
Comments

Thanks to OtavioSalvador, more toolchains are described here

https://community.freescale.com/message/340012#340012

Leo

Hi there, from the meta-freescale mailing list I would like to re-surface this (dates back to 2013-6-14):

Any of the sysroot that you got by building  toolchain is just too minimum and we typically advise people to setup their sysroot base on target image rootfs.

At the time, I updated the file "/opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi".

All "--sysroot=" point to the extracted (.tar.bz2) rootfs images that I have created, instead of the /opt/poky/1.4.1/sysroot folder.

So overall, it seems you need the meta-toolchain AND a rootfs in order to build applications for the target. Is this correct? Should I be using the original sysroot folder under /opt/poky?

Thank you in advance for your clarifications.

I only use toolchain to build kernel and u-boot, and tiny applications, so for my use it was always enough.

Although I agree that the generated sysroot from meta-toolchain may be too small for some application.

So, I think it´s a good thing use the tar.bz2 AND the meta-toolchain if your application requires. Or, create another image forking meta-toolchain, in order to include the packages that you need.

Thanks for your advice

Thanks DaianeAngolini for your great works, It really helpful to get started. Im following your tutorial and let me clarify few points.

I managed to build fsl-image-gui using MACHINE=nitrogen6x and works finely on SABRE Lite board.

I want to know whether the fsl-image-gui has been built only with Qt Embedded library , if so,

  • Please teach me how can i rebuild the image with Qt X11 library.

When i test the working fsl-image-gui all the QT demos run on single window mode.

root@nitrogen6x:~# ps | grep m

1695 root      2616 S    {S01xserver-nodm} /bin/sh /etc/rc5.d/S01xserver-nodm

1719 messageb  2612 S    /usr/bin/dbus-daemon --system

1722 root      277m S <  /usr/bin/Xorg -br -pn

1723 root      5584 S    /usr/sbin/connmand

1759 root      1720 S    /usr/sbin/apmd -P /etc/apm/apmd_proxy --proxy-timeou

1792 root      2372 S    /usr/sbin/rpc.mountd -f /etc/exports

1801 root      2200 S    /sbin/syslogd -n -O /var/log/messages

1815 root      6408 S    matchbox-window-manager -theme Sato -use_desktop_mod

1824 root      2612 S    /usr/bin/dbus-daemon --fork --print-pid 5 --print-ad

1833 root     19200 S    connman-applet

1858 root     20300 S    matchbox-desktop

1859 root     20184 S    matchbox-panel --titlebar --start-applets showdeskto

matchbox-window-manager is using instead of X window manager

when i killed the above 1815 process  the desktop disappears.

  • How can I change the window manager to X window manager from matchbox ?

What i really want to do is to build QT multiple window applications which can be executed on  SABRE Lite board.

root@nitrogen6x:~# ps | grep X

1718 root      3036 S    xinit /etc/X11/Xsession -- /usr/bin/Xorg -br -pn

1722 root      277m S <  /usr/bin/Xorg  -br -pn

When i went through community posts, i found the following tool chain,

* Qt X11 toolchain build: bitbake meta-toolchain-qt

  • As above ps command shows that Xsession is running, If I build QT applications using this toolchain, will i be able to run multiple window applications on SABRE Lite board with fsl-image-gui

Thanks in advance

Hi, nilwij.

I´m don´t know QT more than load and close it. But, I think all things you want to do is related with QT configuration. It means, it would be QT itself language.

Once you know how to configure it, I can try to find a way to help you to configure it on yocto. But, you can take the QT recipe and try to figure out how things are configured.

Oh, I always thought QT on fsl-image-gui was a QT+X11 build. is it not?

I recommend you to post your questions on meta-freescale mail list, there are several QT guys there and I think they may guide you better than I....

Hello,

I have built an image and SDK (fsl-image-gui and 'fsl-image-gui -c -package_sdk' so I have the toolchain that contains the built kernel, not some other, 'lighter', version of it). I am trying to build some of the unit tests using Eclipse Juno and the Yocto ADT, which I've configured using this tutorial (for building the images and toolchains) and Yocto Project Application Developer's Guide to configure the plugin and toolchain.

Here's my configuration file:
***************************************************************

MACHINE ??= 'nitrogen6x'

DISTRO ?= 'poky'

PACKAGE_CLASSES ?= "package_rpm"

EXTRA_IMAGE_FEATURES = "debug-tweaks"

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

BB_DISKMON_DIRS = "\

    STOPTASKS,${TMPDIR},1G,100K \

    STOPTASKS,${DL_DIR},1G,100K \

    STOPTASKS,${SSTATE_DIR},1G,100K \

    ABORT,${TMPDIR},100M,1K \

    ABORT,${DL_DIR},100M,1K \

    ABORT,${SSTATE_DIR},100M,1K"

CONF_VERSION = "1"

BB_NUMBER_THREADS = '6'

PARALLEL_MAKE = '-j 6'

PREFFERED_PROVIDER_virtual/kernel = "linux-boundary"

DL_DIR ?= "${BSPDIR}/downloads/"

ACCEPT_FSL_EULA = ""

******************************************************

Here's my Yocto ADT configuration (the last one I tried, custom built toolchain):

******************************************************

Cross Development Profile: Standard Profile

Cross Compiler Options:     Standalone pre-built toolchain

Toolchain Root Location:     /opt/poky/1.5.1 (installed via running bitbake output script from <yocto build dir>/tmp/deploy/sdk)

Sysroot Location:                 <yocto build dir>/tmp/sysroots/nitrogen6x

******************************************************

The tests I am trying to compile are mxc_v4l2_capture.c and mxc_v4l2_output.c. So I made a 'vanilla' HelloWorld app, using the Yocto GNU Make Autotools C++ project wizard from Eclipse and replaced the contents of the default cpp file inside the projcet's src folder with the contents of mxc_v4l2_capture.c and mxc_v4l2_output.c respectively. The first compiles just fine, since it uses only default headers, but mxc_v4l2_output.c doesn't. Eclipse complains it cannot find either of the following 3 header files:

#include <linux/mxcfb.h>

#include <linux/mxc_v4l2.h>

#include <linux/ipu.h>

I have checked my sysroot, the headers are all present and accounted for (inside usr/src/kernel/). However, Eclipse does not show this path in the project "Includes" list and I suspect that is why I can't build against them.

I thought the problem to be inside my configuration of Yocto's ADT. So I tried tried all 3 different methods of setting up a toolchain that were described in the Yocto Project Application Developer's Guide - Installing ADT and Toolchains guide, having them all end up in the same place:

fatal error: linux/mxcfb.h: No such file or directory

GOD, I *hate* that sentence!! ughhh!!!

Yocto App Dev Manual does not explain how I could specify custom include folders (so that I may manually link to usr/src/kernel) via makefiles. Does anybody here ( or out there?! :smileyhappy: ) know how I could do it?

Moreover, the samples get built fine when I bitbake and I can run them on the board (from unit_tests folder on /). What I am looking for is to develop my own capture logic using V4L and the VPU, from the samples/unit tests provided by Freescale. Please advise on how I am to build these using Eclipse IDE, since following the tutorials has led to many inconsistencies/incomplete setups and the makefiles that are used to build the unit tests (during bitbake) are completely (almost) in Chinese to me (meaning I can't figure out how the PATH is set for include files).

Thanks in advance!

I have never set up ADT on Eclipse. :smileygrin:

You say you have the files in your sysroot. I was not able to figure out if you double checked they are in the supposed place.

unit-test is tricky! Have you double checked the build procedure? Or the needed patches applied by recipe?

Could you, please, create a new thread with this issue? I´m sure ADT is something everyone would like to find, and everytime I comment on a DOC I must wait for moderator to accept my comment :smileysad:

please, make sure you mention me.

Hi Daiane

Thanks for your greate job of yocto documents.

I've got a problem when I wanted to create a toolchain by using "bitbake meta-toolchain"

The terminal says that "IOError: file <myworkdir>/sources/meta-fsl-bsp-release/imx/meta-fsl-arm/conf/layer.conf not found"

And I found there is no layer named meta-fsl-bsp-release under /sources.

Could you please tell me why?

Best Wishes

TongChunyang

Hi tongchunyang

take a loon on your conf/bblayer.conf and remove the un-needed lines

I don't know why you was supposed to use meta-fsl-bsp-release and now you're not using it any more :smileysilly: Please, follow you steps backward and figure out what you did wrong according with the instructions you've been using.

Hi Daiane

My apologize. I have seen my mistake about meta-fsl-bsp-release layer missing.

Maybe some wrong action made it be deleted.

Now my yocto working fine.

Thanks a lot for adivce

Best Wishes

TongChunyang

No ratings
Version history
Last update:
‎07-15-2013 06:57 AM
Updated by: