Like every other website on the planet, SmallNetBuilder uses cookies. Our cookies track login status, but we only allow admins to log in anyway, so those don't apply to you. Any other cookies you pick up during your visit come from advertisers, which we don't control.
If you continue to use the site, you agree to tolerate our use of cookies. Thank you!

Wi-Fi Router Charts

Click for Wi-Fi Router Charts

Mesh System Charts

Click for Wi-Fi Mesh System Charts

Gathering the sources

I'm assuming that you've followed my previous article and have installed the tool-chain we'll be using to build our server. I'll also be writing this assuming bash syntax. If you use a different shell, you'll have to adjust. As in my last article, I'll be doing the build from a Mandrake machine. But this time I'll be NFS mounting my NSLU2 disk so that my build will automatically end up where I need to run it.

The first step in this process is to create a work area for the packages that we're going to build. I created a directory called iTunes under my home directory on the NSLU2. Next we'll need to get all of the various source packages required. We'll naturally start with the mt-daapd source from here.

A glance at the documentation shows that we'll need libid3tag, the library used for ID3 tag reading and gdbm, the GUN database manager. A quick test I did showed that we will also need the zlib compression library. I fetched libid3tag from here, gdbm from here and zlib from here. I placed all of the required packages in my iTunes directory. After un-tarring them, you'll end up with a gdbm-1.8.3 directory, a libid3tag-0.15.1b directory, a mt-daapd-0.2.0 directory and a zlib-1.2.1 directory.

Before we start the build, we'll set up some common environment variables that will be used during the cross-compile . All of the packages in this build are configured using the same mechanism, the GNU Autoconf package. This package can look at specific environment variables in order to tell it where to find the compiler, linker, include files, etc.

I created a file with the following definitions :

export BASE=/mnt/nslu2/data/jim/iTunes/
export LINUX=$HOME/snapgear/linux-2.4.x/include/
export TOOLSBASE=$HOME/gpl_code_2.03/usr/
local/openrg/armsaeb/bin/armv4b-hardhat-linux export CC=$TOOLSBASE-gcc export STRIP=$TOOLSBASE-strip export RANLIB=$TOOLSBASE-ranlib export LDFLAGS=-L$BASE/lib export CFLAGS="-I$BASE/include/ -I$LINUX"

(Note that in the file the line starting with "export TOOLSBASE" and the next indented line are entered as one line with no space between them.)

BASE is defined to be the top level of my working area while LINUX points to the snapgear Linux source tree. TOOLSBASE is where my cross-compilation tools live and CC, STRIP and RANLIB end up being the full path name of their executables. LDFLAGS and CFLAGS will be used during our builds and just point into our build area and the Linux source tree. Create your version of the above file using your specific paths. Then "dot" the file, i.e. . so that the variables get into your environment. Now we're ready to do our first build.

Support Us!

If you like what we do and want to thank us, just buy something on Amazon. We'll get a small commission on anything you buy. Thanks!

Don't Miss These

  • 1
  • 2