In the past I once had written a short guide which steps are needed to compile Haiku directly from source on Linux. Unfortunately, the article with the haiku-gazette.de domain is down.
so again following the whole procedure for building hybrid images (gcc2 and gcc4) on Ubuntu 10.10 (other distributions should work the same approach to the installation of the necessary tools and perhaps a revised directory path here and there).
To save the whole cross-Kompiliererei, build tools and provides an "xattr-supporting partition, etc., you should consider even know if you'd rather not build directly under Haiku image. There are already all the tools available and you can sometimes loose points 1-4 and 6 of this manual skip ...
All information you can gather together even in the official guides . There are also more details for people who want to go deeper or want to consider special requests.
first In order to take into account when preparing
Imagebau Haikus extended attributes, the source code should be on a partition with a file system, called xattr added support. I use to reiserfs because the partition then I can at least hang in Haiku reading. Other appropriate file systems would lt Guide JFS, NTFS (via NTFS-3G), UFS2, XFS, ZFS.The source code for the build tools is great for compiling such a directory, including the haiku, and MiB-generated objects for gcc4 gcc2 and then another 3.5 GiB. Build the tools source code could in theory delete after compiling again, but if there was change, you have to download it yet again ...
The best way is equal to a sufficiently large partition. With 10 GiB one has no worries for the future ...
then still follow the typical Linux games that I have brought only by a few Googelei to the series.
It is not enough as it really comfortable with Ubuntu is to mount the source partition. You have to enable xattr support explicitly. This is in the file / etc / fstab attach a corresponding entry of the partition then correspondingly mounts automatically:
sudo gedit / etc / fstab
In the present there messages you hang up the details of his source partition under it, eg: #
\u0026lt;file system> \u0026lt;mount-point> \u0026lt;type> \u0026lt;options> \u0026lt;dump> \u0026lt;pass>
# source code on / dev/sda11
UUID = 1938d3c2-10bb-4945-8150-1b6ec24deae3 / media / Source Code reiserfs auto, rw, user_xattr 0 0
The UUID of the source partition, you get as it is in the fstab file (strangely, given there with parameters suppress important information would be ...) with the command:
blkid
second Required Tools
To make sure that all required tools are installed on the Linux system, you should start this command in the console: sudo apt-get install subversion yasm autoconf automake texinfo flex bison gawk build-essential
third Build Tools Source Download
The next is needed on Linux cross-build tools and a special jam version. can you build Haiku in Haiku or BeOS, Zeta is the same jump to point 5.starting point is the top level of the suspended source partition. In my case this is done by:
cd / media / Source Code
The normal user is charged down the source code like this: svn checkout
http://svn.haiku-os.org/haiku/buildtools/trunk haiku / build tools
The registered developer with write access to SVN: svn checkout svn
+ ssh: / / username@svn.haiku-os.org / srv / svn / repos / haiku / build tools / trunk haiku / build tools
4th Build tools to build and install
the source code on the disk, is switching to haiku / build tools / jam / compile "jam" and shifts the result of bin.linuxx86 to / usr / bin / haiku cd / build tools / jam
make
bin.linuxx86/jam sudo mv / usr / bin /
5th Haiku source code download
As for the build tools, source code, there are the differences between normal users and developers write access rights. First, will return you to the top level, ie directly on the source partition (in this case cd ../../..
). Normalo:
svn checkout http://svn.haiku-os.org/haiku/haiku/trunk haiku / haiku / trunk
Developer:
svn checkout svn + ssh: / / username@svn.haiku-os.org / srv / svn / repos / haiku / haiku / trunk haiku / haiku / trunk
6th Configure environment
The options for configuring the build environment are diverse . Here we start with the creation of a gcc2 / 4 hybrid haikus and that the source code is located on a filesystem with xattr support (and that the partition is mounted with this xattr support ...).First we create two folders in which the image is built, one for gcc2, one for gcc4.
cd haiku / haiku / trunk mkdir
generated-gcc2
mkdir generated
Now we switch to the folder and configure the build system according to a hybrid gcc2 or gcc4 hybrid.
cd generated-gcc2
.. / configure - use-xattr - distro-compatibility official - include-patented-code \\
- build-cross-tools .. / .. / .. / build tools - -alternative-gcc-output-dir .. / generated
cd .. / generated
.. / configure - use-xattr - distro-compatibility official - include-patented-code \\
- build-cross- tools-gcc4 x86 .. / .. / .. / build tools - alternative-gcc-output-dir ../generated-gcc2
7th UserBuildConfig
In haiku / haiku / trunk / build / jam / are a lot of configuration files, including the UserBuildConfig (which is created on top of a copy of UserBuildConfig.sample ). With it you can build create profiles to pack as automatically various software packages in the optional image, or to write directly to a partition or to create an image for USB / CD or VMWare / VirtualBox. produced@ VM: Furthermore, by a lot of commands to copy files to the external image or extract (think of backups of zipped folders config, etc.)
here is a complete
- UserBuildConfig
- with three profiles an image for VMWare / VirtualBox.
- @ ANY anyboot generates an image for USB flash drives or burning to CD.
- @ HD installed directly on a partition (be sure to check three times, that also describes the right!).
# OpenSSH for this variable must be set to any nameMore info can be found in UserBuildConfig.sample and UserBuildConfig.ReadMe . In optional packages all available optional software packages are available.
HAIKU_IMAGE_HOST_NAME = "Walter";
# Set the German keymap
AddFilesToHaikuImage home config settings: \u0026lt;keymap> German
: Key_map;
# HAIKU_TOP is always the haiku / trunk / #
level where I created the folder "user_data" and QuickLaunch.zip tricked.
# Will be extracted to the / boot / apps /.
ExtractArchiveToHaikuImage apps
. $ (HAIKU_TOP) / user_data / QuickLaunch.zip;
# Copies the "artwork" folder without the svn files to / boot / home /
CopyDirectoryToHaikuImage home
: $ (HAIKU_TOP) / data / artwork: . svn-x;
# For a hybrid image libraries for the alternate compiler is needed.
HAIKU_ADD_ALTERNATIVE_GCC_LIBS = 1;
# In some countries protected by software patents code is used
HAIKU_INCLUDE_PATENTED_CODE = 1;
# All build profiles, these optional packages will
AddOptionalHaikuImagePackages BePDF;
AddOptionalHaikuImagePackages OpenSSL, OpenSSH
AddOptionalHaikuImagePackages;
AddOptionalHaikuImagePackages Pe;
AddOptionalHaikuImagePackages Vision;
AddOptionalHaikuImagePackages WebPositive;
AddOptionalHaikuImagePackages WifiFirmwareScriptData;
AddOptionalHaikuImagePackages XZ-Utils;
# Build-profile 1: Based on the profile of "disk", installed on a partition
# Of course the path to the correct partition instead of "/ dev/sda77!
DefineBuildProfile HD: disk: / dev/sda77 ";
# Build-profile 2: Based on the profile" anyboot-image "
DefineBuildProfile ANY: anyboot image:" haiku-anyboot.image ";
# Build-profile 3: Based on the profile "vmware-image"
DefineBuildProfile VM: vmware-image;
switch $ (HAIKU_BUILD_PROFILE) {
case "HD": {
# In addition to the above optional packages for all profiles :
AddOptionalHaikuImagePackages army knife;
AddOptionalHaikuImagePackages BeBook;
AddOptionalHaikuImagePackages BePDF;
AddOptionalHaikuImagePackages BeZillaBrowser;
AddOptionalHaikuImagePackages Clockwerk;
AddOptionalHaikuImagePackages CVS;
AddOptionalHaikuImagePackages Development;
AddOptionalHaikuImagePackages Paladin;
AddOptionalHaikuImagePackages Subversion;
AddOptionalHaikuImagePackages TimGMSoundFont;
AddOptionalHaikuImagePackages transmission;
AddOptionalHaikuImagePackages Welcome;
AddOptionalHaikuImagePackages WonderBrush;
}
case "ANY": {
# image size in MiB
HAIKU_IMAGE_SIZE = 800;
# In addition to the above optional packages for all profiles:
AddOptionalHaikuImagePackages army knife ;
AddOptionalHaikuImagePackages BeBook;
AddOptionalHaikuImagePackages BePDF;
AddOptionalHaikuImagePackages BeZillaBrowser;
AddOptionalHaikuImagePackages Clockwerk;
AddOptionalHaikuImagePackages CVS;
AddOptionalHaikuImagePackages Development;
AddOptionalHaikuImagePackages Paladin;
AddOptionalHaikuImagePackages Subversion;
AddOptionalHaikuImagePackages TimGMSoundFont;
AddOptionalHaikuImagePackages transmission;
AddOptionalHaikuImagePackages Welcome;
AddOptionalHaikuImagePackages WonderBrush;}
case "VM": {#
image size in MiB
HAIKU_IMAGE_SIZE = 900;
}}
Most of these packages can also install more later in Haiku. To view a list to get all available packages, you write in the terminal:
optional install package-lTo install one, simply specify its name instead of -l . There is no option to automatically uninstall it, however.
8th Complete Image Haiku build
All of the above points must be carried out only once. Once you are on the build system, once running, you simply point out that only 8 if you want to have a topical haiku image. In order to updatethe complete source:
cd haiku / haiku trunk / svn update
If only a particular component to be updated, replaced to the appropriate folder, then only this and all subdirectories to be related to state, for example haiku / haiku / trunk / src / apps / for all applications. Share their changes, but also predicted changes subsystems (eg change the layout or locale Kit), the compilation of course, go wrong and you will not drumrum the rest of the source code to update ...
Then, to build the image:
cd haiku / haiku / trunk / generated
jam-QJ2 @ ANY
gcc4 is being built a hybrid image. If you want a gcc2 hybrid image (as it is in official Alpha / Beta versions or not), you switch instead to haiku/haiku/trunk/generated-gcc2 / before it jammed. The
-q means the jam immediately terminates if it encounters an error. The
-j2 can jam 2 threads simultaneously. The most effective one is the number of threads to the number of cores on the CPU. The
@ ANY selects a build profile, here the image of our anyboot UserBuildConfig . In addition to these self-defined profiles, there are also official, such as alpha- * or nightly -* (see release build profiles ).
9th Image
you install does not install directly to a partition (our @ HD profile), is at the end of an image generated in folder, which can be used either as an image for VMWare / VirtualBox or in case of anyboot images to burn to CD or USB flash drive can write.The USB stick is done with: dd if =
haiku-anyboot.image of = / dev / sdb bs = 1M
As of (output file) you have, of course, the correct path to his USB flash drive select. So here again caution the day!
the USB stick you can try out boats and the new build or as usual to install a partition.
10th Tips & Tricks
- If the jam for some reason stopped, and there is no known problem (see corresponding messages on the Dev mailing list, or search for current " [BOM] " (Build-O-Matic) messages on the commits mailing list) should be the best objects in the folder generated delete directories. Then we jammed with the additional parameter-a so jam- qaj2 @ ... .
For some strange errors will also help to restart. Sounds strange, but so ...
- Always a good starting point when you run into problems (and possibly # # haiku haiku-de at irc.freenode.net) IRC. If you want to show the other longer error messages or its UserBuildConfig are services like pastebin or recommend for images Imagepin . to bring
- retrieve the source code to a specific revision use the command svn update-r {} revision number. Is it me or a path / file name, only that file to be related to this revision.
- It does not always build an entire image, we will update only one component. In generated folder you are simply jam-QJ2 {} a component, eg jam-QJ2 show image or jam-QJ2 net_server . The updated component is then (somewhat hidden) in the appropriate directory under generated / objects / .
is even easier with the @ HD build profile. Here the component is automatically installed in the Haiku partition. This one just writes jam-QJ2 HD @ {component} update.
exercise for critical components of course you care. Install such a bad app_server, you can not boot may Haiku ...
- Will you want to access data from his Haiku partition from Linux, which is at least read by (adjust " sdXxx " according to) the corresponding partition mounts:
sudo mount / dev / sdXxx / media / Haiku-t befs
.
See also the recent article in Idefix 'Blog
0 comments:
Post a Comment