Compiling Haiku for Arm

Article contributed by kallisti5 on Sat, 2012-09-08 19:18

ARM Compiler Toolset

Building the ARM compiler toolset is quite easy and involves generating gcc binaries for your platform.
For a complete list of flags for the configure script, see Haiku's Configure Options

From the haiku source directory, run the following. (be sure to adjust the options to match your build environment.)

mkdir generated.armpi; cd generated.armpi
../configure --build-cross-tools arm ../../buildtools --target-board BOARD

If you want to run configure again to tweak some more options, you need to tell it to configure for ARM. This is done with the --cross-tools-prefix option:

../configure --use-gcc-pipe --cross-tools-prefix cross-tools/bin/arm-unknown-haiku- --target-board BOARD

The target-board parameter (BOARD) will set the configuration for both the compiler and the Haiku image built from the generated Jamfile. Available target boards are can be found on the port status matrix.

ARM Haiku Builds

These builds require a valid ARM compiler toolset. The ARM ports are in an extremely early state, don't expect these to work.

Compiling Haiku for the Beagle Board xm

The Beagle Board xm is a 75x75 mm ARM computer with all the features you would find on a normal x86 desktop machine. The AM37x includes an Cortex-A8 ARM processor and 256 MB of flash memory paired with 512 MB of RAM. This board is also supported by the Linaro version of Qemu.

jam -q @minimum-mmc

Compiling Haiku for the Verdex (mostly qemu)

The Verdex is an extremely small ARM machine marketed by Gumstix. It utilizes a PXA270 ARM processor made by Marvell. Testing with QEMU requires a firmware image in addition to the SD card image. This is done by jamming haiku-flash-uimage.

jam -q haiku-mmc-image haiku-flash-uimage

Compiling Haiku for the Raspberry Pi

The Raspberry Pi is a popular small ARM computer geared towards the educational market. Given the extremely low price (US$ 35) of the Raspberry Pi, demand has been quite high. The Pi includes a BCM2835 system on a chip (SoC), containing an ARM1176JZF-S processor bolted to the side of a VideoCore IV GPU. The more popular B model contains 256MB RAM with a configurable split between the ARM processor and the VideoCore GPU.

While the Raspberry Pi is attractive due to it's extremely low cost compared to it's moderate performance, it does have the drawback of the firmware being very closed source. The Raspberry Pi foundation does however work with developers to make improvements to the closed source firmware.

There is an extremely early port of Haiku to the Raspberry Pi.

jam -q @minimum-mmc


Re: Compiling Haiku for Arm

thank you for that

is it possible to make a build "ARM" on a Haiku host ?

because I tested and my result is : ( rev44584 gcc4 hybrid )

/boot/home/haiku/buildtools/binutils/ld/ld.texinfo:3190: [unexpected] cannot select column #1 in multitable.
make[4]: *** [] Error 1
make[4]: Leaving directory `/boot/home/haiku/haiku/generated/cross-tools-build/binutils/ld'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/boot/home/haiku/haiku/generated/cross-tools-build/binutils/ld'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/boot/home/haiku/haiku/generated/cross-tools-build/binutils/ld'
make[1]: *** [all-ld] Error 2
make[1]: Leaving directory `/boot/home/haiku/haiku/generated/cross-tools-build/binutils'
make: *** [all] Error 2

Re: Compiling Haiku for Arm

this was fixed last night. Update your buildtools and Haiku trunk and try building again, it should now go fine.
However, building the ARM version of Haiku will fail a bit later for lack of mkimage. We're working on that next.

Re: Compiling Haiku for Arm

hello to all,

I received my rasberry Pi and I got to compile on haiku tools and small first bricks.

Pulkomandy, you mean "mkimage". I obtained the source u-boot, but I do not know where to start.

I also saw a change in the kernel in making floppyboot, but how should I do to test it. (Sd-card in fat16, partition?)

thank you for your help

Re: Compiling Haiku for Arm

After building the ARM toolset (thanks for the info, Kallisti5!), what happens after this?
You use the the tools to build Haiku for ARM, then boot an experimental Haiku build on an ARM board?

So at this early time, what is ported?

Thanks for this update, I am quite curious.

Re: Compiling Haiku for Arm

fantastic news I will give it a go at the weekend, you might want to also consider the VIA APC
as they are now shipping into Europe ( ) [I stupidly bought mine a while ago and got charges VAT and 13quid by the courier which doubled the price]

Panda board :
odriod-x :
and A10 hackberry :

are also possibilties (I have the whole lot, mild ARM obssesion!)

getting a good hard float arm 1176F port should work on A8/9 boards as the 1176 has the OS support, movable vectortable, trustzone and VFP which are nice the only benefit of the A9 multidispatch and neon (A9 is also dual/quad core)

Re: Compiling Haiku for Arm

Haha, yeah plenty of interesting hardware out there to run Haiku/ARM on, I have about 20 different tablets here that I would love to see running Haiku/ARM on, however, quite some work to do before we are there!

Besides the fact that we have *very* minimal ARMv5 support, and all the devices you are talking about are ARMv6 and ARMv7, there's the actual System-On-Chip pheripherals to implement, so we can actually boot off something ;)

Not to mention the fact that lots of infrastructure specific or at least needed for embedded targets isn't there yet, it'll be a while before you'll be able to run Haiku/ARM on all of those devices.

Bottom line: Help in the form of patches is very much welcomed!

Verdex target details

Just a note, if you actually want to use QEMU to boot the Verdex image, you'll also have to include the haiku-flash-image target whilst building.

Currently, I'm not aware of a QEMU port for Haiku that supports ARM targets, but on Linux this is possible.

Complete commandline to build Verdex' set of images:

jam -q -sHAIKU_BOOT_BOARD=verdex haiku-mmc-image haiku-flash-image

Complete commandline to run it from within QEMU:

qemu-system-arm -m 256 -M verdex -serial stdio -vnc :0 -pflash haiku-verdex_flash_image_raw.img -sd haiku-verdex.mmc -s

This enables a VNC server to view the graphics output. If you don't want/need that, you can leave the -serial stdio -vnc :0 part out, and you'll just get the serial output (which is often enough for debugging).

The -s enables a gdb server within QEMU for debugging the code running in the QEMU VM, very very very useful ;)

Anyway, hopes this helps anyone getting started with Haiku/ARM!

Re: Compiling Haiku for Arm

Hello everyone,

Is it possible to add support for Tegra platform ?

Nvidia provided information[1] required in order to develop OS and boot loader software for Tegra.

It will be great to run Haiku on Tegra.


Re: Compiling Haiku for Arm

Beagle board? Raspberry Pi? Sheesh, are you serious?

I just bought an octa-core (Mediatek MT6592T) Arm tablet for AU$20.99 on ebay. For US$99.00 I can get an Adapteva Parallela board with 16 cores. As usual we've missed the boat completely.

Re: Compiling Haiku for Arm

You just bought... So what? Did you also convert the vast legion of Pi users to that particular momentary fad device?