1 | Setting Up
|
---|
2 | ----------
|
---|
3 |
|
---|
4 | The build system uses Jam/MR (http://www.perforce.com/jam/jam.html).
|
---|
5 | A BeOS executable of Jam 2.5 is available at:
|
---|
6 |
|
---|
7 | http://haiku-os.org/files/jam.zip
|
---|
8 |
|
---|
9 | Unzip the executable and copy it to /boot/home/config/bin.
|
---|
10 | you may also chek out the source via
|
---|
11 | `svn checkout svn://svn.berlios.de/haiku/buildtools/trunk/jam`
|
---|
12 | and run "make" to obtain an executable 'jam' in a subdirectory. You may want to
|
---|
13 | check out 'svn://svn.berlios.de/haiku/buildtools/trunk' now as you would probably
|
---|
14 | be using the cross-compiler as well.
|
---|
15 |
|
---|
16 | To build Haiku you also need Oliver Tappe's GCC 2.95.3. You can get it at BeBits:
|
---|
17 |
|
---|
18 | http://www.bebits.com/app/4011
|
---|
19 |
|
---|
20 | Older versions of GCC 2.95.3 will likely not work.
|
---|
21 |
|
---|
22 | If you intend to build Haiku from a supported build platform other than BeOS,
|
---|
23 | e.g. GNU/Linux, you need to build a jam executable yourself (don't use the
|
---|
24 | one coming with your distribution). cd into the "src/tools/jam" subdirectory
|
---|
25 | of the Haiku tree and type "make" (or "gmake"). The generated jam executable
|
---|
26 | will be found in a platform specific subdirectory, e.g. "bin.linuxx86/".
|
---|
27 | The easiest way to use it, is to copy it to a place in your PATH. Furthermore
|
---|
28 | you need to build the tools for cross compilation (binutils and gcc). Fear not,
|
---|
29 | the configure script will help you with that one; see below.
|
---|
30 |
|
---|
31 |
|
---|
32 | Fetching the sources
|
---|
33 | --------------------
|
---|
34 |
|
---|
35 | You should run `svn checkout svn://svn.berlios.de/haiku/haiku/trunk` to fetch
|
---|
36 | the haiku sources. all of the following commands should be run in the
|
---|
37 | 'haiku/haiku/trunk' directory and cross compilers (if desired) should be
|
---|
38 | checked out via `svn checkout svn://svn.berlios.de/haiku/buildtools/trunk`.
|
---|
39 | The path/to/buildtools mentioned below is *not* the path to the actual
|
---|
40 | build tools directory, but rather the location you checked '*/buildtools/trunk'
|
---|
41 | out to.
|
---|
42 |
|
---|
43 | Configuring
|
---|
44 | -----------
|
---|
45 |
|
---|
46 | Under BeOS:
|
---|
47 |
|
---|
48 | Open a Terminal and change to your Haiku trunk folder. To configure the build you
|
---|
49 | can run configure like this:
|
---|
50 |
|
---|
51 | $ ./configure --target=TARGET
|
---|
52 |
|
---|
53 | Where "TARGET" is the target platform for the build. Valid targets are "r5",
|
---|
54 | "bone", "dano" and "haiku". If you omit the target it defaults to "haiku". To
|
---|
55 | configure for ZETA use the "dano" target.
|
---|
56 |
|
---|
57 | The configure script generates a file named "BuildConfig" in the "build"
|
---|
58 | directory. As long as configure is not modified (!), there is no need to call it
|
---|
59 | again. That is for re-building you only need to invoke jam (see below).
|
---|
60 | If you don't update the source tree very frequently, you may want to execute
|
---|
61 | configure after each update just to be on the safe side.
|
---|
62 |
|
---|
63 |
|
---|
64 | Under Linux or another supported build platform:
|
---|
65 |
|
---|
66 | You don't need to supply the "--target" option to configure, since the only
|
---|
67 | supported target is the default "haiku" anyway. But you have to tell, what
|
---|
68 | cross compilation tools to use. The tools installed in the system won't work
|
---|
69 | for compiling Haiku itself (they will be used for building some build tools,
|
---|
70 | though). The easiest way is to instruct configure to build those tools from the
|
---|
71 | sources. Supposing you have checked out the buildutils module from the Haiku
|
---|
72 | SVN repository alongside the Haiku source tree, you can do that via:
|
---|
73 |
|
---|
74 | $ ./configure --build-cross-tools path/to/buildtools
|
---|
75 |
|
---|
76 | One of the last output lines should tell you that the tools have been built
|
---|
77 | successfully.
|
---|
78 |
|
---|
79 | Note, that the old gcc 2.95.3 will be used for building Haiku, required for
|
---|
80 | binary compatibility with BeOS R5. If you're not interested in binary
|
---|
81 | compatibility (or want to build for the PowerPC architecture), you can instead
|
---|
82 | use:
|
---|
83 |
|
---|
84 | $ ./configure --build-cross-tools-gcc4 <arch> path/to/buildtools
|
---|
85 |
|
---|
86 | Replace "<arch>" with either "x86" or "ppc", depending on which of the two
|
---|
87 | architectures you want to build for.
|
---|
88 | [At the moment (2005-12-06) the build for PowerPC, or at least the resulting
|
---|
89 | Haiku does not work.]
|
---|
90 |
|
---|
91 |
|
---|
92 |
|
---|
93 | Building
|
---|
94 | --------
|
---|
95 |
|
---|
96 | Haiku can be built in either of two ways, as disk image file (e.g. for use with
|
---|
97 | emulators) or as installation in a directory.
|
---|
98 |
|
---|
99 | Image File:
|
---|
100 |
|
---|
101 | $ jam -q haiku-image
|
---|
102 |
|
---|
103 | Generates an image file named "haiku.image" in your output directory (usually
|
---|
104 | "generated/"). This method works for all supported build platforms.
|
---|
105 |
|
---|
106 |
|
---|
107 | Directory Installation:
|
---|
108 |
|
---|
109 | $ HAIKU_INSTALL_DIR=/Haiku jam -q install-haiku
|
---|
110 |
|
---|
111 | Installs all Haiku components into the directory "/Haiku". If that directory
|
---|
112 | is the root of a mounted BFS partition, you'll have a Haiku partition afterwards.
|
---|
113 | To create a partition in the first place use DriveSetup and initialize it to BFS.
|
---|
114 |
|
---|
115 | Note, that installing Haiku in a directory only works as expected under BeOS.
|
---|
116 |
|
---|
117 |
|
---|
118 | Building Components:
|
---|
119 |
|
---|
120 | If you don't want to build the complete Haiku, but only a certain app/driver/etc.
|
---|
121 | you can specify it as argument to jam, e.g.:
|
---|
122 |
|
---|
123 | $ jam Pulse
|
---|
124 |
|
---|
125 |
|
---|
126 | Running
|
---|
127 | -------
|
---|
128 |
|
---|
129 | Generally there are two ways of running Haiku. On real hardware using a partition
|
---|
130 | and on emulated hardware using an emulator like Bochs or QEmu.
|
---|
131 |
|
---|
132 | 1. On Real Hardware
|
---|
133 |
|
---|
134 | If you have installed Haiku to it's own partition you can include this partition
|
---|
135 | in your bootmanager and try to boot Haiku like any other OS you have installed.
|
---|
136 | To include a new partition in the BeOS bootmanager run this in a Terminal:
|
---|
137 |
|
---|
138 | $ bootman
|
---|
139 |
|
---|
140 | And follow the steps of the installer.
|
---|
141 |
|
---|
142 | 2. On Emulated Hardware
|
---|
143 |
|
---|
144 | For emulated hardware you should build disk image (see above). How to setup this
|
---|
145 | image depends on your emulater. A tutorial for Bochs on BeOS is below. If you
|
---|
146 | use QEmu, you can usually just provide the path to the image as command line
|
---|
147 | argument to the "qemu" executable.
|
---|
148 |
|
---|
149 |
|
---|
150 | Bochs
|
---|
151 | -----
|
---|
152 |
|
---|
153 | Version 2.2 of Bochs for BeOS (BeBochs) can be downloaded from BeBits:
|
---|
154 |
|
---|
155 | http://www.bebits.com/app/3324
|
---|
156 |
|
---|
157 | The package installs to: /boot/apps/BeBochs2.2
|
---|
158 |
|
---|
159 | You have to set up a configuration for Bochs. You should edit the ".bochsrc" to
|
---|
160 | include the following:
|
---|
161 |
|
---|
162 | ata0-master: type=disk, path="/path/to/haiku.image", cylinders=122, heads=16, spt=63
|
---|
163 | boot: disk
|
---|
164 |
|
---|
165 | Now you can start Bochs:
|
---|
166 |
|
---|
167 | $ cd /boot/apps/BeBochs2.2
|
---|
168 | $ ./bochs
|
---|
169 |
|
---|
170 | Answer with RETURN and with some patience you will see Haiku booting.
|
---|
171 | If booting into the graphical evironment fails you can try to hit "space" at the
|
---|
172 | very beginning of the boot process. The Haiku bootloader should then come up and
|
---|
173 | you can select some safe mode options.
|
---|
174 |
|
---|
175 |
|
---|
176 | Docbook documentation
|
---|
177 | ---------------------
|
---|
178 |
|
---|
179 | Requirements :
|
---|
180 | - Docbook XML DTD (http://www.oasis-open.org/docbook/xml/4.2/docbook-xml-4.2.zip)
|
---|
181 | - Docbook Stylesheets (http://prdownloads.sourceforge.net/docbook/docbook-xsl-1.68.1.tar.bz2)
|
---|
182 | - libxml2, xmllin (http://libpak.neoni.net/packages/LibPak_libxml2_dev.zip)
|
---|
183 | - libxslt, xsltproc (http://libpak.neoni.net/packages/LibPak_libxslt_dev.zip)
|
---|
184 |
|
---|
185 | XML catalogs must be configured to avoid internet access :
|
---|
186 | - in Docbook Stylesheets directory : sh ./INSTALL
|
---|
187 | - in your .profile, add something like this :
|
---|
188 | export XML_CATALOG_FILES="/boot/home/docbook-xsl-1.68.1/catalog.xml /boot/home/docbook-xml-4.2/catalog.xml /etc/xml/catalog"
|
---|