LTIB native toolchain

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

LTIB native toolchain

3,350 Views
niklasmolin
Senior Contributor I

Hi.

I'm just getting started working with the i.MX6 and LTIB.

I'm trying to figure out how to include a toolchain (gcc, g++ etc.) when I compile my LTIB image.

Do I download some package and cross-compile it or do I choose this in the LTIB menu?

Thanks,

Niklas

Tags (2)
0 Kudos
Reply
27 Replies

1,644 Views
christiann
Contributor I

Hi Niklas

To add a custom or extra toolchain, you must add the option in

config/platform/your_platform/main.lkc

See the previous toolchains to see how it must be added.

0 Kudos
Reply

1,644 Views
OtavioSalvador
Senior Contributor II

Is there any specific reason to not try Yocto? It is dead easy to generate an external or internal toolchain and it'd easy upgrade for next BSPs provided by Freescale.

0 Kudos
Reply

1,644 Views
niklasmolin
Senior Contributor I

Hi Octavio.

I have just started to change to YOCTO (started this week).

I'm still trying to get up to speed on that one.

For instance, is there a similar menuconfig for the image (packages etc.) like in LTIB?

I managed to get a manuconfig for the kernal, but I want to also be able to add packages (for instance openssh, curl etc.).

I'm pretty sure it is easy, but I'm only a few days old into YOCTO yet.

/Niklas

0 Kudos
Reply

1,644 Views
Yuri
NXP Employee
NXP Employee
0 Kudos
Reply

1,644 Views
niklasmolin
Senior Contributor I

I saw in the toolchain for the LTIB that they have native tools for the ARM.

So I copied that directory into my image and it seems to be working.

Is this a "wrong" approach?

/Niklas

0 Kudos
Reply

1,644 Views
LeonardoSandova
Specialist I

Not sure if it is wrong approach but all packages should be installed using LTIB/Yocto. The problem comes when you copy binaries to the target but not its dependencies. Try compiling the kernel, let us know if it worked and how long it took to compile :smileyhappy:

Leo

1,644 Views
niklasmolin
Senior Contributor I

I haven't tried to compile the kernel.

But for the moment I'm trying to compile Erlang/OTP (it is still compiling and seems to take time).

I had to set the environment variable CPLUS_INCLUDE_PATH, since it had problem to find some defines when using g++.

I have to check if the default include path for the g++ can be included in the configuration of LTIB. 

0 Kudos
Reply

1,644 Views
LeonardoSandova
Specialist I

which toolchain are you trying to use? Not sure if it is easier, but have you tried to do it on Yocto instead of LTIB?

Leo

0 Kudos
Reply

1,644 Views
niklasmolin
Senior Contributor I

I'm using the LTIB toolchain, which is installed when you install the LTIB package.

I have no problem to compile the LTIB package and also run it on my target board (booting from a SD card).

But I'm trying to figure out how to include the toolchain, so I can compile code on my target system (Freescale).

/Niklas

0 Kudos
Reply

1,644 Views
LeonardoSandova
Specialist I

Got it. No idea how to create a sdk image. BTW, why do you want to compile on the board?

0 Kudos
Reply

1,644 Views
niklasmolin
Senior Contributor I

Some applications I want to use might be easier to compile naively instead of cross-compiler (for instance couchDB etc.)

0 Kudos
Reply

1,644 Views
LeonardoSandova
Specialist I

I see. I have done the same job but with Yocto. On Yocto, chose any image (i.e. core-image-base) and add the following lines to your conf/local.conf file:

IMAGE_FEATURES += " \

    dev-pkgs \

    tools-sdk \

"

EXTRA_IMAGE_FEATURES += " \

    tools-debug \

    tools-profile \

    tools-testapps \

    debug-tweaks \

"

The resulting .sdcard will have most of the familiar development tools and of course the toolchain. An extra-bonus would be if you create the CouchDB recipe (if case no one has done it before) so you do not need to add all the SDK stuff into your final LInux image. BTW, any reason using couch instead of mongo :smileyhappy: ?

Leo

0 Kudos
Reply

1,644 Views
niklasmolin
Senior Contributor I

Hi Lenoardo.

I have decided to change to YOCTO instead, since LTIB will not be "supported" anymore.

When I do a sync, will it always rebuild the whole image (seems to take forever)?

Do you know if YOCTO takes more power than LTIB?

Right now I'm running the yocto base image and it seems to have a higher CPU temperature.

When I run the LTIB (without much extra programs running) it stays around 43 degree Celsius.

When I run Yocto base image I get a CPU temperature around 51 degree Celsius.

/Niklas

0 Kudos
Reply

1,644 Views
LeonardoSandova
Specialist I

Oh really? Are you comparing LTIB min profile versus Yocto core-ima-minimal? Both are the minimal filesystem to boot a board. By the way, are you taking the temperature from /sys?

'sync' updates all the branches on Sources, if you have created some commits internally, those will be put in front, in other words, 'sync' command rebases. Because the Yocto Metadata was updated, bitbake will notice this an it will do a rebuild.

Leo

0 Kudos
Reply

1,644 Views
niklasmolin
Senior Contributor I

I compared the LTIB build I did (base on the sabrelite built med additional packages) with the core-image-base (YOCTO).

I use the sys/class/thermal/thermal_zone0/temp to check the temperature.

But I also notice if I touch the processor, it's much warmer when I run the YOCTO image compared to the LTIB image.

/Niklas

0 Kudos
Reply

1,644 Views
LeonardoSandova
Specialist I

naive question: did you let the board (SoC) cool between one measure and another? In order to escalate this, I suggest to do the test bases on the minimal profiles on both system. Do not add your packages in this test.

Leo

0 Kudos
Reply

1,644 Views
niklasmolin
Senior Contributor I

Leo,

I'll try to use the minimal image and check the result.

I don't think I waited that long time between each run.

Right now the base-image is showing 47 degree (not sure if it's a little bit colder in the room right now).

But since I went back and forth between the LTIB image and the YOCTO image and saw this result, I don't think that the high temperature could have be caused by the processor hasn't been cooled down.

Could there be different frequency settings for the 2 build enviroments (I'm building for the sabrelite board)?

/Niklas

0 Kudos
Reply

1,643 Views
LeonardoSandova
Specialist I

It could be. which u-boot and kernel versions are you running in both systems?

0 Kudos
Reply

1,643 Views
niklasmolin
Senior Contributor I

I'm using the u-boot from the SPI flash on the sabrelite board and I haven't changed that one.

In LTIB the kernel is 3.0.35-2508 and in YOCTO image 3.0.35-4.1.0.

/Niklas

0 Kudos
Reply

1,643 Views
LeonardoSandova
Specialist I

No idea Niklas, both versions kernels are basically the same.  I am not sure if the kernl init script is launching the same daemons, that may explain the temp difference. THis is important, so please create a new thread with all this info.

Leo

0 Kudos
Reply