Wiki > Main > IpodHardwareInfo (compare)
Difference: IpodHardwareInfo (r15 vs. r14)
The following table shows the current status of the various drivers required to be implemented before Rockbox is fully functional on the ipod.
The iPods are based around the PortalPlayer system-on-a-chip. Despite the fact that no official documentation is available publically for these devices, the iPodLinux project has made extensive progress in writing open source Linux drivers for most of the hardware in the various different versions of the iPod. The source code released by this project is the main source of information about iPod hardware.
To date, Apple has released the following range of iPods. For more details on the differences between models, see the Generations page at the iPodLinux Wiki.
Note that the hardware revision can be read at run-time from memory location 0x2084 (32-bit integer). "Type X" in the above table is used to indicate where code branches exists in the iPodLinux source.
The iPod video (5G/5.5G) was the last PortalPlayer-based iPod. Starting with the iPod nano 2nd generation, Apple has switched over to using SoC's designed by Samsung. These newer designs contain much more powerful CPUs and hardware.
In order to eliminate wasted code and data in Rockbox builds for the iPod, it is necessary (as a minimum) to split targets by LCD type. It can be seen from the above table that splitting by LCD type will also eliminate the need for run-time detection of most other differences between the different iPods. This approach will give the following targets:
Apple has not made it difficult for users to run their own code on the iPods. The Apple firmware is in two parts - a bootloader (along with a USB/Firewire "disk mode" and a "diagnostics mode") are stored in flash, and the main firmware is stored in a small (typically 40MB) boot partition on the hard drive.
The flash bootloader simply loads the firmware from the boot partition into RAM (at the address specified in the firmware header in the boot partition) and jumps to the entry point (also specified in the header). The only security measure is a checksum stored in the header, and this is documented in the iPodLinux utility make_fw.c. Using make_fw.c it is possible to replace the Apple firmware with another application, which will then be loaded and executed by the iPod's own bootloader.
Fortunately, this is not a risky operation - the iPods have a hardware reset which is invoked by a combination of key presses (on the 4G models, this involves holding down MENU and ACTION for 4 seconds). A user can then enter the flash disk mode by immediately pressing another key combination (ACTION and PLAY) and restore the original Apple software. So when our replacement firmware crashes, we can simply reboot, enter disk mode and try again.
The bootloader approach adopted by iPodLinux is to replace the Apple firmware in the boot partition with a new firmware image containing a small bootloader, a copy of the original Apple firmware, and a copy of the Linux kernel. The flash bootloader loads this large image into RAM, and executes the iPodLinux bootloader code. This secondary bootloader relocates itself out of the main RAM to the 96KB of IRAM and then (depending on a the presence of a keypress) copies either the Apple firmware or Linux kernel to its final destination address and jumps to its entry point.
The iPodLinux approach has one major drawback - a user needs to run the make_fw utility and then write the resultant image file directly to a raw disk partition in order to update to new kernel versions.
The approach proposed for Rockbox will follow the model of the iriver bootloader, with the Rockbox firmware itself being loaded from a file stored on the iPod's FAT32 partition. The bootloader itself is a stripped-down version of Rockbox and will contain LCD, button, ATA and FAT32 drivers.
The Apple iPod firmware does not include a directory browser - music is only accessed via the "iTunes Database" stored on the hard disk.
All music and data are stored in the iPod_Control directory on a standard FAT32 (or HFS for Mac-formatted iPods) partition. On a desktop computer, the iTunes database is an XML file. The version on the iPod is binary. The binary iPod version is documented by the iPodLinux project at http://ipodlinux.org/ITunesDB.
Audio files are stored in the /iPod_Control/Music directory as files of the form F01/NHQA.m4a. Files from the same album are not stored in the same directory. Therefore, Rockbox's normal file browser will not be helpful in browsing these files.
The .m4a metadata is retained in the audio files copied to the iPod.
r15 - 11 Oct 2010 - 19:47:26 - MarcinBukatRevision r15 - 11 Oct 2010 - 19:47 - MarcinBukat
Revision r14 - 28 Jul 2009 - 16:50 - RobertMenes
Copyright © by the contributing authors.