Skip to content
Caleb Connolly edited this page Dec 18, 2021 · 6 revisions

Welcome to the iPod classic kernel wiki!

This wiki documents porting mainline Linux to the iPod classic (that is, the 6th generation iPod, or the "1st gen classic"), the first one with the metal housing.

NONE of this work would be possible without the amazing rockbox developers, particularly Michael Sparmann and Cástor Muñoz who did a lot of reverse engineering and porting for the device. None of the documentation for this device or the SoC is publicly available, making the rockbox sources the only documentation.

Status

This might be out of date.

Right now the iPod boots and dumps kernel logs via the UART port on the 30-pin connector. The timer driver doesn't seem to work properly yet so the kernel gets stuck shortly after initialising the timer whilst waiting for the first tick.

In order to test / work on this project you will need a UART adapter like shown:

See Building a UART adapter

Building

Some experience with embedded development goes a long way, but these instructions should be accessible as long as you can deal with cross compiling etc.

Before installing Linux, we have to build and install Rockbox, follow the guide here: https://www.rockbox.org/wiki/HowToCompile and build for the ipod6g. Make sure to use the fork of Rockbox from this repo which adds support for booting Linux to the bootloader: https://github.com/ipodclassic-mainline/rockbox

in rockbox source:

# Build and install GCC 4.x for rockbox (newer GCC doesn't work, sorry)
$ sudo ./tools/rockboxdev.sh # I also needed --makeflags="CXXFLAGS=-std=c++11" as GCC 4.x violates c++17
a

Go make a cup of tea while GCC installs to /usr/local/bin

Build Rockbox

mkdir build
$ cd build
$ ../tools/configure
29
N

$ make

If you get an error about "lang.h not found", make sure you don't have any important changes and run git clean -fxd and build Rockbox again.

Once done, run ../tools/configure again and choose B to build the bootloader this time, run make again.

Build mks5lboot

cd rbutil/mks5lboot
make

Flash the bootloader

With Rockbox, the bootloader, and the flashing tool built, reboot your iPod into DFU mode by holding the center button and menu together for ~15 seconds, it helps to run dmesg -w on your host so you can see when the device appears.

cd rbutil/mks5lboot
./mks5lboot --bl-inst ../../build/bootloader-ipod6g.ipod # you may need sudo
Clone this wiki locally