Home :: Documentation :: Supported Devices :: Development :: Download :: Community :: Packages :: Links :: About

BuildProcess

BUILD PROCESS

1.- Introduction
2.- Preparing the enviroment
3.- Getting sources to build the toolchain
   3.1.- eabi toolchain
   3.2.- no-eabi toolchain
4.- Kernel
5.- pkgutils-cross
   5.1.- Setup for eabi toolchain
   5.2.- Setup for no-eabi toolchain
6.- Ports

1.- Introduction

A little explanation about how to get the sources to build the toolchain, kernel and ports.

2.- Preparing the environment

   $ sudo install -d -m 0775 -g users /devel
   $ mkdir /devel/crux-arm

3.- Getting sources to build the toolchain

Build the toolchain to get the crosstools and be able to build kernel and ports.

4.- Kernel

Get the kernel and build it. Check the supported devices to see which kernels are available.
   $ cd /devel/crux-arm
   $ git clone git://crux-arm.nu/kernel/versatile.git
   $ cd versatile
   $ git branch 2.6 origin/2.6
   $ git checkout 2.6
   $ make

5.- pkgutils-cross

Get pkgutils-cross' sources and build them:
   $ cd /devel/crux-arm
   $ git clone git://crux-arm.nu/pkgutils-cross.git
   $ cd pkgutils-cross
   $ git branch 2.6 origin/2.6
   $ git checkout 2.6
   $ make
You must set it up to fill your needs depending in the toolchain used:

6.- Ports

Checkout git sources for port repositories
   $ mkdir /devel/crux-arm/ports
   $ cd /devel/crux-arm/ports
   $ git clone git://crux-arm.nu/ports/core-cross.git
   $ cd core-cross
   $ git branch 2.6 origin/2.6
   $ git checkout 2.6
Build ports
   $ cd /devel/crux-arm/ports/core-cross/ncurses
   $ export PATH=/devel/crux-arm/pkgutils-cross:$PATH
   $ fakeroot pkgmk-cross -d

FAQ

Q. How should I cross build a port which requires some other deps?
A. Just build all deps with pkgmk-cross and install them in your $CLFS. i.e: (if you need zlib installed for building a port)
   $ cd /devel/crux-arm/ports/core-cross/zlib
   $ fakeroot pkgmk-cross -d
   $ sudo pkgadd-cross zlib#1.2.3-1.pkg.tar.gz
A. For debian or ubuntu based systems it's needed to use the env:
   $ sudo env PATH=$PATH pkgadd-cross zlib#1.2.3-1.pkg.tar.gz
or making an alias:
   $ alias sudo='sudo env PATH=$PATH'
Q. Can I use optimize flags for my ARM processor?
A. Yes, pkgmk-cross can be used with -o option to specify the optimization to use. There are some optimizations predefined in pkgmk.conf file and can be added more.
  arm9tdmi_CFLAGS="-O2 -pipe -march=armv4 -mtune=arm9tdmi"
  armv5te_CFLAGS="-O2 -pipe -msoft-float -march=armv5te"
  strongarm_CFLAGS="-O2 -pipe -march=armv4 -mtune=strongarm"
  xscale_CFLAGS="-O2 -pipe -msoft-float -march=armv5te -mtune=xscale"
i.e. of usage: pkgmk-cross -o name
where name is the optimization selected, arm9tdmi, armv5te, strongarm, xscale or your custom CFLAGS