You are not logged in.

#1 2008-11-25 21:18:26

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Arch on ARM?

I've been working with a robot from school, basically an EDB9302 ARM mobo/CPU combo from Cirrus Logic. It's been a pain.
This is the page for the (now discontinued) product: http://www.charmedlabs.com/index.php?op … view&id=29

The robot runs a barebones linux system with kernel version 2.6.8. I've been trying to upgrade the kernel, but once I got that working, I found that I had to upgrade everything else as well. So now I come to a choice.
I can stick with the "magic" system that Cirrus Logic puts out to generate firmware images.
Or I can try to get Arch running on there, off of a flash drive if it's too big (the board has 16 MB of flash ROM).

I have a working cross compilation environment, and I like the automation that Arch would provide, and I really want to get away from the massive system of shell scripts and Makefiles that Cirrus Logic put together to make basic "firmware images" for the board.

If I went the Arch route...
I wouldn't be looking to start a full port or anything. The ARM architecture is too diverse for a single kernel to support, so getting a full distro would be a pain. What I would like to do would be to use my cross compiler to get a basic Arch install on a flash drive and work from there. I dunno if I would just boot from the flash drive or try to put a setup into ROM.

Is this worth the effort? I like PKGBUILDs, and I would like having a solid base to work from, but is it worth the time it would take to actually get things running?
If there's anyone reading this that has done something of this sort, what pitfalls should I be aware of? I don't need a full port, all I can really run is a basic system, so there's not too much that needs to be moved over.
Right now, if I push through with the Cirrus logic package, I'm basically going to be remaking their package for them, and I really loathe the idea of tracing their Makefiles through their shell scripts to get everything to actually build against the new kernel. Plus everything is out of date anyway, so I'd have to redownload it all... Ugh.

Offline

#2 2008-11-26 12:29:25

timetrap
Member
From: Here and There
Registered: 2008-06-05
Posts: 342
Website

Re: Arch on ARM?

Oh how I wish Arch was available for all platforms . . . the NETBSD of linux

Offline

#3 2008-11-26 20:52:12

_alexmyself
Member
From: france
Registered: 2005-09-18
Posts: 89

Re: Arch on ARM?

http://openpandora.org/

maybe you could find help/ideas there.
maybe it's totally irrelevant, i've just see 'ARM' ..  smile

Offline

#4 2008-11-27 02:09:08

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

Well, I'm having great fun with the Canadian Cross, which lets you jump between platforms like this.
It works like this:
I have GCC on i686 (compiles on i686 for i686)
I use that GCC to compile a GCC Cross Compiler (compiles on i686 for ARM)
I use that Cross Compiler to compile GCC for ARM (compiles on ARM for ARM)

It's a rather confusing world out there. Anyway, once I get a basic compiler running, I'll make a bunch of packages from Core and get a base system, then I can work from there.

Offline

#5 2008-11-27 05:33:05

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,638

Re: Arch on ARM?

http://cross-lfs.org/view/1.1.0/ - this may help you doing the right steps though it's not ARM specific.

Online

#6 2008-11-27 16:59:31

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

I'm pretty sure I've got it. I have to get binutils for ARM (these don't really depend on anything specific to ARM, so they're easy to make)
Then I build the cross (i686 to ARM) GCC core (the C compiler)
Then I build the cross glibc
Then I build the rest of GCC (is this necessary?)

Once that's all done, I build GCC again for ARM to ARM compiles. Hopefully everything magically poofs from there.

My first discovery was that GCC 4.3.2 will not make a working i686-ARM cross compiler. It fails to compile a simple, nearly empty test program that configure was using when I tried to build the ARM-ARM compiler. There were quite a few assembler errors.

Anyway, I'm still plugging away at it, hopefully I'll get something working soon.

Offline

#7 2008-11-28 00:23:20

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Arch on ARM?

Not much to add, but good luck with your project!

Offline

#8 2008-11-28 04:45:32

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

