Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Community Discussions > Other OS Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read


The Ubuntu Forums have grown tremendously over the years. While we regret that we are discontinuing our Other OS Talk category, this gives us an opportunity to help other Linux distributions grow by directing traffic to the websites of these distributions.

Here is a list of the official websites for the operating systems that used to have individual forums here. We hope you are able to find further assistance from there. And finally, if you haven't yet found what you are looking for, we suggest you look for information on the DistroWatch website or you might try the multi-distribution LinuxQuestions forum.

Other OS Talk
Discuss other linux distros and OSs here.

 
 
Thread Tools Display Modes
Old September 29th, 2007   #1
RAV TUX
Problem?...Bunny fix!
 
RAV TUX's Avatar
 
Join Date: Oct 2005
Location: Portland, Oregon USA
Beans: 6,905
Red face Building Haiku in Linux

I have started here a cafe thread on building Haiku in Linux. Please use this thread to discuss building/using Haiku in Linux.

refer to the Haiku homepage for more information if needed: http://haiku-os.org/

I began by following this directive:

1) Login as su

2) Get subversion
Code:
apt-get install subversion
3) compile the build tools:
Code:
apt-get install autoconf
Code:
 apt-get install automake
Code:
 apt-get install texinfo
Code:
 apt-get install flex
Code:
 apt-get install bison
Code:
 apt-get install gawk
4) fetching the build tools:
Code:
svn checkout svn://svn.berlios.de/haiku/haiku/trunk haiku
Code:
svn checkout svn://svn.berlios.de/haiku/buildtools/trunk buildtools
5)Building jam
Code:
cd  buildtools/jam  
make
./jam0 install
6) since Haiku requires a modified version of jam check to see that you have the correct version of jam:
Code:
jam -v
for example I checked my jam version and got these results:
Code:
Jam 2.5-haiku-20060813. OS=LINUX. Copyright 1993-2002 Christopher Seiwald.
which is the correct version

7)Building binutils:

for simplicity lets go with:
Quote:
2.95: Creates BeOS compatible binaries
The 2.95 command configuration is:
Code:
cd haiku 
./configure --build-cross-tools ../buildtools/
This final step in building the binutils is where I am stuck btw:

here is what I get when I try this:
Code:
# cd haiku
bash: cd: haiku: No such file or directory
[/home/ravtux/buildtools/jam]# ./configure --build-cross-tools ../buildtools/
bash: ./configure: No such file or directory
for the above directive see this link and also follow the comments:

http://haiku-os.org/documents/dev/ge...eveloper_tools

also see the attached screenshots:
Attached Images
File Type: png snapshot7.png (311.0 KB, 65 views)
File Type: png snapshot8.png (311.9 KB, 54 views)
RAV TUX is offline  
Old September 29th, 2007   #2
RAV TUX
Problem?...Bunny fix!
 
RAV TUX's Avatar
 
Join Date: Oct 2005
Location: Portland, Oregon USA
Beans: 6,905
Red face Re: Building Haiku in Linux

here is some more information from the 'Read Me' file:
Quote:
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 "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.

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.
RAV TUX is offline  
Old September 29th, 2007   #3
RAV TUX
Problem?...Bunny fix!
 
RAV TUX's Avatar
 
Join Date: Oct 2005
Location: Portland, Oregon USA
Beans: 6,905
Red face Re: Building Haiku in Linux

This Read me is more specific to setting up the cross compiler:
Quote:
Building on a non-BeOS platform
===============================

We currently support these non-BeOS platforms:
* Linux
* FreeBSD
* Mac OS X Intel (gcc 4 builds only)

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 the
parent directory of your Haiku repository:

svn checkout svn://svn.berlios.de/haiku/buildtools/trunk buildtools

You should now have a 'buildtools' folder that contains folders named
'binutils', 'gcc', and 'jam' among others.

