| 1 |
Building on BeOS |
|---|
| 2 |
================ |
|---|
| 3 |
|
|---|
| 4 |
For building on BeOS you need the development tools from: |
|---|
| 5 |
|
|---|
| 6 |
http://haiku-os.org/downloads |
|---|
| 7 |
|
|---|
| 8 |
Please always use the most recent versions. They are required to build Haiku. |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
Building on a non-BeOS platform |
|---|
| 12 |
=============================== |
|---|
| 13 |
|
|---|
| 14 |
Please read the file 'ReadMe.cross-compile' before continuing. It describes |
|---|
| 15 |
how to build the cross-compilation tools and configure the build system for |
|---|
| 16 |
building Haiku. After following the instructions you can directly continue |
|---|
| 17 |
with the section Building. |
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
Configuring on BeOS |
|---|
| 21 |
=================== |
|---|
| 22 |
|
|---|
| 23 |
Open a Terminal and change to your Haiku trunk folder. To configure the build |
|---|
| 24 |
you can run configure like this: |
|---|
| 25 |
|
|---|
| 26 |
./configure --target=TARGET |
|---|
| 27 |
|
|---|
| 28 |
Where "TARGET" is the target platform that the compiled code should run on: |
|---|
| 29 |
* haiku (default) |
|---|
| 30 |
* r5 |
|---|
| 31 |
* bone |
|---|
| 32 |
* dano (also for Zeta) |
|---|
| 33 |
|
|---|
| 34 |
The configure script generates a file named "BuildConfig" in the "build" |
|---|
| 35 |
directory. As long as configure is not modified (!), there is no need to call |
|---|
| 36 |
it again. That is for re-building you only need to invoke jam (see below). |
|---|
| 37 |
If you don't update the source tree very frequently, you may want to execute |
|---|
| 38 |
'configure' after each update just to be on the safe side. |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
Building |
|---|
| 42 |
======== |
|---|
| 43 |
|
|---|
| 44 |
Haiku can be built in either of two ways, as disk image file (e.g. for use |
|---|
| 45 |
with emulators) or as installation in a directory. |
|---|
| 46 |
|
|---|
| 47 |
Image File |
|---|
| 48 |
---------- |
|---|
| 49 |
|
|---|
| 50 |
jam -q haiku-image |
|---|
| 51 |
|
|---|
| 52 |
This generates an image file named 'haiku.image' in your output directory |
|---|
| 53 |
under 'generated/'. |
|---|
| 54 |
|
|---|
| 55 |
VMware Image File |
|---|
| 56 |
----------------- |
|---|
| 57 |
|
|---|
| 58 |
jam -q haiku-vmware-image |
|---|
| 59 |
|
|---|
| 60 |
This generates an image file named 'haiku.vmdk' in your output |
|---|
| 61 |
directory under 'generated/'. |
|---|
| 62 |
|
|---|
| 63 |
Directory Installation |
|---|
| 64 |
---------------------- |
|---|
| 65 |
|
|---|
| 66 |
HAIKU_INSTALL_DIR=/Haiku jam -q install-haiku |
|---|
| 67 |
|
|---|
| 68 |
Installs all Haiku components into the volume mounted at "/Haiku" and |
|---|
| 69 |
automatically marks it as bootable. To create a partition in the first place |
|---|
| 70 |
use DriveSetup and initialize it to BFS. |
|---|
| 71 |
|
|---|
| 72 |
Note that installing Haiku in a directory only works as expected under BeOS, |
|---|
| 73 |
but it is not yet supported under Linux and other non-BeOS platforms. |
|---|
| 74 |
|
|---|
| 75 |
Bootable CD-ROM Image |
|---|
| 76 |
--------------------- |
|---|
| 77 |
|
|---|
| 78 |
* UNSUPPORTED yet * |
|---|
| 79 |
|
|---|
| 80 |
This _requires_ having the mkisofs tool installed. |
|---|
| 81 |
On Debian GNU/Linux for example you can install it with: |
|---|
| 82 |
apt-get install mkisofs |
|---|
| 83 |
On BeOS you can get it from http://bebits.com/app/3964 along with cdrecord. |
|---|
| 84 |
|
|---|
| 85 |
Creating a bootable CD requires burning 2 tracks on a single CD. |
|---|
| 86 |
The first track is an El-Torito bootable ISO file-system containing a boot |
|---|
| 87 |
floppy image, and is created with: |
|---|
| 88 |
|
|---|
| 89 |
jam -q haiku-boot-cd |
|---|
| 90 |
|
|---|
| 91 |
This generates an image file named 'haiku-boot-cd.iso' in your output directory |
|---|
| 92 |
under 'generated/'. |
|---|
| 93 |
The second track is the raw BFS image 'haiku.image' in 'generated/' created |
|---|
| 94 |
with: |
|---|
| 95 |
|
|---|
| 96 |
jam -q haiku-image |
|---|
| 97 |
|
|---|
| 98 |
Under Unix/Linux, and BeOS you can use cdrecord to create a CD with: |
|---|
| 99 |
|
|---|
| 100 |
cdrecord dev=x,y,z -v -eject -dao -data generated/haiku-boot-cd.iso generated/haiku.image |
|---|
| 101 |
|
|---|
| 102 |
Here x,y,z is the device number as found with cdrecord -scanbus, it can also |
|---|
| 103 |
be a device path on Linux. |
|---|
| 104 |
|
|---|
| 105 |
Windows users will find '3rdparty/nero/haiku-cd.cue' useful. |
|---|
| 106 |
|
|---|
| 107 |
Since the CD has two tracks it is not easy to test it from an emulator. |
|---|
| 108 |
Instead it is simpler to use the 'haiku.image' as CD image and the floppy |
|---|
| 109 |
image 'haiku-boot-floppy.image' to boot from it. |
|---|
| 110 |
|
|---|
| 111 |
For Qemu: |
|---|
| 112 |
|
|---|
| 113 |
qemu -cdrom generated/haiku.image -fda generated/haiku-boot-floppy.image -boot a |
|---|
| 114 |
|
|---|
| 115 |
Building Components |
|---|
| 116 |
------------------- |
|---|
| 117 |
|
|---|
| 118 |
If you don't want to build the complete Haiku, but only a certain |
|---|
| 119 |
app/driver/etc. you can specify it as argument to jam, e.g.: |
|---|
| 120 |
|
|---|
| 121 |
jam Pulse |
|---|
| 122 |
|
|---|
| 123 |
Alternatively, you can 'cd' to the directory of the component you want to |
|---|
| 124 |
build and run 'jam' from there. |
|---|
| 125 |
|
|---|
| 126 |
You can also force rebuilding of a component by using the "-a" parameter: |
|---|
| 127 |
|
|---|
| 128 |
jam -a Pulse |
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 |
Running |
|---|
| 132 |
======= |
|---|
| 133 |
|
|---|
| 134 |
Generally there are two ways of running Haiku. On real hardware using a |
|---|
| 135 |
partition and on emulated hardware using an emulator like Bochs or QEmu. |
|---|
| 136 |
|
|---|
| 137 |
On Real Hardware |
|---|
| 138 |
---------------- |
|---|
| 139 |
|
|---|
| 140 |
If you have installed Haiku to its own partition you can include this |
|---|
| 141 |
partition in your bootmanager and try to boot Haiku like any other OS you |
|---|
| 142 |
have installed. To include a new partition in the BeOS bootmanager run this |
|---|
| 143 |
in a Terminal: |
|---|
| 144 |
|
|---|
| 145 |
bootman |
|---|
| 146 |
|
|---|
| 147 |
On Emulated Hardware |
|---|
| 148 |
-------------------- |
|---|
| 149 |
|
|---|
| 150 |
For emulated hardware you should build disk image (see above). How to setup |
|---|
| 151 |
this image depends on your emulater. A tutorial for Bochs on BeOS is below. |
|---|
| 152 |
If you use QEmu, you can usually just provide the path to the image as |
|---|
| 153 |
command line argument to the "qemu" executable. |
|---|
| 154 |
|
|---|
| 155 |
Bochs |
|---|
| 156 |
----- |
|---|
| 157 |
|
|---|
| 158 |
Version 2.2 of Bochs for BeOS (BeBochs) can be downloaded from BeBits: |
|---|
| 159 |
|
|---|
| 160 |
http://www.bebits.com/app/3324 |
|---|
| 161 |
|
|---|
| 162 |
The package installs to: /boot/apps/BeBochs2.2 |
|---|
| 163 |
|
|---|
| 164 |
You have to set up a configuration for Bochs. You should edit the ".bochsrc" to |
|---|
| 165 |
include the following: |
|---|
| 166 |
|
|---|
| 167 |
ata0-master: type=disk, path="/path/to/haiku.image", cylinders=122, heads=16, spt=63 |
|---|
| 168 |
boot: disk |
|---|
| 169 |
|
|---|
| 170 |
Now you can start Bochs: |
|---|
| 171 |
|
|---|
| 172 |
$ cd /boot/apps/BeBochs2.2 |
|---|
| 173 |
$ ./bochs |
|---|
| 174 |
|
|---|
| 175 |
Answer with RETURN and with some patience you will see Haiku booting. |
|---|
| 176 |
If booting into the graphical evironment fails you can try to hit "space" at the |
|---|
| 177 |
very beginning of the boot process. The Haiku bootloader should then come up and |
|---|
| 178 |
you can select some safe mode options. |
|---|
| 179 |
|
|---|
| 180 |
|
|---|
| 181 |
Docbook documentation |
|---|
| 182 |
===================== |
|---|
| 183 |
|
|---|
| 184 |
Our documentation can be found in 'src/documentation/'. You can build it by |
|---|
| 185 |
running 'jam' in that folder. The results will be stored in the 'generated/' |
|---|
| 186 |
folder. |
|---|