Table Of Contents
Learning All About Haiku
Installing Haiku Within VirtualBox
  • you must select the E1000 network adapter in VirtualBox if you want Haiku to detect your network card
  • VirtualBox's "Guest Additions" are not yet supported in Haiku
Developer Sites And Documents
Your First Haiku Build
  • Assumptions:
    1. You must have Haiku R1/A1 from September 14 2009 up and running already
  • Getting the source code:
    1. click on the blue feather in top right, and select Applications->Terminal
    2. type: cd ~/
    3. type: svn checkout http://svn.haiku-os.org/haiku/haiku/trunk haiku/trunk
      1. more details on svn checkout: http://www.haiku-os.org/guides/building/get-source
      2. more details on source tree layout: http://www.haiku-os.org/documents/dev/a_brief_introduction_to_our_source_repository_layout
      3. before the repository location was moved on 2009-Oct-04, the old command would have been: svn checkout svn://svn.berlios.de/haiku/haiku/trunk haiku/trunk
    4. type: cd ~/haiku/trunk
    5. type: dir
      1. note the general directory layout -- in particular, note the src directory
  • Preparing the source tree (you only have to do this once):
    1. type: cd ~/haiku/trunk
    2. type: ./configure
  • Building the source tree:
    1. type: cd ~/haiku/trunk
    2. type: jam -q haiku-cd
      1. running this command on my system with 4 virtual CPUs in VirtualBox v3.0.6 to match the 4 physical CPUs took exactly the same amount of time (136 minutes) whether or not I ran jam -j -q haiku-cd or jam -q haiku-cd
    3. type: dir generated/haiku-cd.iso
      1. .iso should be about 116M in size
      2. copy it to your host, shutdown Haiku, and reboot with this .iso; install it
      3. when you reboot haiku after the installation, click on Deskbar -> About This System to confirm the version number
Things To Look Into
  • Sisong IDE
  • Daiku IDE
  • HIDE
  • Paladin (IDE)
    1. download Paladin 1.1.0 from BeBits
    2. save to the file Paladin1.1.0.pkg.zip to the desktop
    3. double-click to expand the file to Paladin1.1.0.pkg
    4. double-click the .pkg file to install it
    5. open up the Haiku drive icon and navigate to /boot/apps/Paladin
    6. right-mouse-click on the Paladin executable and select Create Link -> Desktop
  • NUIE (IDE)
Your First Hybrid Build
  • Haiku by default uses the relatively ancient GCC 2.95.3 (released in March 2001). This is done to maintain ABI compatibility for the original x86 BeOS applications.
    1. For users like myself new to Haiku and without any BeOS baggage: Is there a reason why I'd need/want to maintain GCC2 compatibility? Can I -- should I? -- get my Haiku installation to run just GCC4 with no GCC2-hybrid support?
  • GCC4 options are also available in Haiku. Actually, there seems to be 2 options, known as GCC2/4 hybrid and GCC4/2 hybrid. I don't yet know the details of what exactly is built with GCC2/4 versus GCC4/2. The hybrid builds let you run binaries compiled and linked with both GCC2 and GCC4.
  • An e-mail thread from the Haiku development list discussing the hybrid builds can be found here: http://www.freelists.org/post/haiku-development/How-to-build-Haiku-R1Alpha-1,7
  • Here is how I setup my first GCC2/4 and GCC4/2 hybrid builds:
    1. type: cd ~/
    2. type: svn checkout http://svn.haiku-os.org/haiku/haiku/trunk haiku/trunk
    3. type: cd ~/haiku/trunk
    4. type: mkdir generated.gcc2
    5. type: mkdir generated.gcc4
    6. type: cd generated.gcc4
    7. type: ../configure --alternative-gcc-output-dir ../generated.gcc2 --cross-tools-prefix /boot/develop/abi/x86/gcc4/tools/current/bin/
    8. type: cd ../generated.gcc2
    9. type: ../configure --alternative-gcc-output-dir ../generated.gcc4
  • At this point in time, things are setup for either a GCC2/4 or GCC4/2 hybrid build. If you build in generated.gcc2 you get a GCC2/4 build:
    1. type: cd ~/haiku/trunk/generated.gcc2
    2. type: jam -j3 -q haiku-cd
      1. This command either hung or dropped me into kernel debug land the three times I tried to run it. I've written to the haiku-dev mailing list to get a better understanding of what it is trying to build, and if I've missed a step.
  • Or, to get a GCC4/2 hybrid build:
    1. type: cd ~/haiku/trunk/generated.gcc4
    2. type: jam -j3 -q haiku-cd
      1. I haven't tried this yet. I've written to the haiku-dev mailing list with some questions before I attempt this so I understand what exactly it is supposed to build.
  • If the build was successful, I'd expect to find a generated/haiku-cd.iso file that I could then boot and install overtop of my existing Haiku partition; see the last step in Your First Haiku Build.
Your First Haiku Application
Class Hierarchy
  • I started working on an application to parse the .h files and produce a GraphViz diagram showing class inheritance; it is still a work-in-progress, but here are the results
VirtualBox Mouse Driver
  • the following are notes only, as I don't yet know what is necessary for getting the mouse driver working:
  • in VirtualBox, click on Devices -> Install Guest Additions, or download the .iso
  • copy the guest additions file onto the hard drive and extract the contents:
    1. mkdir vb
    2. cd vb
    3. cp /VBOXADDITIONS_3.0.6_52128/VBoxLinuxAdditions-x86.run .
    4. chmod a+x VBoxLinuxAdditions-x86.run
    5. ./VBoxLinuxAdditions-x86.run --noexec --keep
  • download the entire VirtualBox source tree:
    1. svn co http://www.virtualbox.org/svn/vbox/trunk vbox
    2. see files such as vbox/src/VBox/Additions/x11/vboxmouse/*
  • Michael Thayer at Sun.com answered my questions about where to get started