Building Podzilla

From wikiPodLinux

This page tells you how to build podzilla 2 for both the iPod and the desktop.

Table of contents

Getting Started

This tutorial assumes basic knowledge of using the command line and compiling software. Google for a basic Linux skills tutorial if this page seems confusing.

For your Computer

  • Install Subversion if you haven't already.
  • Check out the Podzilla source code.
  • Install the ARM cross-compiler Toolchain. You need the 3.4.3 toolchain.
  • Install the SDL (http://libsdl.org/) and SDL_image (http://www.libsdl.org/projects/SDL_image/) libraries. If you have one, you can also use a package manager to install these.
    • If you're on OS X, we recommend the MacPorts packages: 'libsdl', 'libsdl_image'
  • Install the flex binary package.

For your iPod

You should have a kernel and userland installed and working. You need minix-sh at the very least; the userland (http://so2.sys-techs.com/ipod/ipod_fs_240206.tar.gz) includes this. If you want to use pods, you will need to update your busybox and kernel (this involves more setup now, but it makes module installation just drag-and-drop).

Source Code

This is the short-short version of this information, just enough to get you through this. We highly recommend that you read through the Source_Code page here on the wiki for a more complete understanding of the system. It also goes into details about how to submit your source patches back to the us.

You will need to check out the source from the SVN repository. Make a directory where you will be putting all of the wonderful iPodLinux source code, and cd into it.

% mkdir ~/src
% cd ~/src
% mkdir ipl
% cd ipl

Now, check out hotdog, ttk and podzilla2

% svn co https://ipodlinux.svn.sourceforge.net/svnroot/ipodlinux/libs/hotdog 
% svn co https://ipodlinux.svn.sourceforge.net/svnroot/ipodlinux/libs/ttk 
% svn co https://ipodlinux.svn.sourceforge.net/svnroot/ipodlinux/apps/ipod/podzilla2 

In the future, you can update any of these using svn to the latest versions in our source repository like so:

% cd ~/src/ipl/hotdog
% svn update
% cd ../ttk
% svn update
% cd ../podzilla2
% svn update

If you do this, remember that podzilla2 is dependent on ttk, which is dependent on hotdog. This relationship must be taken into account when you rebuild the binaries. (Build hotdog, then ttk, then podzilla2.)

Building TTK

TTK will, by default, build for all four targets: ipod-sdl, ipod-mwin, x11-sdl, x11-mwin. You can disable the iPod targets with NOIPOD=1, disable the desktop targets with NOX11=1, or disable the Nano-X targets with NOMWIN=1 passed on the make command line.

If you do build for the desktop on OS X, you need to use the 3.x version of GCC, rather than the (probable) default of 4.0. Check which version is active by typing:

% sudo gcc_select

If it responds with 4.0 or newer as the version, you'll need to select 3.3 using a command similar to the following:

% sudo gcc_select 3.3

If 3.3 isn't available, use the --list option to gcc_select to determine which 3.x versions are available.

Okay, now we can continue with building ttk....

% cd ttk

For this step, make sure that you add the NOHDOG=1 flag if you have not downloaded hotdog.

% make <any flags go here>

Or if you want to not include the hotdog graphics library; (This might save you from headaches)

% make  NOHDOG=1

If you want, you can install it

# make install

but this is not required — podzilla will probably find it in ../ttk if it's there.


Building Podzilla 2

At this point you must choose whether you want an iPod or a desktop build. TTK builds both at once, but Podzilla can only do one at a time. If you want a desktop build,

% make

If not,

% make IPOD=1

Wait for it to complete.

Depending on your build environment, you may need to explicitly tell make where your TTK directory is. (Some OS X systems seem to have this issue)

% make TTKDIR=../ttk

and of course for iPod:

% make TTKDIR=../ttk IPOD=1

Troubleshooting

Mac OS X builds: If you get odd linker errors when building for the desktop, you may have a conflict between QuickTime and the SDL libraries that Podzilla uses. Use this downgrader (https://www.apple.com/support/downloads/quicktime701reinstallerforquicktime704.html) to fix the issue.

libstdcxx issues: If you have problems building this module, you can always disable it by running make config and select 'n' (no) for that module.

Running Podzilla on the desktop

After compiling, ensure that ttk is in pz2 dir/../ttk, then run

% make dev-env
% ./podzilla

Everything should work right. The keys to navigate podzilla are here

With nothing specified on the command line, it will simulate the display of a 1g-4g grayscale iPod. For other iPods, use the -g option:

To simulate a 5th gen "video" iPod;

% ./podzilla -g video

To simulate a 4th gen color "photo" iPod;

% ./podzilla -g photo

To simulate a color Nano;

% ./podzilla -g nano

The full list can be retrieved by using the --help comand line option.

To simulate an arbitrarilly sized grayscale or color iPod, use the -2 or -16 option like so:

% ./podzilla -16 800 600

The two parameters are width and height. The above example will open a color 800x600 podzilla window.


Copying it to the iPod

These steps assume your iPod is mounted at /mnt/ipod; adjust if not.

If you've never installed podzilla 2 before, you need to copy over the schemes and fonts.

% mkdir -p /mnt/ipod/usr/share/{schemes,fonts}
% cp ../ttk/fonts/* /mnt/ipod/usr/share/fonts/
% cp ../ttk/schemes/* /mnt/ipod/usr/share/schemes/

Finally, install podzilla and the modules.

% make install DESTDIR=/mnt/ipod IPOD=1

WARNING: This last step may fail if you have unusual characters (quote-marks) in your iPod name. You may need to rename your iPod to get round this, since the install script currently doesn't handle those characters safely (it produces an error like "unexpected EOF while looking for matching ` ").

Reboot your iPod and enjoy!

Further reading

See modifying podzilla to learn how to write new modules for podzilla 2

Views
Personal tools