Several other tools are required to build these build tools or are used by
Haiku's build system itself:
* gcc and the binutils (as, ld, etc., required by gcc)
* make (GNU make)
* bison
* flex and lex (usually a mini shell script invoking flex)
* makeinfo (part of texinfo, needed for building gcc 4 only)
* autoheader (part of autoconf, needed for building gcc)
* gawk

Whether they are installed can be tested for instance by running them in the
shell with the "--version" parameter.

On Mac OS X a case-sensitive file system is required for the Haiku tree
(Disk Utility can be used to create a case-sensitive disk image of at least
3GB size), and the following darwin ports need to be installed:
* expat
* gawk
* gettext
* libiconv
* gnuregex


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 the build system is
fully configured and you are ready to compile your first Haiku image.

Instructions on how to build Haiku can be found in the section Building in the
'ReadMe' document.
RAV TUX is offline  
Old September 29th, 2007   #4
RAV TUX
Problem?...Bunny fix!
 
RAV TUX's Avatar
 
Join Date: Oct 2005
Location: Portland, Oregon USA
Beans: 6,905
Re: Building Haiku in Linux

Quote:
You should now have a 'buildtools' folder that contains folders named
'binutils', 'gcc', and 'jam' among others.
This I do have
Attached Images
File Type: png snapshot9.png (98.0 KB, 46 views)
RAV TUX is offline  
Old September 29th, 2007   #5
RAV TUX
Problem?...Bunny fix!
 
RAV TUX's Avatar
 
Join Date: Oct 2005
Location: Portland, Oregon USA
Beans: 6,905
Red face Re: Building Haiku in Linux

unraveling the clues on building Haiku in Linux

a couple of more read-me's:

Quote:
How to build gcc-2.95.3 for BeOS under Linux (a cross-compiler), which
will allow you to compile BeOS projects under Linux, i.e. the apps
that this compilers produces can only be executed on BeOS (not on Linux).

