Difference between revisions of "How to Build Haiku in Haiku"
From Richard's Wiki
Line 19: | Line 19: | ||
* Boot your GParted live CD and partition up your USB hard disk. I created three primary partitions (unformatted) - a boot partition of 128Meg, then two partitions of 5 Gig each, and left the rest of the drive unallocated (to allow for an extended partition later). The idea will be to put the Haiku boot manager bootman onto the boot partition, the first 5 Gig partition will be the system partition, and the second 5 Gig partition will be used to contain the source code and build Haiku. | * Boot your GParted live CD and partition up your USB hard disk. I created three primary partitions (unformatted) - a boot partition of 128Meg, then two partitions of 5 Gig each, and left the rest of the drive unallocated (to allow for an extended partition later). The idea will be to put the Haiku boot manager bootman onto the boot partition, the first 5 Gig partition will be the system partition, and the second 5 Gig partition will be used to contain the source code and build Haiku. | ||
* Power down the machine. Unplug the USB disk drive. Plug in the USB key. Boot from the USB key, into Haiku off the USB key. Plug in the USB disk drive after Haiku has booted. | * Power down the machine. Unplug the USB disk drive. Plug in the USB key. Boot from the USB key, into Haiku off the USB key. Plug in the USB disk drive after Haiku has booted. | ||
− | * Mount the second partition on the USB disk drive, onto /Partition2 | + | * Create a couple of Haiku filesystems on the two 5 Gig partitions, using the Haiku DriveSetup utility. Be careful not to trash any existing hard drives or partitions... I called the two new filesystems Partition1 and Partition2. I also used the default blocksize of 2K. |
+ | * Mount the second partition on the USB disk drive (which you just previously initialised to a Be Filesystem), onto /Partition2 directory | ||
* Make sure that you have connectivity to the internet by browsing to some public website. | * Make sure that you have connectivity to the internet by browsing to some public website. | ||
* Open a terminal window and | * Open a terminal window and |
Revision as of 19:35, 1 August 2009
To follow these instructions you will need a USB key you are willing to destroy, and a USB Disk drive with a few tens of Gig storage, that you are also willing to destroy.
Assumptions
- You are running Windows
- You can burn a CRDROM
- Your machine can boot from USB
- You have a dedicated USB key that can be dedicated to Haiku
- You have a dedicated USB disk drive with a few 10's of Gig you can use for Haiku
Strategy
The idea is to first create a bootable USB key with a nightly Haiku bootable image on it. Use this to create a bootable USB disk drive, with separate partitions for Haiku system, and Haiku source code. As more functional nightly builds appear over time, the idea is to install the latest nightly build of Haiku onto the system partition on the disk drive, leaving the Haiku source code partition intact. At the end of the process we have a bootable USB disk drive of Haiku that can be used for Haiku development.
Instructions
- Follow these instructions to create a bootable USB key, by downloading the latest nightly build (I use the pre-alpha GCC4 images), and using flashnul to write it to your USB key. How to install Haiku to USB Flash Drive from Windows
- Create a bootable CDROM with GParted (linux partition editor) on it. Easiest way is to get it from http://gparted.sourceforge.net/livecd.php
- Boot your GParted live CD and partition up your USB hard disk. I created three primary partitions (unformatted) - a boot partition of 128Meg, then two partitions of 5 Gig each, and left the rest of the drive unallocated (to allow for an extended partition later). The idea will be to put the Haiku boot manager bootman onto the boot partition, the first 5 Gig partition will be the system partition, and the second 5 Gig partition will be used to contain the source code and build Haiku.
- Power down the machine. Unplug the USB disk drive. Plug in the USB key. Boot from the USB key, into Haiku off the USB key. Plug in the USB disk drive after Haiku has booted.
- Create a couple of Haiku filesystems on the two 5 Gig partitions, using the Haiku DriveSetup utility. Be careful not to trash any existing hard drives or partitions... I called the two new filesystems Partition1 and Partition2. I also used the default blocksize of 2K.
- Mount the second partition on the USB disk drive (which you just previously initialised to a Be Filesystem), onto /Partition2 directory
- Make sure that you have connectivity to the internet by browsing to some public website.
- Open a terminal window and
- cd /Partition2
- mkdir HaikuSource
- cd HaikuSource
- Get the latest version of the Haiku source code, by doing:
- svn checkout svn://svn.berlios.de/haiku/haiku/trunk haiku/haiku
- You might need to use the --force switch on svn if you need to restart the svn checkout. If using the svn: protocol doesn't work for you, you can alternatively use the http: protocol:
- svn checkout http://svn.berlios.de/haiku/haiku/trunk haiku/haiku
- After a few hours you will have the haiku source code in the /Partition2/Haiku Source/haiku/haiku directory. (The source code is currently about 700 Meg in size). More information on getting the code down using svn is available at Getting Haiku Source Code
- At this point you have the Haiku source code on a hard disk partition, and binaries of all the tools needed to build it on the USB key. Source code for the build toolchain is also available at the berlios svn repository, but we haven't downloaded that because we already have the binaries on the USB key.
- In the /Partition2/Haiku Source/haiku/haiku directory, run:
- ./configure
- The source tree is now configured to compile using the compiler on your Haiku USB key.
- To compile the source tree, we use the jam utility.