Go to file
Ingo Weinhold a365e1cfbb Patch by Bryce Groff, some changes by myself:
* devfs:
  - devfs_[un]publish_partition(): They no longer get the partition path as
    parameter, but rather the device path and the partition name.
  - Added devfs_rename_partition(), which renames an already published
    partition node.
* KPartition/KDiskDevice:
  - Replaced the fPublished flag by fPublishedName, the name under which the
    partition is published. This simplifies UnpublishDevice() and makes it
    practically infallible.
  - Added GetFileName(), which only returns the partition's file name.
    Simplified GetPath() by using it.
  - When a partition is added/removed the subsequent sibling partitions get a
    new index. Now we also rename their published device nodes (and those of
    their descendents). When something goes wrong we unpublish the concerned
    partition's device to be on the safe side. Would be a shame to accidentally
    format the wrong partition, eh? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-11 14:35:04 +00:00
3rdparty Made the template Haiku vmx file a bit more useful: 2009-07-08 09:26:44 +00:00
build * revert libtool to an older version that doesn't expect sed to live 2009-07-09 17:54:33 +00:00
data Created an icon for the cddb_daemon. I wonder if it is too complicated, but 2009-07-10 04:30:30 +00:00
docs * Fixed typos. 2009-07-08 16:26:00 +00:00
headers Patch by Bryce Groff, some changes by myself: 2009-07-11 14:35:04 +00:00
src Patch by Bryce Groff, some changes by myself: 2009-07-11 14:35:04 +00:00
configure * merged 32bit-wchar_t branches of buildtools and haiku back into 2009-07-07 10:30:09 +00:00
Jamfile * Use the new Add{Files,Symlink}ToHaikuHybridImage rules in HaikuImage and 2009-05-27 01:12:34 +00:00
Jamrules New build system variable HAIKU_IGNORE_USER_BUILD_CONFIG to prevent inclusion 2009-05-27 00:45:44 +00:00
makehaikufloppy Updated makehaikufloppy script, based on a patch by Rob Judd. I have no idea 2009-04-15 19:26:03 +00:00
ReadMe Small update. 2009-06-27 17:07:13 +00:00
ReadMe.cross-compile Added yasm and cdrtools to list of dependencies. 2009-07-11 10:17:06 +00:00

Building on BeOS
================

For building on BeOS you need the development tools from:

  http://haiku-os.org/downloads

Please always use the most recent versions. They are required to build Haiku.


Building on a non-BeOS platform
===============================

Please read the file 'ReadMe.cross-compile' before continuing. It describes
how to build the cross-compilation tools and configure the build system for
building Haiku. After following the instructions you can directly continue
with the section Building.


Configuring on BeOS
===================

Open a Terminal and change to your Haiku trunk folder. To configure the build
you can run configure like this:

  ./configure --target=TARGET

Where "TARGET" is the target platform that the compiled code should run on:
  * haiku (default)
  * r5
  * bone
  * dano (also for Zeta)

The configure script generates a file named "BuildConfig" in the
"generated/build" directory. As long as configure is not modified (!), there
is no need to call it again. That is for re-building you only need to invoke
jam (see below). If you don't update the source tree very frequently, you may
want to execute 'configure' after each update just to be on the safe side.


Building
========

Haiku can be built in either of two ways, as disk image file (e.g. for use
with emulators) or as installation in a directory.

Image File
----------

  jam -q haiku-image

This generates an image file named 'haiku.image' in your output directory
under 'generated/'.

VMware Image File
-----------------

  jam -q haiku-vmware-image

This generates an image file named 'haiku.vmdk' in your output
directory under 'generated/'.

Directory Installation
----------------------

  HAIKU_INSTALL_DIR=/Haiku jam -q install-haiku

Installs all Haiku components into the volume mounted at "/Haiku" and
automatically marks it as bootable. To create a partition in the first place
use DriveSetup and initialize it to BFS.

Note that installing Haiku in a directory only works as expected under BeOS,
but it is not yet supported under Linux and other non-BeOS platforms.

Bootable CD-ROM Image
---------------------

This _requires_ having the mkisofs tool installed.
On Debian GNU/Linux for example you can install it with:
  apt-get install mkisofs
On BeOS you can get it from http://bebits.com/app/3964 along with cdrecord.

This creates a bootable 'haiku-cd.iso' in your 'generated/' folder:

  jam -q haiku-cd

Under Unix/Linux, and BeOS you can use cdrecord to create a CD with:

  cdrecord dev=x,y,z -v -eject -dao -data generated/haiku-cd.iso

Here x,y,z is the device number as found with cdrecord -scanbus, it can also
be a device path on Linux.

Building Components
-------------------

If you don't want to build the complete Haiku, but only a certain
app/driver/etc. you can specify it as argument to jam, e.g.:

  jam Pulse

Alternatively, you can 'cd' to the directory of the component you want to
build and run 'jam' from there.

You can also force rebuilding of a component by using the "-a" parameter:

  jam -a Pulse


Running
=======

Generally there are two ways of running Haiku. On real hardware using a
partition and on emulated hardware using an emulator like Bochs or QEmu.

On Real Hardware
----------------

If you have installed Haiku to its own partition you can include this
partition in your bootmanager and try to boot Haiku like any other OS you
have installed. To include a new partition in the BeOS bootmanager run this
in a Terminal:

  bootman

On Emulated Hardware
--------------------

For emulated hardware you should build disk image (see above). How to setup
this image depends on your emulater. A tutorial for Bochs on BeOS is below.
If you use QEmu, you can usually just provide the path to the image as
command line argument to the "qemu" executable.

Bochs
-----

Version 2.2 of Bochs for BeOS (BeBochs) can be downloaded from BeBits:

  http://www.bebits.com/app/3324

The package installs to: /boot/apps/BeBochs2.2

You have to set up a configuration for Bochs. You should edit the ".bochsrc" to
include the following:

ata0-master: type=disk, path="/path/to/haiku.image", cylinders=122, heads=16, spt=63
boot: disk

Now you can start Bochs:

  $ cd /boot/apps/BeBochs2.2
  $ ./bochs

Answer with RETURN and with some patience you will see Haiku booting.
If booting into the graphical evironment fails you can try to hit "space" at the
very beginning of the boot process. The Haiku bootloader should then come up and
you can select some safe mode options.


Docbook documentation
=====================

Our documentation can be found in 'src/documentation/'. You can build it by
running 'jam' in that folder. The results will be stored in the 'generated/'
folder.