Well, from what I've read, GCC 4.3.2 should work, so I think I did something wrong when I made the assembler (part of binutils). I'm remaking that, from the GNU tarball instead of the Arch one. If a developer could chime in on what is different in the Arch tarball, I'd be much obliged.

Anyway, I'm on the verge of trying to make the cross compiler manually rather than with PKGBUILD's, but I'm not giving up yet.

Offline

#9 2008-11-28 12:50:01

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: Arch on ARM?

... uArch? hmm


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#10 2008-11-28 12:54:27

chimeric
Member
From: Munich, Germany
Registered: 2007-10-07
Posts: 254
Website

Re: Arch on ARM?

dav7 wrote:

... uArch? hmm

Is uArch still alive? Last commit I see on launchpad was 28 weeks ago.

Offline

#11 2008-11-28 12:57:40

chimeric
Member
From: Munich, Germany
Registered: 2007-10-07
Posts: 254
Website

Re: Arch on ARM?

BTW I once build a working cross compiler toolchain for my NSLU2 using crosstool-ng (yeah, I want to run Arch on it as well, but free time is rare these days wink), you might want to take a look at it as well, it's pretty straight forward.

Offline

#12 2008-11-28 17:08:29

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

I've tried crosstool... and it failed. And crosstool-ng.
I've managed to get bintutils and the gcc core, but when I go to compile glibc, I'm told that forced unwinding is required, which probably isn't there because I disabled threading as recommended by a guide I read. I assume they mean stack unwinding (or whatever it's called; backtracing through function calls), which _might_ fall under threading. I dunno.
Anyway, I'm still at it.

