Building Podzilla (legacy)
From wikiPodLinux
| Table of contents |
Installing a toolchain
To build binaries for the iPod you will need a special version of the compiler and tool chain known as a cross compiler. This special build of the compiler is used to generate binaries on your PC or mac that a executable on another platform, in this case the iPod. Since the iPod is an ARM based platform we need an ARM cross compiler. Fortunately there are pre-built versions of the cross compiler available for Linux, OS X and Windows. You can find them on the Toolchain page (you will need the 2.95 version).
Libraries
- ipp: http://ipodlinux.sourceforge.net/download/ippsa11_lnx.tar.gz
- mp4ff: http://ipodlinux.sourceforge.net/download/mp4ff.tar.gz
- helix-aacdec: http://ipodlinux.sourceforge.net/download/helix-aacdec.tar.gz
- libjpeg: ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
- microwindows: ftp://microwindows.censoft.com/pub/microwindows/microwindows-0.90.tar.gz
- libitunesdb: http://libitunesdb.sourceforge.net/
You will need to compile these libraries to build podzilla. If you are having troubles compiling them, an archive containing pre-compiled libraries (including the optional libmpdclient and mikmod libraries) and the latest CVS source files can be found . To compile with MPD, use "make IPOD=1 MPDC=1". To compile with mikmod, read the instructions in the "mikmod" folder. If you just want to test builds,
is a pre-compiled binary that uses MPD and
is one that uses the iTunes database.
Note that you may also find the podzilla source code on SVN but both SVN and CVS code has not been updated for almost two years. Also note that libitunesdb no longer works with recent firmware updates and libmpdclient only works with older MPD binaries (which need to be installed manually).
Automatic Build on Linux
If you want to build podzilla on Linux, you can get this small shell script, edit the paths in it and execute it to automatically build podzilla for the iPod from CVS. You will need the toolchain installed and all of the files from above downloaded in some directory. See the script source for instructions.
Automatic build script for Linux: Here (http://ipodlinux.org/images/5/52/Podzilla-builder.tgz)
JPEG Library
1. Extract the JPEG library to your working directory.
% cd ~/ipodlinux % mkdir libjpeg % cd libjpeg/ % tar zxf jpegsrc.v6b.tar.gz % mv jpeg-6b ipod % cd ipod/
2. Configure the library for the iPod.
% ./configure CC=arm-elf-gcc LDFLAGS=-elf2flt --host=arm-elf
2a. If the ./configure step fails on your platform you will need to configure manually by using the following copy commands and editing the Makefile as desribed below.
% cp jconfig.doc jconfig.h % cp makefile.ansi Makefile
2b. Now, open up Makefile, in an editor (do not use Notepad), and make these changes:
Search for "CC= cc" and change to "CC= arm-elf-gcc".
Search for"LDFLAGS= " and change to "LDFLAGS= -Wl, -elf2flt".
2c. Mac OSX and Windows/Cygwin only: Comment out the following section of Makefile by adding a "#" to the beginning of each of these four lines:
jconfig.h: jconfig.doc
echo You must prepare a system-dependent jconfig.h file.
echo Please read the installation directions in install.doc.
exit 1
3. Build the package.
% make % arm-elf-ranlib libjpeg.a
Microwindows
1. Extract the microwindows archive to your working directory.
% cd ~/ipodlinux % mkdir microwindows % cd microwindows/ % tar zxf microwindows-0.90.tar.gz % mv microwindows-0.90 ipod
2. Login to the CVS server (just press enter if when prompted for a password).
% cvs -d:pserver:anonymous@ipodlinux.cvs.sourceforge.net:/cvsroot/ipodlinux login
3. Check out the microwindows changes from CVS.
% cvs -z3 -d:pserver:anonymous@ipodlinux.cvs.sourceforge.net:/cvsroot/ipodlinux co tools/microwindows
4. Copy the changes from the CVS tree and overwrite the versions from the tar archive.
% cp -r tools/microwindows/* ~/ipodlinux/microwindows/ipod
5. Set up the iPod microwindows config. Note if you are building the X11 version use config.ipod_x11.
% cd ipod/src/ % cp Configs/config.ipod config
6. Open the config file in an editor, search for "HAVE_JPEG_SUPPORT" and modify the file to look as the following.
HAVE_JPEG_SUPPORT = Y INCJPEG = /home/YourUserName/ipodlinux/libjpeg/ipod LIBJPEG = /home/YourUserName/ipodlinux/libjpeg/ipod/libjpeg.a
Of course, if you're on OS X, you'll need to change that "/home/YourUserName/" to "/Users/YourUserName/".
7. Now build the package.
% make
Do not worry if you see the following:
Generating keynorm.c from bitmap file ... Error: bits per pixel must be 1, 4, 8 or 24 Conversion failed: keynorm.bmp make[2]: *** [keynorm.c] Error 1 make[1]: *** [subdir-nxkbd] Error 2
iTunes Library
Windows/Cygwin only: There is currently no guaranteed way to compile libitunesdb under Cygwin. (though it does seem to compile under an up-to-date installation of Cygwin) If you cannot build this, use this pre-compiled iPod binary instead. http://ipodlinux.sourceforge.net/download/beta/libitunesdb.a Put it in the ~/ipodlinux/libitunesdb/ipod/src/.libs directory.
Under Linux and OSX, you can compile it:
1. Extract the libitunes archive to your working directory.
% cd ~/ipodlinux % mkdir libitunesdb % cd libitunesdb % tar zvxf libitunesdb_0.5.2.tar.gz % mv libitunesdb_0.5.2 ipod
2. Type these to build the library:
% cd ipod % ./configure CFLAGS=-Wl,-elf2flt --host=arm-elf % make
When it's done, you should have a libitunesdb.a file in the ~/ipodlinux/libitunesdb/ipod/src/.libs directory. Make sure it exists, but just leave it there.
IPP Library
Podzilla uses the IPP library for fast MP3 decoding. This archive needs to be installed so the podzilla build can find it:
% cd ~/ipodlinux % tar zxf ~/ipodlinux/ippsa11_lnx.tar.gz % mv ipp/ippsa11/* ipp/ % rmdir ipp/ippsa11
MP4 File Format Library
Podzilla needs the MP4FF library from FAADv2 to understand M4A/M4B files.
% cd ~/ipodlinux % tar zxf ~/ipodlinux/mp4ff.tar.gz % cd mp4ff % ./make-build-dirs.sh % cd ipod % make IPOD=1
The make-build-dirs.sh script requires lndir, which usually comes as part of X11. If you don't have it, do the following instead of the ./make-build-dirs.sh line. This goes for the AAC decoder library too:
% mv src ipod % cp -dpR ipod ipod-x11
Helix AAC Decoder Library
Podzilla uses the Helix Datatype AAC decoder to decode the AAC streams in M4A/M4B files.
% cd ~/ipodlinux % tar zxf ~/ipodlinux/helix-aacdec.tar.gz % cd helix-aacdec % ./make-build-dirs.sh % cd ipod % make IPOD=1
Podzilla
1. Login to the CVS server (just press enter if when prompted for a password).
% cd ~/ipodlinux % cvs -d:pserver:anonymous@ipodlinux.cvs.sourceforge.net:/cvsroot/ipodlinux login
2. Download the current podzilla sources from CVS.
% cvs -d:pserver:anonymous@ipodlinux.cvs.sourceforge.net:/cvsroot/ipodlinux co -d podzilla tools/podzilla
3. Enter the directory containing the podzilla source code.
% cd ~/ipodlinux/podzilla
4. To build the binary for the iPod simply use:
% make IPOD=1
You can also build a version that runs under X11. To do this you will need a native version of microwindows, libitunes and libjpeg. You can redo the above steps using your native compiler (and separate directories) so that you can build either at any time.
Note on non-linux platforms the podzilla binary will actually be called podzilla.elf.bflt - you should rename it to podzilla when you copy it to the iPod.
5. if make fails with an error message like this (Cygwin only):
itunes_db.c:22: itunesdb.h: No such file or directory make: *** [itunes_db.o] Error 1
5a. Extract the iTunes library tar-zipped file (libitunesdb_0.5.2.tar.gz). itunes_db.h can be found in the libitunesdb_0.5.2/src/ directory.
5b. Edit Makefile in the ~/ipodlinux/podzilla/ directory to add a path like this:
-I/YOURHOME/ipodlinux/DOWNLOADDIR/libitunesdb_0.5.2/src

