Updated our documentation. This should fix bug #876.

Please comment if anything is wrong (esp. the Linux build).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20021 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Waldemar Kornewald 2007-01-30 19:53:23 +00:00
parent ebaed93917
commit 9d4aa268db
2 changed files with 136 additions and 104 deletions

180
ReadMe
View File

@ -1,137 +1,116 @@
Setting Up Building on BeOS
---------- ================
The build system uses Jam/MR (http://www.perforce.com/jam/jam.html). For building on BeOS you need the development tools from:
A BeOS executable of Jam 2.5 is available at:
http://haiku-os.org/downloads.php?mode=download&id=10&mirror=0 http://haiku-os.org/downloads
Unzip the executable and copy it to /boot/home/config/bin. Please always use the most recent versions. They are required to build Haiku.
The Jam source code is also included in the source tree. You can as well cd
into "src/tools/jam" and run "make" to obtain an executable.
To build Haiku you also need Oliver Tappe's GCC 2.95.3. You can get it at BeBits:
http://www.bebits.com/app/4011 Building on a non-BeOS platform
===============================
Older versions of GCC 2.95.3 will likely not work. Please read the file 'ReadMe.cross-compile' before continuing.
If you intend to build Haiku from a supported build platform other than BeOS,
e.g. GNU/Linux, you need to build a jam executable yourself (don't use the
one coming with your distribution). cd into the "src/tools/jam" subdirectory
of the Haiku tree and type "make" (or "gmake"). The generated jam executable
will be found in a platform specific subdirectory, e.g. "bin.linuxx86/".
The easiest way to use it, is to copy it to a place in your PATH. Furthermore
you need to build the tools for cross compilation (binutils and gcc). Fear not,
the configure script will help you with that one; see below.
Configuring Configuring
----------- ===========
Under BeOS: Open a Terminal and change to your Haiku trunk folder. To configure the build
you can run configure like this:
Open a Terminal and change to your Haiku trunk folder. To configure the build you ./configure --target=TARGET
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)
Where "TARGET" is the target platform for the build. Valid targets are "r5", When building on Linux and other non-BeOS platforms "haiku" is the
"bone", "dano" and "haiku". If you omit the target it defaults to "haiku". To only supported target platform, so you don't need the "--target" parameter.
configure for ZETA use the "dano" target.
The configure script generates a file named "BuildConfig" in the "build" The configure script generates a file named "BuildConfig" in the "build"
directory. As long as configure is not modified (!), there is no need to call it directory. As long as configure is not modified (!), there is no need to call
again. That is for re-building you only need to invoke jam (see below). 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 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. 'configure' after each update just to be on the safe side.
Under Linux or another supported build platform:
You don't need to supply the "--target" option to configure, since the only
supported target is the default "haiku" anyway. But you have to tell, what
cross compilation tools to use. The tools installed in the system won't work
for compiling Haiku itself (they will be used for building some build tools,
though). The easiest way is to instruct configure to build those tools from the
sources. Supposing you have checked out the buildutils module from the Haiku
SVN repository alongside the Haiku source tree, you can do that via:
$ ./configure --build-cross-tools ../buildtools
One of the last output lines should tell you that the tools have been built
successfully.
Note, that the old gcc 2.95.3 will be used for building Haiku, required for
binary compatibility with BeOS R5. If you're not interested in binary
compatibility (or want to build for the PowerPC architecture), you can instead
use:
$ ./configure --build-cross-tools-gcc4 <arch> ../buildtools
Replace "<arch>" with either "x86" or "ppc", depending on which of the two
architectures you want to build for.
[At the moment (2005-12-06) the build for PowerPC, or at least the resulting
Haiku does not work.]
Building Building
-------- ========
Haiku can be built in either of two ways, as disk image file (e.g. for use with Haiku can be built in either of two ways, as disk image file (e.g. for use
emulators) or as installation in a directory. with emulators) or as installation in a directory.
Image File: Image File
----------
$ jam -q haiku-image jam -q haiku-image
Generates an image file named "haiku.image" in your output directory (usually This generates an image file named 'haiku.image' in your output directory
"generated/"). This method works for all supported build platforms. under 'generated/'.
VMware Image File
-----------------
Directory Installation: jam -q haiku-vmware-image
$ HAIKU_INSTALL_DIR=/Haiku jam -q install-haiku This generates an image file named 'haiku.vmdk' in your output
directory under 'generated/'.
Installs all Haiku components into the directory "/Haiku". If that directory Directory Installation
is the root of a mounted BFS partition, you'll have a Haiku partition afterwards. ----------------------
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. 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.
Building Components: 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.
If you don't want to build the complete Haiku, but only a certain app/driver/etc. Building Components
you can specify it as argument to jam, e.g.: -------------------
$ jam Pulse 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 Running
------- =======
Generally there are two ways of running Haiku. On real hardware using a partition Generally there are two ways of running Haiku. On real hardware using a
and on emulated hardware using an emulator like Bochs or QEmu. partition and on emulated hardware using an emulator like Bochs or QEmu.
1. On Real Hardware On Real Hardware
----------------
If you have installed Haiku to it's own partition you can include this partition If you have installed Haiku to its own partition you can include this
in your bootmanager and try to boot Haiku like any other OS you have installed. partition in your bootmanager and try to boot Haiku like any other OS you
To include a new partition in the BeOS bootmanager run this in a Terminal: have installed. To include a new partition in the BeOS bootmanager run this
in a Terminal:
$ bootman bootman
And follow the steps of the installer. On Emulated Hardware
--------------------
2. 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.
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 Bochs
----- -----
@ -160,15 +139,8 @@ you can select some safe mode options.
Docbook documentation Docbook documentation
--------------------- =====================
Requirements : Our documentation can be found in 'src/documentation/'. You can build it by
- Docbook XML DTD (http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip) running 'jam' in that folder. The results will be stored in the 'generated/'
- Docbook Stylesheets (http://prdownloads.sourceforge.net/docbook/docbook-xsl-1.68.1.tar.bz2) folder.
- libxml2, xmllin (http://libpak.neoni.net/packages/LibPak_libxml2_dev.zip)
- libxslt, xsltproc (http://libpak.neoni.net/packages/LibPak_libxslt_dev.zip)
XML catalogs must be configured to avoid internet access :
- in Docbook Stylesheets directory : sh ./INSTALL
- in your .profile, add something like this :
export XML_CATALOG_FILES="/boot/home/docbook-xsl-1.68.1/catalog.xml /boot/home/docbook-xml-4.2/catalog.xml /etc/xml/catalog"

60
ReadMe.cross-compile Normal file
View File

@ -0,0 +1,60 @@
Building on a non-BeOS platform
===============================
We currently support these non-BeOS platforms:
* Linux
* FreeBSD
To build Haiku on a non-BeOS platform you must first check out and build the
cross-compiler. The easiest method for doing so is to check it out in a
directory just below that of the Haiku root. Navigate to the parent directory
of Haiku and use a command such as:
svn checkout svn://svn.berlios.de/haiku/buildtools/trunk buildtools
You should now have a 'buildtools' folder that contains folders named
'binutils' and 'gcc' among others.
Building Jam
============
Change to the buildtools folder and we will start to build 'jam' which is a
requirement for building Haiku. Run the following commands to generate and
install the tool:
cd buildtools/jam
make
sudo ./jam0 install
Building binutils
=================
The binutils used by Haiku will be automatically generated according to the
initial configuration of the Haiku source and placed in the
'generated/cross-tools' directory of Haiku. Before generating the tools you
must consider the version required, there are essentially two choices:
* 2.95: Creates BeOS compatible binaries
* 4.x: Incompatible with BeOS, but theoretically more efficient binaries
Unless there is a pressing need, choose 2.95 as the latter option can cause
frequent build issues. The commands for configuration are,
GCC 2.95
--------
cd haiku
./configure --build-cross-tools ../buildtools/
GCC 4.x
-------
cd haiku
./configure --build-cross-tools-gcc4 x86 ../buildtools/
The process can take quite some time, but when it finishes you are ready to
compile your first Haiku image.
Instructions on how to build Haiku can be found in the 'ReadMe' document.