Navigation
To build Astlinux you first need to install some packages:
The AstLinux Development Environment (ADE) is hosted on Subversion servers provided by SourceForge. Subversion allows several developers to work on the AstLinux sources simultaneously while tracking revisions and changes.
These instructions will show you how to build AstLinux from the 1.0 branch. First, you will need access to a Linux machine. Almost any Linux machine will do but some may have problems. Most of the developers use some version of CentOS or Debian/Ubuntu. You will probably have the best luck using some version of these distros. While most packages will compile if using a 64 bit host, some may not. It's recommended to use a 32 bit host OS for your builds. Using a Virtual Machine is common practice. Once you have Linux setup you will need to install a Subversion client to access the AstLinux code.
In a RedHat-based distro, you can use yum to grab subversion for you:
yum install subversion
If yum exits with an error, you may need to get a Subversion RPM manually or add a yum repository that has Subversion.
On a Debian based system (Debian, Ubuntu) you can use apt-get:
apt-get install subversion
After you have installed Subversion, switch to your $HOME directory on your machine as a regular user (non-root):
cd ~
Create the “astlinux” directory for the AstLinux source:
mkdir astlinux
From this point on you should not be root. Being root while using the ADE is dangerous and unsupported.
Now we will grab AstLinux from SVN:
svn co https://astlinux.svn.sourceforge.net/svnroot/astlinux/branches/1.0 astlinux/1.0
(1.0 is the latest stable branch)
Explanation:
svn - name of subversion binary should not be root.
co - short for “checkout”, grab source from url:
https://... - URL of AstLinux SVN repository, an argument to co to specify the location of checkout
astlinux/1.0 - store the previous URL in a local directory on this machine in the “astlinux” directory
You should see a bunch of files scroll down your machine. Depending on the speed of your connection, this could take a few minutes or a few hours (hopefully just a few minutes - we want to start building)!
Once the checkout process has completed, cd into astlinux/1.0 to look around:
cd astlinux/1.0
The AstLinux Development Environment is based on the excellent Buildroot build system. The cross-compile toolchain is created with the excellent Crosstool-NG.
Next we will copy the default AstLinux config file and look for any new configure options.
Copy the default AstLinux config file (with Asterisk 1.8):
cp astlinux18.config .config
Check for new configure options:
make oldconfig
If you get “make: command not found” or a similar error you will need to install some development tools before you can continue. See Package lists for more information.
Next, create the cross-compile toolchain. Carefully follow these Crosstool-NG Instructions. Should you skip this step, ./scripts/build will generate an error with the same instructions.
If this is your first time building AstLinux we suggest that you don't make any changes to the default AstLinux configuration. This will make it easier to troubleshoot any problems you might have. Now it's time to start the build:
./scripts/build geni586
Note: this has changed from previous versions: ./scripts/build is a wrapper that checks for certain tools and sets up the environment prior to issuing make. If you run make manually, you will not generate a complete build.
The option “geni586” is the board type, other board types are: geni586-serial, net5501, alix, (many more). If this option is omitted, the previous board type built will be used. The “geni586” board uses a VGA/video console, while the “geni586-serial” board uses a 19200 baud serial console.
The ADE will take an hour or two to build, depending on the speed of your system and internet connection.
After building the complete system the first time, you can modify the package selections by issuing the following command prior to ./scripts/build.
make menuconfig
To start a fresh, clean build, remove the “output” directory and start a new build:
rm -rf output ./scripts/build
All board types use the same toolchain, so after ./scripts/build geni586 completes you can issue ./scripts/build geni586-serial (or any other board type) and it will take less than a minute to create the new build for that board type.
Of special note, there are two kernel configurations supported, common to all board types.
For non-SMP kernel builds: (boards with single core processors)
project/astlinux/geni586/linux.config
For SMP kernel builds: (boards with multi core processors)
project/astlinux/geni586/linux-smp.config
Use make menuconfig to specify which kernel configuration to use. Changing the kernel configuration requires a fresh, clean build.