(@&#$*)&$#)(%*)(@*$)@(*$)!@*$)(*)(*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
After I spend several days getting the cross compiler to work, just as I get GCC to build the c core and gear up for uClibc, I find this:
http://buildroot.uclibc.org/

I'll see if it works. Crosstool didn't.
At any rate, I have the GCC core. uClibc won't build, but I've gotten pretty far.

Last edited by arew264 (2008-11-29 05:35:11)

Offline

#13 2008-11-30 05:16:14

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

Buildroot worked, now I just have to figure out why I can't mount a flash drive as root.

Offline

#14 2008-12-09 01:55:22

naguz
Member
Registered: 2008-11-05
Posts: 95

Re: Arch on ARM?

All hail!
Hope you succeed. I would really like Arch for ARM as well. I am thinking of making a little BeagleBoard project (either a very homemade tablet laptop or a htpc-like thingy) and as both my laptop and my box runs Arch, running arch on the BeagleBoard too makes sense. I think. I figure Arch with lxde would run quite well on it.
If I am not completely lost: after getting the base system running, most packages should be able to be built by ABS, except a (hopefully) smalll number of packages that has some x86-dependant code?

Offline

#15 2008-12-09 03:30:03

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

Most things will run on the ARM, the only exception being applications that use x86 Assembly language and don't have substitutes for ARM.
I have a full cross compiler working with buildroot, I just need to find the time to get some core packages built and put everything on the microprocessor. What's frustrating right now is that Buildroot should be able to build a native ARM compiler, but a glitch in the makefiles somewhere causes it to try to link a native (i686) library to mpfr, a library required by the native (ARM) compiler, thus failing the build.
Oh well, I just need some time and it'll all work.

Would you be interested in the binary packages if/when I get them working? I'm going to be compiling for ARM920t with uClibc and the ARM EABI.

Offline

#16 2008-12-09 12:21:04

naguz
Member
Registered: 2008-11-05
Posts: 95

Re: Arch on ARM?

I'm going to use it on the BeagleBoard which has this processor, which is ARM v7 arch. So if it would work on that, then yeah.

I would also like to know how you got it working. There are some compilers and tools out that should make it "easy" to compile for the arm processor on a "normal" pc, but I haven't had the time looking into it yet, seeing as I am writing an exam due friday morning. Thinking about writing it, anyhow. tongue

Offline

#17 2008-12-09 12:29:31

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: Arch on ARM?

Take a look at Scratchbox. From what I can see it won't work on non-debian systems (:mad: *shoots developers* mad) but it might help.

There's a live Ubuntu appliance thingy that has Scratchbox configured in it... pretty crazy if you ask me, running an emulator in an emulator... but it works.

-dav7


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#18 2008-12-09 13:07:49

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Arch on ARM?

I think there would be a lot of interest if you hosted a public ARM repo. Best of luck!

Offline

#19 2008-12-09 14:15:50

naguz
Member
Registered: 2008-11-05
Posts: 95

Re: Arch on ARM?

dav7 wrote:

Take a look at Scratchbox. From what I can see it won't work on non-debian systems (:mad: *shoots developers* mad) but it might help.

Could QEMU be used for this? I know it is used to install Debian on the BB. Ref this wiki-article. From what I can see from a quick glance, it allows you to emulate an arm-prosessor on your computer to have a build-environment. It's in the repos too.

Last edited by naguz (2008-12-09 14:16:38)

Offline

#20 2009-01-04 15:13:35

steve___
Member
Registered: 2008-02-24
Posts: 439

Re: Arch on ARM?

Hey arew264,
I'm curious to hear if you have any updates with this project.

-steve

Offline

#21 2009-01-04 17:18:06

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

I didn't explain this properly in my first post, but I'm trying to get a base system running on a Qwerk, which is a nicely packaged (and now discontinued) Cirrus Labs EDB9302 made by Charmed Labs.
I've been having fun, but I haven't actually gotten an Arch system yet. I've just been trying to get a basic setup running, and even that doesn't work so well; I think there's something wierd about the Qwerk because I can make an ARM cross compiler that builds a working kernel (and as of kernel 2.6.28, my board is fully supported), but any program, no matter how I compile it, segfaults. Even Buildroot has this issue.
It turns out, though, that I seem to have gotten through most of the learning curve to where I at least know what I'm doing. I think that all I have left to do to get a stable system is to manage to build a base system with the Cirrus Labs cross compiler instead of making one myself, as frustratingly obvious as that seems. I don't know how useful the end result will be, though, if I wind up tied to an out of date binary distribution of GCC.

If I had a "normal" ARM board, I'm sure I would be done right now, I could use an emulator to build packages, and I would probably have a full repo, but something's odd about the Qwerk.

Offline

#22 2009-01-20 01:02:28

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

OKAY!
I have a fully operating system as of today. I haven't arch-ified it yet, but I'm getting there. Now I get to figure out how to use a flash drive to expand my storage space. The qwerk boots from flash ROM, and I can't seem to get it to mount a flash drive as root, but I have to get more than 8MB of filesystem space somehow.
Anyway, just a warning, if I do host some sort of public repo (which I hesitate to do), it would probably be ARM920t optimized because the ARM920t microprocessor has a hardware floating point processor, which I really want to make use of.
Anyway, I'll get cross compiling.

Offline

#23 2009-05-21 12:03:35

thoughtcrime
Member
Registered: 2008-09-27
Posts: 156
Website

Re: Arch on ARM?

Any news? I'd also like to see Archlinux on the openpandora (runs ARM cpu) smile


- blog (about arch and other stuff): http://thoughtyblog.wordpress.com/
- x86_64 user

Offline

#24 2009-05-21 12:47:56

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: Arch on ARM?

Perhaps we (read: someone less lazy than I) should make a wiki page listing all the ports and their home page... OSX pacman, Arch for arm, openmoko, etc

Offline

#25 2009-05-21 13:10:08

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Arch on ARM?

My conclusion is that it's not worth the effort. Projects like buildroot can give you a working linux installation much more simply, and you can add what you need manually from there.
For me, Arch has little benefit over systems like Buildroot because I'm running on 32 MB of RAM and 32 MB of flash (or maybe that's 16? I don't remember). There's no way I can get a native compiler running in that small a space, and even if I did, builds would take forever. Literally.

Now, if someone had a more workstation-like ARM board with the CPU, RAM, and storage to try and get Arch ported over, that would be worth attempting. For me, it's just not useful.

Offline

Board footer

Powered by FluxBB