Experimental Kernel

From wikiPodLinux

Table of contents


This page describes how to build an improved version of the iPodLinux kernel (see Kernel Building for the original, official version).

Features in 2.4.32-ipod2:

  • CVS DATE: 5/16/2006
  • Can be built with the 3.4.3 version of the toolchain
  • Uses the latest 2.4 kernel version (2.4.32 instead of 2.4.24)
  • Has been successfully built on Mac OS X systems (both PowerPC and Intel based)
  • Adds kernel support for the arguments passing from Loader 2 (allows you to read the args from /proc/cmdline, no need for the getLoader2Args tool any more; and you can pass args to the kernel now as well, if you know what that's about (does someone have a link to docs on this? Yes, see Documentation/kernel-parameters.txt in the kernel source tree.))
  • Reduced task switching latency for better interactivity while playing music (may cause an overall slowdown of processes, though)
  • Input Device: /dev/misc/wheel new in cvs
  • Completly quiet boot, quicker boot; needs cmdline option 'quiet'.


NOTE: As of 2.4.32-ipod2, if you are using the precompiled experimental kernel binary, you need to pass the root=/dev/hda3 to the cmdline like this:

iPodLinux @ (hd0,2)/boot/vmlinux root=/dev/hda3

If you want to speed up the time it takes to enter podzilla and don't care about seeing the kernel load, add quiet to the cmdline like this:

iPodLinux @ (hd0,2)/boot/vmlinux root=/dev/hda3 quiet


iPodLinux Kernel Builds Description
vmlinux2432.gz Default linux kernel 2.4.32-ipod2 built with lowlatency enabled.
Kernel Source Description
linux-2.4.32.tar.bz2 (http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.32.tar.bz2) Linux kernel source, version 2.4.32 (Note: Avoid the .gz version - the uClinux patch might fail with it)
Patches Description
uClinux-2.4.32-uc0.diff.gz (http://www.uclinux.org/pub/uClinux/uClinux-2.4.x/uClinux-2.4.32-uc0.diff.gz) or download from faster mirror (http://ipod.tempel.org/files/uClinux-2.4.32-uc0.diff.gz) Kernel extensions for uClinux 2.4.32
iPL_2.4.32-ipod2_KERNELRELEASE_exceeding_64_characters_fix.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_KERNELRELEASE_exceeding_64_characters_fix.patch) Makefile fix for Mac OS X users
iPL_2.4.32-ipod2_arm-uclinux-elf.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_arm-uclinux-elf.patch) Build the kernel with gcc 3.4.3 (arm-uclinux-elf) instead gcc 2.9.x
iPL_2.4.32-ipod2_armksyms.c_cleanup.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_armksyms.c_cleanup.patch) Fix two #define declaration errors gcc 3.4.3 might trip over
iPL_2.4.32-ipod2_fbmem_cleanup.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_fbmem_cleanup.patch) Make gcc 3.4.3 happier with drivers/video/fbmem.c
iPL_2.4.32-ipod2_version_change.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_version_change.patch) Change kernel version to 2.4.32-ipod2
iPL_2.4.32-ipod2_hold_button_fix.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_hold_button_fix.patch) Fix issues with the hold button
iPL_2.4.32-ipod2_update_defconfig.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_update_defconfig.patch) Update the default kernel config
iPL_2.4.32-ipod2_loader2_cmdline_support.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_loader2_cmdline_support.patch) /proc/cmdline support for ipodloader2
iPL_2.4.32-ipod2_low-latency.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_low-latency.patch) An attempt to reduce cpu scheduling latency
iPL_2.4.32-ipod2_readlatency2.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_readlatency2.patch) An attepmpt to reduce disk read latency
iPL_2.4.32-ipod2_readlatency2_tuning.patch (http://www.so2.sys-techs.com/ipod/linux/iPL_2.4.32-ipod2_readlatency2_tuning.patch) Tune the readlatency patch


Note for Mac OS X users: The following steps are made for a system with a case sensitive file system. While Linux has that by default, OS X systems using HFS do use a case-insensitive file system instead. Hence, before you follow these steps, you need to create a volume with a case-sensitive file system, or you will get errors once you use the patch commands below. Do this: Using Disk Utility, create a New Image (give it at least 320 MB). Once it has been created, use Disk Utility to Erase it again, choosing a Case sensitive Volume Format. Once this has been done, copy the downloaded files onto this new volume and perform the following steps on this volume.

Get the iPodLinux 2.4.24 kernel code from the cvs:

% cvs -d:pserver:anonymous@ipodlinux.cvs.sourceforge.net:/cvsroot/ipodlinux login
% cvs -z3 -d:pserver:anonymous@ipodlinux.cvs.sourceforge.net:/cvsroot/ipodlinux co -P linux

Decompress the kernel:

% tar xvjf linux-2.4.32.tar.bz2

Rename the kernel:

% mv linux-2.4.32 linux-2.4.32-ipod2

Switch to kernel directory:

% cd linux-2.4.32-ipod2

Update kernel from 2.4.32 to 2.4.32-uc0:

% gzcat ../uClinux-2.4.32-uc0.diff.gz | patch -p1

(note that with cygwin or some systems use zcat as the alternative command if gzcat does not work) ex. % zcat ../uClinux-2.4.32-uc0.diff.gz | patch -p1

Add support for the iPod:

% cp -r ../linux/* ./

Apply patches needed for 2.4.32-ipod2:

Mac users note: If you've downloaded the files with Safari, they might have gotten an extra .txt extension. Append that to the file names below if necessary.
% patch -p1 -s < ../iPL_2.4.32-ipod2_version_change.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_arm-uclinux-elf.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_armksyms.c_cleanup.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_KERNELRELEASE_exceeding_64_characters_fix.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_fbmem_cleanup.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_hold_button_fix.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_update_defconfig.patch

Apply optional patches:

% patch -p1 -s < ../iPL_2.4.32-ipod2_loader2_cmdline_support.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_low-latency.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_readlatency2.patch
% patch -p1 -s < ../iPL_2.4.32-ipod2_readlatency2_tuning.patch

Make the default iPodLinux config the working config:

% cp arch/armnommu/def-configs/ipod .config


Do (A or B) and C

A) Update old config, say Yes to the low-latency option if you applied that patch, for everything else say No:

% make oldconfig

B) Configure your own kernel

% make menuconfig

C) Start building:

% make dep && make boot

When built, find the kernel under the name Image inside arch/armnommu/boot/. Rename it to kernel.bin and put it on your iPod (assuming you're using Loader 2 instead of the old method where you have to patch the kernel into the firmware partition)


A 3G iPod running kernel 2.4.32. The "01" in the upper left corner was left by the Screen Capture Module.

Personal tools