Cross compiling - How to start

This forum is for discussion about general software issues.

Cross compiling - How to start

Postby caocao » Tue Apr 08, 2014 2:24 am

Hi,

I have successful build the cross-toolchain as describe in http://archlinuxarm.org/developers/dist ... -compiling.
However, this instruction is quite vague and I dont know how to start to compile the source code.

I want to compile the code on my pc (fedora x86) and can deploy and run correctly on target arm v7 board (http://archlinuxarm.org/platforms/armv7 ... /odroid-u3).

My question is how to cross compiling with make file and cross-toolchain tool.

PS: I can compile the source code successfully but it's only run on my pc as normal compile.

Any help will be appreciated.

Thanks,
Quang
caocao
 
Posts: 6
Joined: Tue Apr 08, 2014 1:53 am

Re: Cross compiling - How to start

Postby moonman » Tue Apr 08, 2014 7:51 am

Actual compilation is done on the target device with the help of distcc to speedup the process. Lookup distcc and what it does.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Cross compiling - How to start

Postby caocao » Tue Apr 08, 2014 8:52 am

I dont have the target device now.
The question is can I compile in x86 machine with arm target (then I will deploy to the target later)?
caocao
 
Posts: 6
Joined: Tue Apr 08, 2014 1:53 am

Re: Cross compiling - How to start

Postby moonman » Tue Apr 08, 2014 9:02 am

You can, but we can't help you with it since we don't use it this way. It is more hassle than it's worth.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Cross compiling - How to start

Postby caocao » Tue Apr 08, 2014 9:57 am

Thx for ur reply anw.
Extract from http://archlinuxarm.org/developers/dist ... -compiling
$this->bbcode_second_pass_quote('', 'Y')ou can now run "makepkg" as you normally would and the hosts specified will start receiving work. If the hosts are unavailable, the package will simply compile locally.

Correct me if I am wrong on local compile
caocao
 
Posts: 6
Joined: Tue Apr 08, 2014 1:53 am

Re: Cross compiling - How to start

Postby moonman » Tue Apr 08, 2014 6:25 pm

As I said, this is designed to be run on the target device.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Cross compiling - How to start

Postby caocao » Wed Apr 09, 2014 3:42 pm

So, what is the result if the target is not available?
caocao
 
Posts: 6
Joined: Tue Apr 08, 2014 1:53 am

Re: Cross compiling - How to start

Postby WarheadsSE » Wed Apr 09, 2014 4:05 pm

So you have no ARM device? If you have any ARM device with the same CPU architecture generation (ARMv5. ARMV6, ARMv7) that will suffice.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Cross compiling - How to start

Postby caocao » Thu Apr 10, 2014 4:39 am

No, I have no device atm. Will have in near future :)

$this->bbcode_second_pass_quote('', 'T')he question is can I compile in x86 machine with arm target (then I will deploy to the target later)?
caocao
 
Posts: 6
Joined: Tue Apr 08, 2014 1:53 am

Re: Cross compiling - How to start

Postby opotonil » Thu Apr 10, 2014 7:47 am

opotonil
 
Posts: 44
Joined: Sat Feb 08, 2014 1:17 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 18 guests