Table of Contents

Development Environment

Prerequisites

To build Astlinux you first need to install some packages:

Package lists

Background

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. Additonally, Subversion excels in working with branches and tags. Often new features can be developed in a separate branch and later merged into the main codebase - known in Subversion-speak as “trunk”.

These instructions will show you how to build AstLinux from “trunk” or from a specific 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 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. 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 a directory on your machine (home is good) as a regular user (non-root):

cd ~

From this point on you should not be root. Being root while using the ADE is dangerous and unsupported. After all, the AstLinux Development Environment runs a lot of scripts and has potential to do serious damage to your system (it probably won't, but it is possible).

Checking out the Source

Now we will grab AstLinux from SVN:

 svn co https://astlinux.svn.sourceforge.net/svnroot/astlinux/trunk astlinux-trunk

or

 svn co https://astlinux.svn.sourceforge.net/svnroot/astlinux/branches/0.7 astlinux-0.7

(0.7 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-trunk (or astlinux-0.7) - store the previous URL in a local directory on this machine in the current working 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, you can cd into astlinux-trunk to look around:

cd astlinux-trunk (or astlinux-0.7)

First Build

You will see a bunch of files scattered about. We won't pay any attention to most of them – for now.

The AstLinux Development Environment is based on the excellent buildroot2 build system. It uses Kconfig to provide various preconfigured options to the user in an ncurses-based menu environment (provided by Kconfig). Next we will copy the default AstLinux config file and look for any new configure options. Whenever software packages are changed or added the default config needs to be updated. Sometimes the developers don't do that.

Copy the default config file:

cp astlinux.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. On Debian based systems this is quite easy. The “build-essential” package provides most of what you need. On RedHat based systems you can start by installing make with yum. The AstLinux Development Environment includes a script that will check for the various packages required for building. It will help you as it goes along.

If this is your first time compiling 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:

toolchain/build 

Note: this has changed from previous versions: toolchain/build is a wrapper that checks for certain tools and sets up logging prior to issuing make. If you run make manually, problems can occur which are avoided by using toolchain/build.

The ADE can take anywhere from 10s of minutes to several hours (or even days) to compile, 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 make.

make menuconfig 

The default options will build the runnix image files. You can create an iso image by adding that selection in the Target Options menu. The ISO image will be called astlinux.iso. The runnix files will be placed in <astlinux-root>/astlinux-<version>-<svn#> where <version> is either trunk or 0.7 and <svn#> is the current SVN revision that you have checked out.

Creating An Image

Creating an Image

Creating an ISO

Creating an ISO

Tips and Tricks

Tips and Tricks