- 1 About
- 2 Building A Haiku CD Image In Linux
- 2.1 Prerequisite: Linux Software Needed To Create The Haiku Build Tools
- 2.2 Download: Get The Haiku Source Code
- 2.3 Updating: Get The Absolute Latest Copy of Haiku
- 2.4 Build Tools: The Tools You'll Need To Build Haiku
- 2.5 Jam: Bringing It All Together
- 2.6 Optional Packages: Which Software To Include In The CD Image
- 2.7 Build Haiku: Create A Haiku CD Image
- 2.8 Booting Haiku: Add Haiku To GRUB
- 3 Sharing Files
- 4 Optional Packages
- 5 Software
- 6 Haiku Ports
- 7 Links
- 8 Have Fun
Building A Haiku CD Image In Linux
A Haiku CD image can be used to live boot Haiku (run it without affecting your drive) or to install it.
Why would you download and build your own image of Haiku when there are nightly CD images available on the Haiku website? There are some great reasons to build an image yourself. I find downloading only the updates and building what has changed to be much faster than downloading an entire CD image. Also, by building the image yourself, you will be able to include any extra software that you plan on using (for example, a web browser) right in the CD image. The nightly images only include the Haiku operating system.
Most of the information here is based on the Haiku guides. The difference between those guides and this page is that this page is specifically about setting up a Haiku build area in Arch Linux.
Let's get started!
There are two "collections" of source code needed to build Haiku in Linux: the source code for the build tools used to build Haiku, and the source code for Haiku itself.
Prerequisite: Linux Software Needed To Create The Haiku Build Tools
The first thing you will need to do is install the necessary Linux software. Please understand that this is not what you will be using to compile Haiku. Instead, this is what you will be using to compile the build tools used to compile Haiku.
# pacman -S subversion yasm autoconf automake texinfo flex bison gawk base-devel
Download: Get The Haiku Source Code
Download the source code for the build tools and for Haiku. Both of them can be easily downloaded by using Subversion.
Get the source code for the build tools:
$ svn checkout http://svn.haiku-os.org/haiku/buildtools/trunk Haiku/buildtools
Get the source code for Haiku:
$ svn checkout http://svn.haiku-os.org/haiku/haiku/trunk Haiku/haiku
These two commands will create a new directory called "Haiku". We will spend pretty much the rest of the time inside this directory.
$ cd Haiku/
You will notice it has two sub-directories: "buildtools" and "haiku".
Updating: Get The Absolute Latest Copy of Haiku
You can update all of the Haiku source code at any time. Of course, if you just finished downloading the Haiku source code then there is no need to do this; you already have the latest updates! But for future reference, here is how you do it. The Haiku source code is updated daily. In contrast, the build tools source code is hardly ever updated, which makes sense since all they do is build Haiku.
$ cd haiku/ $ svn update # Update the Haiku source code $ cd .. $ cd buildtools $ svn update # The build tools are not updated very often $ cd ..
Now that you have finished downloading the source code, it's time to make the build tools.
Build Tools: The Tools You'll Need To Build Haiku
Build the Haiku build tools. These commands may look strange because you are building the build tools from inside the "haiku" directory, but that's what you're supposed to be doing.
Now, I think a little explanation is needed: there are four different "types" of Haiku images you can build. They are:
- GCC2 HYBRID GCC4
- GCC4 HYBRID GCC2
What do they mean? Well, one of the original goals of Haiku was to create a modern operating system that could run original BeOS software. But, the developers ran into a problem: to put it simply, the most modern version of GCC is version 4, but original BeOS software only worked if Haiku was built using GCC version 2. To solve this, they created a "hybrid" build which included the libraries needed to run software from both GCC 2 and GCC 4. Genius!
I personally think the GCC4 HYBRID GCC2 build is the most convenient, so I will focus on that one, but I will include some UNTESTED commands to build the other three types.
Now, let's build the build tools for creating a GCC4 HYBRID GCC2 image.
$ cd haiku/ $ mkdir generated.x86gcc2 # Used to create the GCC2 libraries $ mkdir generated.x86gcc4hybrid # Used to create the GCC4 libraries $ cd generated.x86gcc2/ # Create the GCC2 libraries first $ linux32 bash # NOTE: ONLY NEEDED ON 64 BIT LINUX $ ../configure --build-cross-tools ../../buildtools/ --include-patented-code $ exit # NOTE: ONLY NEEDED ON 64 BIT LINUX $ cd .. $ cd generated.x86gcc4hybrid/ # Time to create the GCC4 libraries $ ../configure --build-cross-tools-gcc4 x86 ../../buildtools/ --alternative-gcc-output-dir ../generated.x86gcc2/ --include-patented-code $ cd ..
And that's it! The build tools should compile without a problem and are ready to be used. Please move on to the next section #Jam: Bringing It All Together.
If you are interested in making a different kind of Haiku build, here are some commands to try. I HAVE NOT TESTED THEM, so I don't know if they will work.
For a GCC2 build:
$ cd haiku/ $ ./configure --build-cross-tools ../buildtools/ --include-patented-code
For a GCC4 build:
$ cd haiku/ $ ./configure --build-cross-tools-gcc4 x86 ../buildtools/ --include-patented-code
For a GCC2 hybrid build:
$ cd haiku/ $ mkdir generated.x86gcc4 $ mkdir generated.x86gcc2hybrid $ cd generated.x86gcc4/ $ ../configure --build-cross-tools-gcc4 x86 ../../buildtools/ --include-patented-code $ cd .. $ cd generated.x86gcc2hybrid/ $ linux32 bash $ ../configure --build-cross-tools ../../buildtools/ --alternative-gcc-output-dir ../generated.x86gcc4/ --include-patented-code $ exit $ cd ..
Jam: Bringing It All Together
Ok, I sort of lied. You will also need the jam tool to build Haiku. If you don't know what jam is, think of it as a modern GNU Template:Codeline command. I don't know if it's better or worse than GNU make, but it certainly works well for Haiku.
You can't use the version of jam that is provided by your Linux distribution. Haiku needs a special version of jam.
Build and install jam:
$ cd buildtools/jam/ $ make # ./jam0 install $ cd ../..
Of course, you can install your new jam anywhere, but please confirm you are using the right one with this command:
$ which jam
Optional Packages: Which Software To Include In The CD Image
I think this is the fun part. You can choose which optional packages will be included in your Haiku CD image. You do this by editing the Template:Filename file. Create one by copying the example file:
$ cp haiku/build/jam/UserBuildConfig.sample haiku/build/jam/UserBuildConfig
When you edit your new Template:Filename file, you will notice the section at the bottom that is commented out that says "Add optional packages to the image". Put your "AddOptionalHaikuImagePackages" commands here.
You can see a list of available packages in the file Template:Filename. One particularly useful one is "WebPositive" web browser.
Build Haiku: Create A Haiku CD Image
This final step is the easiest. Use the new jam command to build your GCC4 HYBRID GCC2 Haiku CD image.
$ cd generated.x86gcc4hybrid/ $ jam -q haiku-cd
When in finishes compiling correctly, you will have a bootable Template:Filename! Burn it to a CD and it is ready for a live boot.
Booting Haiku: Add Haiku To GRUB
But! Before you leave Linux, you may want to add Haiku to your GRUB boot menu. You only need to do this if you have an empty partition and if you are going to install Haiku on it. If you only plan on running Haiku as a live CD then you can skip this.
In Linux, edit the Template:Filename file. Add this section:
title Haiku rootnoverify (hd0,0) # WARNING: Replace these numbers with your own drive and partition numbers chainloader +1
And reinstall GRUB:
# grub-install /dev/sda # WARNING: Replace "/dev/sda" with your own primary drive name
Haiku can mount and read EXT3 file systems. Click on the deskbar "leaf" menu and select "Mount".
Arch Linux can mount the Be File System.
# mount -t befs /dev/sda1 /mnt # Replace the drive name and number with your BFS drive
Optional packages are packages that are packaged by the Haiku developers but are not maintained by them. You have the option to add optional packages to the Haiku CD image (see #Optional Packages: Which Software To Include In The CD Image), or you can install them inside Haiku with the Template:Codeline command.
$ installoptionalpackage -l # List optional packages $ installoptionalpackage -a pkgname # Install a package
This section is just to give you a simple idea of "what to do next", after you finish booting into Haiku. All of this software can be installed with the official Template:Codeline command.
- Web Browser
- WebPositive (alternatively, you can download the latest build)
- BeZillaBrowser (an old Mozilla build, very stable)
- Music Player
- MediaPlayer (includes playlist support)
- Video Player
- Vision (the Haiku developers use #haiku on Freenode)
- Text Editor
- Pe (programmer's editor)
- Image Editting
- The Terminal application uses BASH.
"Haiku Ports" is an effort to port software from the BSD ports tree to Haiku. It is very easy to install and use. Installation instructions are here:
And a list of packages can be found here:
- The official Haiku website
- The official Haiku download page
- HaikuFire, software for Haiku
- HaikuWare BeOS and Haiku software (sometimes out of date)
Have fun using Haiku. What makes using Haiku fun? I don't know. Try it out and see if it isn't fun.