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 raspberry_pi

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 beagle

The target-board parameter will set the configuration for both the compiler and the Haiku image built from the generated Jamfile.
Available target boards are:

  • beagle: build Haiku for the BeagleBoard xm
  • raspberry_pi: build Haiku for the Raspberry Pi
  • verdex: build Haiku for the Gumstix Verdex

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 -sHAIKU_BOOT_PLATFORM=raspberrypi_arm haiku_loader
jam -q -sHAIKU_BOOT_PLATFORM=raspberrypi_arm haiku-floppyboot.tgz


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 pos