Changeset 15384

Show
Ignore:
Timestamp:
12/06/05 17:47:56 (3 years ago)
Author:
bonefish
Message:

Updated ReadMe to reflect the build system changes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/ReadMe

    r13627 r15384  
    11Setting Up 
    2 -------- 
     2---------- 
    33 
    44The build system uses Jam/MR (http://www.perforce.com/jam/jam.html). 
     
    1717Older versions of GCC 2.95.3 will likely not work. 
    1818 
     19If you intend to build Haiku from a supported build platform other than BeOS, 
     20e.g. GNU/Linux, you need to build a jam executable yourself (don't use the 
     21one coming with your distribution). cd into the "src/tools/jam" subdirectory 
     22of the Haiku tree and type "make" (or "gmake"). The generated jam executable 
     23will be found in a platform specific subdirectory, e.g. "bin.linuxx86/". 
     24The easiest way to use it, is to copy it to a place in your PATH. Furthermore 
     25you need to build the tools for cross compilation (binutils and gcc). Fear not, 
     26the configure script will help you with that one; see below. 
     27 
    1928 
    2029Configuring 
    21 -------- 
     30----------- 
     31 
     32Under BeOS: 
    2233 
    2334Open a Terminal and change to your Haiku trunk folder. To configure the build you 
     
    2637  $ ./configure --target=TARGET 
    2738 
    28 Where "TARGET" is the target platform for the build. Valid targets are "r5", "bone", 
    29 "dano" and "haiku". If you omit the target it defaults to "haiku". To configure for ZETA 
    30 use the "dano" target. 
     39Where "TARGET" is the target platform for the build. Valid targets are "r5", 
     40"bone", "dano" and "haiku". If you omit the target it defaults to "haiku". To 
     41configure for ZETA use the "dano" target. 
    3142 
    32 The configure script generates a file named "BuildConfig" in the "build" directory. 
    33 As long as configure is not modified (!), there is no need to call it again. That is for 
    34 re-building you only need to invoke Jam or makehdimage (see below). 
     43The configure script generates a file named "BuildConfig" in the "build" 
     44directory. As long as configure is not modified (!), there is no need to call it 
     45again. That is for re-building you only need to invoke jam (see below). 
    3546If you don't update the source tree very frequently, you may want to execute 
    3647configure after each update just to be on the safe side. 
     48 
     49 
     50Under Linux or another supported build platform: 
     51 
     52You don't need to supply the "--target" option to configure, since the only 
     53supported target is the default "haiku" anyway. But you have to tell, what 
     54cross compilation tools to use. The tools installed in the system won't work 
     55for compiling Haiku itself (they will be used for building some build tools, 
     56though). The easiest way is to instruct configure to build those tools from the 
     57sources. Supposing you have checked out the buildutils module from the Haiku 
     58SVN repository alongside the Haiku source tree, you can do that via: 
     59 
     60  $ ./configure --build-cross-tools ../buildtools 
     61 
     62One of the last output lines should tell you that the tools have been built 
     63successfully. 
     64 
     65Note, that the old gcc 2.95.3 will be used for building Haiku, required for 
     66binary compatibility with BeOS R5. If you're not interested in binary 
     67compatibility (or want to build for the PowerPC architecture), you can instead 
     68use: 
     69 
     70  $ ./configure --build-cross-tools-gcc4 <arch> ../buildtools 
     71 
     72Replace "<arch>" with either "x86" or "ppc", depending on which of the two 
     73architectures you want to build for. 
     74[At the moment (2005-12-06) the build for PowerPC, or at least the resulting 
     75Haiku does not work.] 
     76 
    3777 
    3878 
     
    4080-------- 
    4181 
    42 The preferred method to build Haiku (currently only possible on a BeOS machine) 
    43 is this: 
     82Haiku can be built in either of two ways, as disk image file (e.g. for use with 
     83emulators) or as installation in a directory. 
    4484 
    45   $ makehdimage /Haiku 
     85Image File: 
    4686 
    47 Where "/Haiku" is the mounted BFS partition where you want to install Haiku on. 
    48 This can be any BFS partition with enough space available. Use DriveSetup to initialize 
    49 a partition to BFS. 
    50 If the parameter is omitted, makehdimage currently creates a 60 MB Haiku image in 
    51 this directory that you can use for Bochs, Qemu and other emulators to boot. 
     87  $ jam -q haiku-image 
    5288 
    53 To build the whole source tree for your selected target platform (to use the apps, 
    54 drivers, add-ons, etc.) you can simply invoke Jam: 
     89Generates an image file named "haiku.image" in your output directory (usually 
     90"generated/"). This method works for all supported build platforms. 
    5591 
    56   $ jam 
    5792 
    58 Or to build only a specific app/driver/etc. include it as an argument: 
     93Directory Installation: 
     94 
     95  $ HAIKU_INSTALL_DIR=/Haiku jam -q install-haiku 
     96 
     97Installs all Haiku components into the directory "/Haiku". If that directory 
     98is the root of a mounted BFS partition, you'll have a Haiku partition afterwards. 
     99To create a partition in the first place use DriveSetup and initialize it to BFS. 
     100 
     101Note, that installing Haiku in a directory only works as expected under BeOS. 
     102 
     103 
     104Building Components: 
     105 
     106If you don't want to build the complete Haiku, but only a certain app/driver/etc. 
     107you can specify it as argument to jam, e.g.: 
    59108 
    60109  $ jam Pulse 
    61  
    62 NOTE: If you have checked out the latest SVN revision, it is not unlikely that 
    63 some parts of the tree won't build. 
    64110 
    65111 
     
    68114 
    69115Generally there are two ways of running Haiku. On real hardware using a partition 
    70 and on emulated hardware using an emulator like Bochs. 
     116and on emulated hardware using an emulator like Bochs or QEmu. 
    71117 
    721181. On Real Hardware 
    73119 
    74 If you have installed Haiku to it's own partition you can include this partition in 
    75 your bootmanager and try to boot Haiku like any other OS you have installed. 
     120If you have installed Haiku to it's own partition you can include this partition 
     121in your bootmanager and try to boot Haiku like any other OS you have installed. 
    76122To include a new partition in the BeOS bootmanager run this in a Terminal: 
    77123 
     
    821282. On Emulated Hardware 
    83129 
    84 For emulated hardware you should build a "haiku.image" using makehdimage without 
    85 arguments. How to setup this image depends on your emulater. A tutorial for Bochs 
    86 on BeOS is below. 
     130For emulated hardware you should build disk image (see above). How to setup this 
     131image depends on your emulater. A tutorial for Bochs on BeOS is below. If you 
     132use QEmu, you can usually just provide the path to the image as command line 
     133argument to the "qemu" executable. 
    87134 
    88135 
     
    96143The package installs to: /boot/apps/BeBochs2.2 
    97144 
    98 You have to set up a configuration for Bochs. You should edit the ".bochsrc" to include 
    99 the following: 
     145You have to set up a configuration for Bochs. You should edit the ".bochsrc" to 
     146include the following: 
    100147 
    101148ata0-master: type=disk, path="/path/to/haiku.image", cylinders=122, heads=16, spt=63 
     
    108155 
    109156Answer with RETURN and with some patience you will see Haiku booting. 
    110 If booting into the graphical evironment fails you can try to hit "space" at the very 
    111 beginning of the boot process. The Haiku bootloader should then come up and you can 
    112 select some safe mode options. 
     157If booting into the graphical evironment fails you can try to hit "space" at the 
     158very beginning of the boot process. The Haiku bootloader should then come up and 
     159you can select some safe mode options. 
    113160 
    114161