compiling

Compiling for x86_64

Article contributed by xyzzy on Wed, 2012-11-21 08:54

x86_64 Compiler Toolset

Building the x86_64 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.

x86_64 exclusively uses GCC 4, different from x86 which can be built with both GCC 2 and GCC 4. From the Haiku source directory, run the following to compile the build tools (be sure to adjust the options to match your build environment):

./configure --build-cross-tools x86_64 ../buildtools

x86_64 Haiku Builds

These builds require a valid x86_64 compiler toolset (see above), and might also need additional software packages installed -- see the pre-requisite software page for more details.

Compiling a basic raw Haiku disk image

This is the most basic build, it generally is good for quickly testing the OS after making modifications as it doesn't contain a lot of extra applications. Be sure to modify -j2 with the number of cpu cores on your build system to ensure the fastest build times.

jam -q -j2 haiku-image

Compiling raw nightly disk images

This is the default nightly image build target. This contains a complete system with an included compiler. Be sure to modify -j2 with the number of cpu cores on your build system to ensure the fastest build times.

jam -q -j2 @nightly-raw

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

Syndicate content