Cross compile, what are the tools ?

This forum is for discussion about general software issues.

Cross compile, what are the tools ?

Postby TheSaint » Wed Aug 01, 2018 5:52 am

Hello forum,
I'm using Archlinux since a decade, then I bought a SBC (Tinker Board S, ArmV7). To get Arch installed in that I'm facing that I don't have information enough to realize the purpose.
First attempt, I got nothing working form the provided tarball. I could boot with a different kernel (linaro or armbian) but then several hardware miss the proper firmware.

After this said, I think I need the tools to compile a kernel worth for my board. Even that I couldn't find a solution. I downloaded the package to compile one of the proposed sources. Imaging that failing like anything.

Please, tell me the guidelines for the cross compiling, and eventually to configure and install the kernel for ALarm ;), including the option to set up to compile from within the SBC itself.

PS: I forgot to mention that the internet connection is not working, even when ALarm may start.

EDIT
I found a guide but is debian related things. However it will help to prepare the kernel.
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am

Re: Cross compile, what are the tools ?

Postby summers » Wed Aug 01, 2018 9:56 am

easiest is the one arch provides https://www.archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/. Compiling your own cross compiler is one shed load of pain.

Actually cross compilers are such a shed load of pain, its better to compile natively if at all possible. That way you compile against the libraries that are on the target platform, in cross compiling its very hard to avoid leakage between the host system and the target system, e.g. code is compiled against something on host that does not exist on target.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: Cross compile, what are the tools ?

Postby graysky » Wed Aug 01, 2018 9:56 am

Distcc is at the core of this. Ssh into the target machine (armv7 or aarch64) and run distcc on an x86_64 box as well as on the target machine. The AUR contains the Arch ARM toolchain: https://aur.archlinux.org/packages/distccd-alarm-armv7h/ referenced in this article. Also see the Arch wiki on distcc.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Cross compile, what are the tools ?

Postby TheSaint » Wed Aug 01, 2018 11:29 am

I convene that compiling native is the right direction. As graysky says, it might have a good speedup by the help of distcc ;)
But a bit of doubt, which kernel ?
My situation is to have only debian tools to carry out the task. As I said, the Arch has non connections.
Is there a conflict, if use debian tools ?
It's all to try out ;)
TheSaint
 
Posts: 346
Joined: Mon Jul 23, 2018 7:57 am


Return to General

Who is online

Users browsing this forum: No registered users and 9 guests