site  contact  subhomenews

T2 cross-compiling

November 05, 2011 — BarryK
I took off a couple of days to do some house renovating. Apart from that, I have been experimenting with doing a cross-compile build in T2.

So far, I have only used T2 in the "normal" way, which is to compile the source packages on a x86 PC, for an x86 PC. However, compiling on a x86 PC for an ARM CPU board is a "cross-compile", which is very different, and much more difficult for T2 -- T2 can only compile a sub-set of it's package collection.

What I soon discovered, after hitting many compile failures, is that it has been awhile since anyone has done a cross-compile with T2. I have been reporting bugs and supplying fixes to the T2 email list:
http://news.gmane.org/gmane.comp.t2.devel

...I have been a busy boy!

In the T2 development system, there is a package/*/*/*.desc file for each package, and this has an entry that states whether the source can be cross-compiled. When I say "can", it is a matter of the T2 developers having ironed out the wrinkles if any, and possibly other packages not-so-marked could be also made cross-compilable.

An example that cannot currently be cross-compiled is Firefox, but as I see it, the main purpose of the T2 cross-compile is to create a working toolchain that can be booted into, then apps can be compiled.

Comments

Shutdown problem
Username: bigpup
Barry, Something you may want to look at concerning rc.shutdown. http://www.murga-linux.com/puppy/viewtopic.php?t=73122

Re shutdown problem
Username: BarryK
"bigpup, That forum post is referring to an old version of rc.shutdown. The code in the latest rc.shutdown (in recent Woof-built puppies, Racy, Wary, Slacko) may have fixed the problem mentioned in the forum post.

lose time T2
Username: linuxcbon
"Dont lose your time with T2. Find something that works already. Not sure which, don't have time to look.

crosstool-ng
Username: Iguleder1
"I like [url=http://crosstool-ng.org/]crosstool-ng better for cross-toolchains. You can generate a perfect cross-toolchain with it, then use that toolchain to bootstrap a native ARM toolchain in T2, Buildroot or whatever you use (e.g you give it the cross-compiler prefix instead of using "gcc"). This way, you skip the problematic part of bootstrapping a cross-toolchain - you build it with a tool dedicated for that task. It makes life easier ... and you have a toolchain you can work with while it's compilin' :)

ARM Distros
Username: Dougal
"Barry, jcm wrote an article for LWN about the creation of the Fedora ARM port, which might give you some insight into the complexities involved... http://lwn.net/Articles/463506/ http://lwn.net/Articles/463507/ As for a build environment, you might want to use OpenEmbedded (http://www.openembedded.org/) or Yocto (http://www.linuxfoundation.org/collaborate/workgroups/yocto) .


Tags: puppy