Jump to content

ARM Builds, Native hardware and qemu


tazy
 Share

Recommended Posts

Hello!

 

Since over half an year, if not longer i been messing around with Funtoo on ARM. 

I did notice weird things such as the now removed from portage qemu-user is really buggy at times and

having about the same performance at times as the System i tried building it for. 

So currently i either can test/figure out how app-emulation/qemu works for static/chroot's

or just have my Netbook sit in a corner trying to compile everything. (800mhz i.MX515).

But neither seems to be a good option as documentation is scarce for qemu, such as the default setup using only one core and Portage end up being such a pain after 500 packages been emerged, dependency resolve seems to take up to 20 minutes at times.

Also anyone been building on a ODROID ? I'm considering getting one as build system.

Link to comment
Share on other sites

As I understand your problem is what way to go, for buildg arm binaries, right?, Have you considered cross-compiling?, I played around with the gentoo-prefix image of the gentoo for android project for a while, but my phone is too crappy to do real tests so I got bored. Anyway in my search for a solution to the compilation part, cross compiling seemed the best way to go, portage offers many tools to deal with it, and cross-dev lets you build a cross compiling environment easily once you get what kind of cross-compiler you want(I did a chroot with only a stage3 and a armv7a cross-compiler, so I didn't mess up with my main system), I don't remember the details of the tools now but, basically my goal was to build binary packages, it seemed possible with the tools already available, I didn't got to do the full test, only some test programs I compiled and did worked, so I can't assure all would work, Another way could be distcc combined with cross-compiling.

Link to comment
Share on other sites

Hello!

 

Since over half an year, if not longer i been messing around with Funtoo on ARM. 

I did notice weird things such as the now removed from portage qemu-user is really buggy at times and

having about the same performance at times as the System i tried building it for. 

So currently i either can test/figure out how app-emulation/qemu works for static/chroot's

or just have my Netbook sit in a corner trying to compile everything. (800mhz i.MX515).

But neither seems to be a good option as documentation is scarce for qemu, such as the default setup using only one core and Portage end up being such a pain after 500 packages been emerged, dependency resolve seems to take up to 20 minutes at times.

Also anyone been building on a ODROID ? I'm considering getting one as build system.

I've been using ARM embedded systems for a few years now.  I switched my ARM system to Funtoo close to a year ago and have been very happy with it.  Hah!  You get the same performance from qemu-user as the target system?  Lucky.  I find it to be nearly worthless it is so slow.

I have the best luck running distcc in pump mode.  Neddy Seagoon over at Gentoo swears by it, so I gave it a try and I agree, works great.  20% of the time or so it will fail, but it just falls back into non-pump mode, so no real downside.  It's "not recommended", but it works for Neddy & me too.

I think we all drool over the Odroid's.  I believe Jean, the Funtoo ARM dev has one.

Another option, you don't say which platform you are using, I see the old pogoplugs and dockstars going for $10-15 on ebay.  Pogoplug4 averages about $7 NEW (although it's pretty wimpy).  If you have something like that, one of those could be compiling in the background, while your main machine is actually doing work.  I'm thinking of doing that.

Finally, it won't help your compile issues, but I have an ebuild for cryptodev, which unleashes the hardware encryption on many of these devices.  If you do torrents, vpn, anything that uses crypto it may lower your load: https://github.com/yuyuyak/cryptodev-funtoo-gentoo-ebuild

Link to comment
Share on other sites

My main and first ARM platform i compile for is an Genesi Efika Smartbook, it made me realize how much of an plague .deb systems are..

also been messing more around with the Jolla phone i got, i must say its a quite good compiler..

Ever thought about chaining a couple of android phones to a compiler cluster?

Anyhow the qemu problem seems to be that it uses one core by default. I took a look at the qemu-binfmt: http://pastebin.com/yrLuuAKL

and so far i could figure out the binary does not get any cpu number info, so lets put an -smp 8 there.. wasn't sure whereto but i think i figured it out.

 

So currently. i have to assume qemu uses only one core in snail speed. (htop, may be right) i'm too lazy to do any speed tests but lets put an -smp 8

maybe, here? if [ $cpu != "arm" -a -x "/usr/bin/qemu-static-arm-binfmt -smp 8" ] ; aaannd..

I get:  chroot: failed to run command ?/bin/bash?: Exec format error.  So.. where to feed it.

Oh and i been getting on a FX-8320 near target system performance,

but with those make CFLAGS:  "-O2 -pipe -march=armv7-a -mfpu=neon -funsafe-math-optimizations -mfloat-abi=hard"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...