c compiler in the Linux 3.14.28 image on i.MX6Q

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

c compiler in the Linux 3.14.28 image on i.MX6Q

1,060 Views
jingyizhang
Contributor I

Hi,

I am new to Linux and just flashed the SD card with the Linux 3.14.28 BSP provided by Freescale,

but when I try to compile anything, it says I have no acceptable c compiler.

This is the output in terminal when I tried to compile a gstreamer plugin downloaded from Freescale.

sh-4.3# ./configure

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether to enable maintainer-specific portions of Makefiles... no

checking for gcc... no

checking for cc... no

checking for cl.exe... no

configure: error: in `/home/root/gst-fsl-plugins-3.0.11':

configure: error: no acceptable C compiler found in $PATH

See `config.log' for more details

and this is my $PATH value

sh-4.3# echo $PATH

/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

Do I need to compile my own gcc on a host machine and copy it over? Or compile the plugin on the host machine with cc and copy that over? Quite confused, any pointers would be greatly appreciated.

Labels (4)
Tags (1)
0 Kudos
5 Replies

670 Views
BiyongSUN
NXP Employee
NXP Employee

you need to know what is "cross compile" first.

0 Kudos

670 Views
b36401
NXP Employee
NXP Employee

You can compile GCC among of the packages as you are using Yocto to build the image.

Please refer Freescale Yocto Project User's Guide for the details.

P.S. I see Dhaval had already answered the question.

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

670 Views
dhavalvadhar
Contributor IV

Hi,

You need a cross compiler for the kernel as Freescale i.MX6 is ARM Architecture. If you are using Yocto, then you can download the toolchain using 'bitbake meta-toolchain'. On the completion of this command, the toolchain will be available at "<build dir>/tmp/deploy/sdk". You need to run the Shell Script available in this directory.

The above mentioned shell script installs the toolchain at default directory (/opt/poky/<version of toolchain>"). On this path, you can find the setup environment script. Source that script and it will setup the environment for you. Ta da!! Your environment is now ready to build the kernel for i.MX6.

Hope this helps!

Thanks,

Dhaval

0 Kudos

670 Views
jingyizhang
Contributor I

Hi Dhaval, thank you for the quick response!

I am using Yocto to build the sdcard image for the board, I am following this tutorial:

http://imxcv.blogspot.ca/2014/02/building-opencv-24x-for-freescales-imx6.html

along with:

Yocto Training - HOME

to setup the Yocto build on my Ubuntu host machine.

Can I run the bitbake meta-toolchain command just before the step where I flash the SD card?

0 Kudos

670 Views
dhavalvadhar
Contributor IV

Hi Jingyi,

The 'bitbake meta-toolchain' command will setup the the Poky Toolchain, using which you can cross compile the sources. It doesn't do anything else. So you can run this command any time.

Also you can follow the Freescale Yocto Project User's Guide.pdf to setup Yocto on your Ubuntu system. You can find it here.

Hope this helps!

Thanks,

Dhaval

0 Kudos