The AstLinux Development Environment (ADE) is maintained in a repository on SourceForge using subversion (SVN).
AstLinux is cross-compiled, generating target images for both i586 and x86_64 CPU architectures, using a custom maintained version of Buildroot.
Linux Build System
Building AstLinux requires using some version of Debian/Ubuntu or RHEL/CentOS Linux. It is recommended using a version of these distros in a Virtual Machine (VM). Either a 32-bit or 64-bit build system will work, though in this day and age a 64-bit build system is suggested.
Using a Virtual Machine is common practice, typical recommended configuration:
- 40 GB Storage
- 1 GB RAM
- 1-2 CPU Cores
Linux Build Systems known to work:
- CentOS 6 - 32-bit / 64-bit
- CentOS 7 - 64-bit - (used for official releases)
- Debian 7 - 32-bit
- Debian 8 - 64-bit
- Ubuntu 14.04 - 64-bit
- Ubuntu 16.04 - 64-bit
Tip → Use a somewhat older LTS (Long Term Support) Linux distro in a VM, that will be the most compatible with our version of Buildroot.
Tip → Use a “Minimal Install” of your Linux distro, dedicated to building AstLinux.
To build Astlinux you first need to install some packages, depending on your Linux distribution:
These instructions will show you how to build AstLinux from the 1.0 branch.
After you have installed the prerequisite packages (per above), switch to your $HOME directory on your machine as a regular user (non-root):
Create the “astlinux” directory for the AstLinux source:
Important → You should not be root, login as a non-admin user.
Checking out the Source
Now we will grab AstLinux from SVN (Read-Only):
svn co svn://svn.code.sf.net/p/astlinux/code/branches/1.0 astlinux/1.0
(1.0 is the latest stable branch)
svn - name of subversion binary should not be root.
co - short for “checkout”, grab source from url:
svn:… - 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:
Next we will copy the default AstLinux config file and look for any new configure options.
Copy the default AstLinux config file (with Asterisk 11):
cp astlinux-ast11.config .config
Note → If you wish to build 64-bit x86_64 images, copy your
.config file from the
Check for new configure options:
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:
Note → If you wish to build 64-bit x86_64 images, use genx86_64 or genx86_64-serial board type.
./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.
Info → List of board types
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
To start a fresh, clean build, remove the “output” directory and start a new build:
rm -rf output ./scripts/build
Many board types use the same i586 toolchain, so after
./scripts/build geni586 completes you can issue
./scripts/build geni586-serial (or any other i586 board type) and it will take less than a minute to create the new build for that board type. This is also true for board types use the same x86_64 toolchain.
Of special note, there are three kernel configurations supported.
For 32-bit non-SMP kernel builds: (boards with i586 single-core processors)
For 32-bit SMP kernel builds: (boards with i586 multi-core processors)
For 64-bit SMP kernel builds: (boards with x86_64 multi-core processors)
make menuconfig to specify which kernel configuration to use. Changing the kernel configuration requires a fresh, clean build.