Build system prerequisites

The prerequisites on the host for building tuxbox images can done on almost any Unix/Linux system with some 2 GB of free disk space. I personally use ubuntu/gentoo as they are my favourite linux distro. I have helped people on SuSE and ReadHat systems and know it builds fine on them too. I once had it running on cygwin but it takes ages to setup and is not for the faint harted.

The official tool requirement and versions at the time of this writing this document are in the following table:

The build process will automatically check some of these requirements. If you are missing one of the programs, of if your version is older than the above requirements your build could fail.

Once you have checked out your CVS you can use the following tool to check that your system prerequisite are up to standard

~/tuxbox/tuxbox-cvs/hostapps/toolchecker/toolchecker.sh

Creating images with Neutrino on JFFS2 or SquashFS.

There are many guides out there on how to create images. I have simply tried to simplify it so that it makes it a little easier for most people. I have looked at many guides and howto’s and decided it was about time someone summarised all their findings into one short but sweet document. So here goes:

Lets explain the some of the directories we have just created. Our main directory is “tuxbox” this is where all our files and subdirectories will go in. We will download the CVS source into the foleder called “tuxbox-cvs”. The image will get compiled into “dbox2”. The “archive” directory will keep a copy of all the downloaded files needed in the compile process, we will get onto this a little later. The “files” directory is where you can copy all your files you wish to copy onto the image, we can make it part of the build process. “logos” is where you place your logo files and we set this in the configure. “ucodes” is the directory to place your ucodes in and again later on this directory will be specified in the configure process. The “locals” directory is if we use customisation files to automate things in our build. We will get onto that a bit later in the document.

Now let’s download the source from CVS for the first time:

cvs -z3 -d anoncvs@cvs.tuxbox.org:/cvs/tuxbox co -P .

NOTE: This is for first time updates only!

If you wish to update your CVS please use the following command, not only is it quicker it also saves a lot of bandwidth its around 60MB each time you run a complete update. So save your bandwidth and save others too! Use the following to checkout updates:

cvs -z3 -d anoncvs@cvs.tuxbox.org:/cvs/tuxbox up -dP .

The make process downloads all the dependencies into a folder called Archive. If you ever run a clean CVS build you do not want to download the packages over again. To resolve this issue we symlink the “private/archive” we created in the first step to the “cdk/Archive” which is where make downloads the packages to.

ln -sf ~/tuxbox/private/archive ~/tuxbox/tuxbox-cvs/cdk/Archive

Now we have all the mucking about out the way let’s start the build process. Firstly we need to run the autogen to generate all the necessary build files.

cd ~/tuxbox/tuxbox-cvs/cdk/
./autogen.sh

If you wish to patch your source now is the time to do it. For example:

I use locals.sh files all the time as you can totally automate your build process. Please see the section on local.sh files for examples of some. If you wish to use them now is the time to copy local.sh over to the right location.

cp -r ~/tuxbox/private/locals/*local.sh ~/tuxbox/tuxbox-cvs/cdk/

Finally here it comes let’s build the image please use the relevant one dependent on your filesystem of choice.

Make JFFS2 filesystem

make flash-neutrino-jffs2-all

Make SquashFS filesystem

make flash-neutrino-squashfs-all

Sit back and relax. I use a dual Intel(R) Xeon(TM) CPU 3.20GHz and it takes me around 31 minutes to compile a image from scratch however if you are using VMware I have heard times from 90 minutes up to 210 minutes.

If you wish to rebuild your image you after you have updated your CVS please remember to clean your target. You can use the following clean target: