Topic: what development environment do you suggest?

I want to compile some Linux code for my brand-new Infocast.

It looks like I have at least three choices:

1) install the gnu toolchain directly on my Infocast
2) install the gnu toolchain on my Ubuntu system and cross compile
3) install the Scratchbox toolkit on my Ubuntu system and cross compile

I would tend to prefer 2) or 3) just because it gives me tons of speed and space. Any reason why I should choose one over the other or shun them both in favor of 1)?

<Obligatory tip of the hat: the Infocast and its open software environment are both superb. Maybe not perfect, but we should never let the perfect interfere with the good!>

Re: what development environment do you suggest?

Personally, I tend to use option 3 the most.  I've found that some big projects are tough to build entirely locally due to the size of the memory - while you can swap, that tends to get very slow.

For smallish things, I use option 1.

There are still some things that build best with option 2 - especially in those cases where it's tough to install obscure tools to build in either scratchbox or locally.  Unfortunately, those same projects are often the worst for cross-compiling.

Re: what development environment do you suggest?

Duane wrote:

Personally, I tend to use option 3 the most.  I've found that some big projects are tough to build entirely locally due to the size of the memory - while you can swap, that tends to get very slow.

For smallish things, I use option 1.

There are still some things that build best with option 2 - especially in those cases where it's tough to install obscure tools to build in either scratchbox or locally.  Unfortunately, those same projects are often the worst for cross-compiling.

Thanks for the quick response, Duane. It's just what I needed.

This is exciting. I haven't tried any cross compiling since I gave up my iPAQ years ago.

Trouble is, I've been having so much fun with my InfoCast today, I may have to buy another one for diddling and keep the first one as an appliance :-)

Re: what development environment do you suggest?

Ha, I totally understand.

I *think* unionfs is available on the Infocast - if so, that's what I tend to use in the Chumby One when I'm doing stuff locally so I don't modify the actual firmware but get most of the benefits of doing so.

I create an overlay file system mapped to /mnt/storage or /mnt/usb, and do all on my modifications, and I can then remove and restore the overlay at whim.

If unionfs is not there, you should be able to build it pretty easily if this technique interests you.

Re: what development environment do you suggest?

Yes, UnionFS is available on the Infocast.

When I finish polishing it some more, Open Embedded should also be available for the Infocast.  That's how the on-device compiler was built in the first place.  For those of you who really like to hack smile

6 (edited by RunningLight 2010-09-18 16:38:42)

Re: what development environment do you suggest?

ChumbyLurker wrote:

Yes, UnionFS is available on the Infocast.

When I finish polishing it some more, Open Embedded should also be available for the Infocast.  That's how the on-device compiler was built in the first place.  For those of you who really like to hack smile

Thanks to you both. Sometimes one has a mindset and can't get past it. In my case, this is my first serious foray into embedded systems (All I did with the iPAQ was run some free-standing applications). I've used UnionFS in other situations on traditional x86-based systems but never thought about using it on embedded ARM-based systems despite the fact it's a Linux notion not a CPU notion.

As for OpenEmbedded, lay on Macduff!

By the way, since I'm a bit lazy and don't want to spend toooo much time digging through their directories, is there any reason I shouldn't use the latest compiler (arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2) from CodeSourcery instead of the compiler (arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2) on files.chumby.com pointed to by the wiki.chumby.com entry? Like customized libraries, fer instance?

Regards

Re: what development environment do you suggest?

You might have trouble with glibc versioning.  When I tried the latest, I would get errors when I ran the compiled program.  Going back to 2008q3 fixed the problem.

One thing to note is that you don't have to rename the compiler, or set up the symlinks.  I usually just run the installer package provided by CodeSourcery, and then invoke the compiler as arm-none-linux-gnueabi-gcc.

Re: what development environment do you suggest?

So for completeness, I thought I should outline the environment I settled on.

I read up on the two versions of ScratchBox and decided ScratchBox2 was for me.

I'm running Ubuntu 9.10 on an x86 desktop. I used the Synaptic Package Manager to download and install ScratchBox2 (and its associated libsb2), and also RootStock, from the Ubuntu repositories. I downloaded and installed the 2008q3 toolchain from files.chumby.com. I followed the instructions I found on other web sites to initialize all this and build a root file system.

I tested this lashup with a trivial c program which, while I was in the ScratchBox, compiled and ran AS IF I were on an ARM machine. I then transferred the complied program to my Infocast and confirmed that it ran on a real ARM machine too.

I then downloaded and successfully compiled Nano-X and its demo programs. I got a ton of warnings but the compile ran to completion and the results run (yah!) on my Infocast.

Regards,
Kent

Re: what development environment do you suggest?

Cool!

If there were any specific things you had to do differently, please document them on the wiki!

Re: what development environment do you suggest?

Did you pick Ubuntu 9.10 specifically or was that just your existing installed OS?  I want to setup a similar environment but am running Ubuntu 10.04 (soon to be upgraded).  Setting up a Virtual Machine with an older but more compatible base OS is not a problem.

Thanks in advance.

Re: what development environment do you suggest?

TheWalt wrote:

Did you pick Ubuntu 9.10 specifically or was that just your existing installed OS?  I want to setup a similar environment but am running Ubuntu 10.04 (soon to be upgraded).  Setting up a Virtual Machine with an older but more compatible base OS is not a problem.

Thanks in advance.

That just happened to be the version running on a spare system I chose for my experiments in cross-compiling. I was too lazy to upgrade it first.

I'm about to try to replicate my development environment on my laptop which is running a fully updated Ubuntu 10.04. I don't anticipate a problem, but I'll certainly let you know if I run into any.

Regards,
Kent