If all you are interested is compiling haiku on Linux, please refer to
the file 'INSTALL-as-haiku-cross-compiler' instead (that's easier).

These instructions are required only if you want to compile something
(applications, libraries) on LINUX which should be executed on BeOS R5,
BONE or ZETA.

*** the major work of creating the cross-compiler and describing the
*** process how to build it has been done by Eric Petit <titer@m0k.org>,
*** so if you think this cross-compiler is great, please tell him.

-----------------------------------------------------------------------
On your Linux-box, open a shell...

0 - Preparations
----------------
...and fetch the 'buildtools' module from the haiku SVN. You should then
have a 'buildtools' folder that contains folders named 'binutils' and
'gcc' (and this file, too!).

cd buildtools/legacy

Now decide where you want to install the cross-compiler. The install
folder will be referred to as $PREFIX. I suggest to install to
/opt/cross-tools, but you can basically put it anywhere you like.

export PREFIX=/opt/cross-tools

and add it the path:

export PATH=$PATH:$PREFIX/bin

Create two folders for the headers and libraries, say $BEINC and
$BELIB:

mkdir beinc
export BEINC=$(pwd)/beinc
mkdir belib
export BELIB=$(pwd)/belib

Copy all contents from /boot/develop/lib/x86/ on your BeOS install to
$BELIBS on your Linux box (make sure symbolic links are followed). You
should have $BELIBS/libbe.so, etc.

Copy all contents from /boot/develop/headers/ on your BeOS install to
$BEINCS on your Linux box. You should have $BEINCS/be/AppKit.h, etc.


1 - Building binutils
---------------------
mkdir binutils-obj
cd binutils-obj
CFLAGS="-O2" CXXFLAGS="-O2" ../binutils/configure --prefix=$PREFIX \
--target=i586-pc-beos --disable-nls --enable-shared=yes
make && make install
cd ..

2 - Building gcc/g++
--------------------
mkdir -p $PREFIX/lib/gcc-lib/i586-pc-beos/2.95.3-beos-041202
mkdir gcc-obj
cd gcc-obj
CFLAGS="-O2" CXXFLAGS="-O2" ../gcc/configure --prefix=$PREFIX \
--target=i586-pc-beos --disable-nls --enable-shared=yes \
--enable-languages=c,c++ --with-headers=$BEINC --with-libs=$BELIB
make cross && make install
cd ..

Ok, now everything is compiled and installed, waiting to be used:

i586-pc-beos-gcc test.c

would compile the file test.c with the fresh cross-compiler.

So have fun!

Please send questions & bug-reports to: Oliver Tappe <gcc@hirschkaefer.de>

Quote:
How to create a cross-compiler on LINUX (or any other supported build platform)
for haiku (information is copied from haiku's README):

Please chdir into haiku's base directory (the one where Jamrules and README live).

If you want to build the default (legacy, 2.95.3) gcc, do this:

$ ./configure --build-cross-tools ../buildtools

One of the last output lines should tell you that the tools have been built
successfully.

If you're not interested in binary compatibility (or want to build for the PowerPC architecture), you can build gcc4 instead by doing this:

$ ./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.
RAV TUX is offline  
Old September 29th, 2007   #6
Jucato
Chocolate Ubuntu Mocha Blend
 
Jucato's Avatar
 
Join Date: Jan 2006
Location: Laguna, Philippines
Beans: 1,816
Kubuntu 7.10 Gutsy Gibbon
Send a message via MSN to Jucato Send a message via Yahoo to Jucato
Re: Building Haiku in Linux

Wait, I'm confused... Isn't Haiku supposed to be a totally new/different OS? How is it that you're building it on Linux?

Oh, and btw, hi RAV! How's Cafe Linux and Oz Linux doing?
__________________
Jucato's Data Core and Blog
Jucato is offline  
Old September 29th, 2007   #7
K.Mandla
午後の紅茶 お願いします
 
K.Mandla's Avatar
 
Join Date: Feb 2006
Location: Japan
Beans: 5,931
Ubuntu
Re: Building Haiku in Linux

Moved to Other OS Talk.
__________________
Ubuntu user #7247 :: Linux user #409907
Motho ke motho ka botho :: Buy old, not new :: Keep your old computer :: Things to do with it
K.Mandla is offline  
Old September 29th, 2007   #8
RAV TUX
Problem?...Bunny fix!
 
RAV TUX's Avatar
 
Join Date: Oct 2005
Location: Portland, Oregon USA
Beans: 6,905
Red face Re: Building Haiku in Linux

Quote:
Originally Posted by Jucato View Post
Wait, I'm confused... Isn't Haiku supposed to be a totally new/different OS? How is it that you're building it on Linux?
Pretty interesting isn't it, it can be built within Linux and even set up with a separate GRUB menu to boot into separately.


Quote:
Originally Posted by Jucato View Post

Oh, and btw, hi RAV! How's Cafe Linux and Oz Linux doing?
CafeLinux is great, check it out for yourself:
http://www.cafelinux.org/home/


Oz Linux is very active and can be downloaded:
http://cafelinux.org/OzEnterprise/

Quote:
Originally Posted by K.Mandla View Post
Moved to Other OS Talk.
This is unfortunate since Haiku can be built in Ubuntu.
RAV TUX is offline  
Old September 30th, 2007   #9
RAV TUX
Problem?...Bunny fix!
 
RAV TUX's Avatar
 
Join Date: Oct 2005
Location: Portland, Oregon USA
Beans: 6,905
Red face Re: Building Haiku in Linux

http://pastebin.ca/720291

http://pastebin.ca/720317

Last edited by RAV TUX; September 30th, 2007 at 02:09 AM..
RAV TUX is offline  
Old September 30th, 2007   #10
RAV TUX
Problem?...Bunny fix!
 
RAV TUX's Avatar
 
Join Date: Oct 2005
Location: Portland, Oregon USA
Beans: 6,905
Red face Re: Building Haiku in Linux

YES!!! I am running Haiku in Linux!
Attached Images
File Type: png snapshot20.png (98.0 KB, 61 views)
File Type: png snapshot21.png (101.9 KB, 56 views)
RAV TUX is offline  
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:19 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry