http://www.aros.orgAROS-ExecAROS-Exec ArchivesPower2People

Strona główna

English

Česky

Deutsch

Ελληυικά

Français

Italiano

Nederlands

Polski

Português

Русский

Español

Suomi

Svenska


Newsy

Archiwum

Wprowadzenie

Status
Zrzuty ekranu
Porty
Licencja

Download


Dokumentacja

Użytkownicy
Instalacja
Użytkowanie
Komendy shella
Applications
FAQ
Programiści
Współpraca
Roadmap
Bug Tracker
Praca z SVN
Kompilowanie
Podręcznik programisty
Zune - podręcznik programisty
System Development Manual
Debugging Manual
Reference
Specyfikacje
UI Style Guide
Documenting
Porting
Tłumaczenie
Summaries
Linki

Kontakt

Listy dyskusyjne
Kanały IRC

Credits

Acknowledgements


Obrazy

Programiści
Developers en Masse

Sponsorzy

Linkowanie

Linki

Get AROS Research Operating System at SourceForge.net. Fast, secure and Free Open Source software downloads

Compiling AROS

Requirements

The following software is required for compiling AROS:

  • GCC 3.2.2+
  • GNU Binutils
  • GNU Make
  • GNU AWK (GAWK) - other awks may also be suitable
  • Python 2.2.1+
  • Bison
  • Flex
  • pngtopnm and ppmtoilbm (part of the netpbm package)
  • Autoconf 2.61+
  • Automake
  • C library development files (libc)
  • Common utilities like cp, mv, sort, uniq, head, ...

If you want to compile the hosted i386-linux or i386-freebsd ports, the following is also required:

  • X11 development headers and libraries

If you want to build the ISO image of i386-pc or x86-64-pc ports with the GRUB 2 bootloader (the default), the following is also required:

  • ncurses
  • development files for lzo library

Mac OS X

Although there is currently no OS-X-hosted version of AROS, PC-native AROS can be cross compiled under OS X. There are several additional requirements for compiling AROS on this platform. Firstly, these software packages must be installed:

  • XCode
  • MacPorts

The following MacPort packages then need to be installed to complete the set of required software listed earlier:

  • i386-elf-gcc
  • netpbm
  • cdrtools
  • gawk
  • py-pil
  • wget
  • autoconf (if using XCode 2.4 or earlier)

These can be installed with, for example:

> sudo port install i386-elf-gcc

You also need to create a dummy crt0.o file for use by configure scripts. Create the following file in a text editor and save it as crt0.c:

int _start()
{
}

Then compile and install it with:

> i386-elf-gcc -c crt0.c
> sudo cp crt0.o /opt/local/i386-elf/lib/

Lastly, there is a missing symbolic link that needs to be created:

> cd /opt/local/bin
> sudo ln -s i386-elf-gcc-3.4.3 i386-elf-gcc

Sources

You can download the AROS sources either from the download page or by using SVN (which requires that you apply for access though; see subversion documentation as well).

In both cases you need to get both the source and contrib packages. Extract or download source package sources into a directory of your choice. Next, extract or download contrib package sources into a ./contrib subdirectory of source package directory tree.

You don't need have all contrib sources. The minimal set is located in ./contrib/necessary.

Building

Configuring

There are two ways to build AROS. The prefered method is described in the Appendix: Building AROS in different directories, however here we will build AROS within the source directory. To do this we will first need to configure the AROS build using the following steps:

> cd AROS
> ./configure

You can specify several options to configure. The following options are available for all targets:

--enable-debug=LIST [default: none]

Enable different types of debug. Commas or whitespaces can be used to separate the items in the list. If no list is provided then all is assumed. If --enable-debug is not specified at all, none is the default. Available types:

none
Disables all debug types, and debugging in general.
all
Enables all debug types below.
stack
Enables stack debug.
mungwall
Enables mungwall debug.
modules
Enables modules debug.

Also, you can run ./configure --help to see details of additional options.

Hosted AROS/i386-linux or AROS/i386-freebsd

You do not have to specify the --target option to build these targets. The following options are available for hosted builds:

--with-resolution=WIDTHxHEIGHTxDEPTH [default: 800x600x8]
Set the default resolution and depth AROS will use.
--enable-xshm-extension [default: enabled]
Enable usage of the X11 MIT-SHM extension. Enabling it gives a significant performance gain, but it might not work very well if you are using a remote display.

You cannot crosscompile these ports.

Native AROS/i386-pc

To build the i386-pc port, you need to pass --target=pc-i386 to configure. Additionally, the following i386-pc specific options are available:

--with-serial-debug=N [default: disabled]
Enable serial debug, sending the output to port N.
--with-bootloader=NAME [default: grub2]
Use a specific bootloader.

przypis

Since the default bootloader, GRUB 2, cannot be built in a cross-compilation environment, GRUB 1 must be used if compiling under Mac OS X. To do this, use --with-bootloader=grub.

Compiling

To start the compilation, simply run:

> make

IF this doesn't work after a SVN update, you can try:

> make clean
> rm -rf bin/
> ./configure {options}
> make

If you use FreeBSD or some other system that does not use GNU Make as the system make, then you should substitute the GNU Make command for the above. For example, under FreeBSD you must install the GNU Make port, then run:

> gmake

Hosted AROS/i386-linux or AROS/i386-freebsd

If you are building a hosted i386-linux or i386-freebsd build, you should additionally also run the following to properly setup the keyboard support:

> make default-x11keymaptable

Native AROS/i386-pc

If you are building the native i386-pc port, you will find a bootable floppy image at bin/pc-i386/gen/rom/boot/aros.bin after the compilation has finished. Additionally, you can create a bootable ISO image by running:

> make bootiso-pc-i386

The ISO image can be found at distfiles/aros-pc-i386.iso.

Building AROS on AROS

Starting from 2008-11-17 it's possible to build i386-pc and x86_64-pc AROS on AROS. Only building on SFS partitions is possible at this moment. To do it, you need to install a few additional packages from The AROS Archives (file names for i386 architecture):

  • autoconf-2.62.i386.tar.gz
  • automake-1.9.6.all.tar.gz
  • perl-5.7.2.i386-aros.tar.gz
  • python-2.5.2.i386-aros.tar.gz
  • lzo-2.03.i386.tar.gz

Install these packages by unpacking them in the parent directory of Development:

> Cd Development:/
> tar -xzf RAM:autoconf-2.62.i386.tar.gz
> tar -xzf RAM:automake-1.9.6.all.tar.gz
> tar -xzf RAM:perl-5.7.2.i386-aros.tar.gz
> tar -xzf RAM:python-2.5.2.i386-aros.tar.gz
> tar -xzf RAM:lzo-2.03.i386.tar.gz

Now download and unpack the AROS source code and contributed software source code. To unpack you need to have bzip2 installed. In nightly builds it should be present in Extras:Misc/aminet/C/bzip2. Instead of using bzip2 to manually unpack sources you can copy bzip2 to bin: and let tar take care of this:

> Copy Extras:Misc/aminet/C/bzip2 bin:
> tar --exclude=contrib -xjf AROS-20081117-source.tar.bz2

Note the --exclude=contrib option. It's necessary because there's a symbolic link named contrib in the source code snapshots pointing to non-existent Contrib directory. Once it's extracted to SFS filesystem there's no way to delete it without removing the whole directory, so it's best to skip it.

Contributed software is not guaranteed to build on AROS except the special set of packages contained in necessary directory. It's recommended to extract only this directory when building AROS on AROS and copy it somewhere inside the unpacked AROS source tree. Suggested location is contrib directory:

> tar -xjf AROS-20081117-contrib-source.tar.bz2 AROS-20081117-contrib-source/necessary
> MakeDir AROS-20081117-source/contrib
> Rename AROS-20081117-contrib-source/necessary AROS-20081117-source/contrib/necessary

Now run configure script setting appropriate target, CFLAGS, LDFLAGS and host-side strip command:

> Cd AROS-20081117-source
> bin:sh
> ./configure --target=pc-i386 LDFLAGS="-nix" CFLAGS="-nix -I/Development/netinclude"
  aros_host_strip="strip --strip-unneeded"

When configure finishes, run make:

> make

Some requesters asking to insert volumes HOME: or DEV: to any drive may appear during the build process, they can be safely cancelled.

Building AROS on AROS takes more time than on Linux (from 1.5 to several hours depending on your CPU and hard disk performance). To shorten the build time, try increasing the number of buffers and cache size for your SFS partitions.

Since grub2 still hasn't been ported to AROS, creating an ISO image containing the resulting binaries by making the bootiso target is not possible yet.

Appendix

Building several targets from the same source

If you intend to compile several different targets from one source tree, then you first have to go through the configuration step for each of your targets. You can add targets at any time you want. The last target specified to configure is the default target.

To select a specific target when building, simply run make like this:

> AROS_TARGET_ARCH=$ARCH AROS_TARGET_CPU=$CPU make

Where $ARCH is the architecture of the wanted build, and $CPU is the CPU. Eg., to build AROS/i386-pc you would run:

> AROS_TARGET_ARCH=pc AROS_TARGET_CPU=i386 make

If you are building several ports that use the same CPU, you only have to specify AROS_TARGET_ARCH as the CPU will stay the same.

After you`ve made "make" once, and some changes were made to the files, you can use quick compilation of changes using make <target-name>-quick command.

Building AROS in different directories

It is possible to configure and build AROS in a directory other than the working copy. For example:

> svn co https://svn.aros.org/svn/aros/trunk/AROS aros-src
> cd aros-src
> mkdir ../build
> cd ../build
> ../aros-src/configure [...with options as appropriate...]
> make

puts the AROS working copy in the directory "aros-src" and builds it in a separate, parallel directory "build".

Why would you want to do this? Well there are a number of reasons:

  • You may want to separate the source and object code and only backup the source / avoid "polluting" the working copy with files generated during the build.
  • You may want to put the build directory and the working copy on different physical disks to improve performance.
  • You may want to remote mount the working copy on multiple machines, and build for different machines from the same working copy.
  • You may want to build multiple configurations from the same working copy.

The last reason above is possibly the most useful. For instance you can have builds for separate architectures and/or debug builds each using the same working copy. Using multiple build directories you can rebuild any or all configurations after an edit without the need to either clean and reconfigure, or identify and copy changes into another working copy.

przypis

If you have previously built AROS inside the working copy you will need to delete all obsolete generated files from the source tree before attempting to configure/build in another directory. The reason for this is some parts will detect the existing file in the source tree before the correct version and attempt to use that. It is best to delete the bin/ directory aswell as all files that shouldnt exist when the following command is used:

svn status --no-ignore

Delete any files which are ignored/not supposed to be there (unless they are your own projects files).

przypis

If you are compiling multiple AROS builds from the same working dir, the following configure option will make them use a common location to download external sources to

--with-portssources=<path to common location>

It is best to use a seperate directory outside of both the working dir and build dir(s) to store these files - so that if you delete a build or the working dir you will still have the files and not need to download them every time.

Compiling HowTos

This step-by-step guide will describe how to prepare the development environment and compile AROS on Ubuntu Linux 6.10 "Edgy Eft". Let's assume you have a CD image (iso) from ubuntu sites and have installed the system from it. Also you should tune it to make it acessing the Internet.

Getting the needed packages

Because the Live CD misses needed packages we have to get them from internet:

> sudo apt-get install subversion gcc-3.4 gawk bison flex netpbm autoconf automake1.4
libx11-dev libc6-dev

You will need to enter your user password at the prompt.

Setting the locale to ISO8859

This step is not strictly necessary. However, file names with accented characters will not be reproduced properly if it is not done. Just find the en_US iso 8859-1 string in the list provided by the following applications and choose it:

> sudo apt-get install localeconf
> sudo dpkg-reconfigure localeconf

Then we will set the console's locale:

> sudo locale-gen "en_US"
> sudo dpkg-reconfigure locales
> export LANG="en_US.ISO-8859-1"

Get the sources

To find out more instruction on how to use our SVN Repository, please refer to Working with Subversion

In brief, the commands you must use are the following:

> svn checkout https://svn.aros.org/svn/aros/trunk/AROS
> cd AROS
> svn checkout https://svn.aros.org/svn/aros/trunk/contrib

Configure and compile AROS sources

First we will set parameters and configure:

> export CC="gcc-3.4"
> ./configure

Finally, type:

> make

This shall take a while (up to some hours on slow machines) :) After that you will get AROS-hosted compiled. Please also note that you might need internet access during the progress, used to download latest EUAE and GNU sources.


Copyright (C) 1995-2009, The AROS Development Team. Wszystkie prawa zastrzeżone.
Amiga(R), AmigaOS(R), Workbench i Intuition are znakami towarowymi Amiga Inc. Wszystkie inne znaki towarowe należą do ich prawnych właścicieli.