GHC builder board up’n’running

Just to write some status, I’ve dedicated received Freescale i.MX53 Quick Start Board to serve as a GHC builder machine. It’s already running for some time. Installed OS is Ubuntu 11.10 and I’ve installed on it Ubuntu’s 12.04 LLVM 3.0 packages. The builder already caught one issue during the end of February which I’m still trying to solve in my currently very limited free time… If you’d like to see results of the builder, then have a look into cvs-ghc mailing list and search for kgardas-linux-arm-head string in the emails subjects.


Welcome back Freescale i.MX53

Few months ago I’ve been contacted by Marsha Chang from Freescale i.MX53 marketing division if I’d like to have another i.MX53 Quick Start Board as a replacement for the board I needed to return back to Freescale during this summer.
Having more ARM boards never hurts, so I replied “yes” quickly and today another i.MX53 is already siting on my SMC switch with preinstalled Ubuntu 11.10. The only quirk so far I’ve had with Ubuntu, which looks like switched to NFSv4 and this all goes kind of wrong with my Solaris 11 ZFS/NFS id mapping. Since both machines are well secured and basically just available to me alone, I’ve given up on increased NFSv4 security and decided to use quickest and least hurting path and enforce usage of NFSv3 on Ubuntu side about which I know is running well. At least it does so in Ubuntu 11.04 running on my Pandaboard. The trick is to put vers=3 into appropriate option column in /etc/fstab file:

solaris:/export/home/karel /export/home/karel nfs vers=3 0 0

Otherwise everything is working as expected and the board is already crunching through LLVM 3.0 compilation and testing, but that’s the topic for next post anyway.

It takes quite some time…

Indeed, it takes quite some time to build unregisterised build of GHC on ARM machine. But let’s start from the beginning. I’ve been always quite ignorant to major computer architecture x86. To be honest this is probably caused by my laziness to read more about it since my university studies where I’ve been hit by all those segments, chaotic memory model and such. I must admit that AMD did really good job on AMD64, finally flat address space, 64 bit etc, but yet the platform is so boring, running everywhere… 🙂

So what’s more interesting to me are all those other platforms: PowerPC, MIPS, ARM, IA64, etc, etc. Generally speaking I quite like load-store CPU model and since last year I’ve more focused my attention to IA64 and ARM. IA64 since this is quite interesting from the assembler point of view and to ARM, since this is x86 world conqueror and my bet is that’s also future architectural winner. So ARM. I’m its user for more than five years … running it in my mobile phone, but I’m still more and more curious to learn a little bit more about this architecture and somehow connect this to my still to be performed Haskell learning — as Haskell is another project which makes me wonder what will be its outcome. Quite interesting language indeed. So Haskell and ARM, that’s it. From Haskell I’ve chosen GHC as it seems to be most spread around the community, although to be honest this is not the most easy choice if I consider ARM architecture. Anyway, the project evolves quickly and man is even able to perform unregisterised (read: build which produces not so fast binaries) build of GHC on ARM machine. I did this from time to time on GCC’s compile farm EfikaMX hosts, but still was considering to buy my own machine for better GHC/ARM hacking which I hope this blog will be about.
Anyway, big thanks to Freescale and big thanks to my friend working for Freescale who lend me nice i.MX53 Quick Start Board. I’m now able to start actual “local” tests and even hacks as time permits.

I’ve installed Freescale recommended Ubuntu/Debian based distro, installed provided GHC 6.12.1 and was able to build unregisterised build of GHC 7.0.3. I’ve used following mk/ file to perform the build just to save the time I’ve disabled profiling libs which I don’t need. I need GHC 7.0.3 just to be better prepared to build GHC HEAD.


And finally I got back to the post title, funny thing is, it took 16 hours 30 minutes to perform this build! Interesting is that what I observed from top, it looks as majority of time was spent in C compiler which makes a hope that perhaps future GHC with either LLVM or NCG ARM support might run quite faster… Err, if you wonder, I don’t hold build tree on (micro)SD card nor SATA drive nor USB flash connected to the i.MX53 board. I use NFS to mount some space from my main Solaris workstation to the board. This certainly causes some slowness, but not so big, believe me and I rather trust ZFS on mirrored drives than any consumer flash storage on the board.