LINUXUSER

The Rockbox firmware alternative for the iPod and other MP3 players ROCKING THE POD Rockbox firmware brings new features to the iPod and a few other MP3 players. We’ll show you how to install Rockbox on an iPod, and with a little tinkering, you'll have the ability to play files, customize the

user interface, and add plug-ins. BY MARTIN LOSCHWITZ

ver the past few years, Apple’s the standard firmware functions are pop- iPod lacks, for example, the ability to play iPod has taken the market by ular with users, however. Something Ogg Vorbis files, the ability to customize Ostorm, mutating from a simple particularly annoying is that the iPod to- the user interface, and the option of ex- MP3 player to a lifestyle object. Not all tally lacks some features, such as the tending the default software portfolio ability to play Ogg Vorbis-formatted files. with plugins. If you don’t mind a little tinkering, The current crop of plugins includes a you can talk your iPod into number of games, including one to help doing some things that you run Gameboy games on your iPod. Apple never intended it You’ll even find a program for displaying to do. text files and a JPEG viewer. To help you rock Amazingly, Rockbox also supports a your iPod, the number of other MP3 players, including Rockbox project models by Archos and iRiver. This article offers a firm- focuses on configuring Rockbox for the ware product Apple iPod. called Rock- box. Rock- Installing Rockbox box has The path to a Rockbox-powered iPod is several fea- not quite as stony as you might antici- tures that pate. The Rockbox program is made up of the two components: the firmware itself, which you need to store on your iPod as a simple file; and also a small program (the bootloader), which loads the firmware file when you switch on your iPod. Putting the bootloader on the iPod is the most difficult part of the in- stall, especially considering the fact that it deletes part of the original Apple firmware, which you will not easily be able to re- store on your iPod later. For this arti- cle, we used an iPod Video in our lab, that is, a fifth-generation iPod. However, the Rockbox project

James Thew, Fotolia homepage [1] has firmware image downloads for any iPod.

80 ISSUE 76 MARCH 2007 WWW.LINUX - MAGAZINE.COM Rockbox LINUXUSER

The installation basically follows the Listing 1: dmesg Output same steps, no matter which model of iPod you are using, although there might 01 usb 4-1: new high speed USB device using ehci_hcd and address 7 be a few minor differences in some cases 02 scsi4 : SCSI emulation for USB Mass Storage devices (read the chapter in the online manual, if necessary). 03 usb-storage: device found at 7 In this article, we will assume that you 04 usb-storage: waiting for device to settle before scanning are installing to the iPod from a Linux 05 Vendor: Apple Model: iPod Rev: 1.62 PC, and that the main partition of the portable player is formatted with the 06 Type: Direct-Access ANSI SCSI revision: 00 FAT32 filesystem. 07 SCSI device sdb: 58605120 512- hdwr sectors (30006 MB) Use the USB cable provided with your iPod to connect the your iPod to your PC. Then, check the output from dmesg the partition you just grabbed. The com- posed to run Rockbox as a new system, to ensure that Linux has detected the mand for doing this is: however, the bootloader will draw a iPod correctly and mounted its filesys- blank as you still need to upload the tem properly. Make a note of the device ./ipod_fw -o apple_os.bin -e 0 U firmware file. name the kernel uses for the iPod; it will bootpartition.bin Next, you'll need to download the be in the third line, which starts with daily update [4] and the Rockbox font SCSI device (see Listing 1). The apple_os.bin should now contain package. If you have not already done part one of the original iPod firmware. so, you should now mount the iPod on Extracting the Firmware Now run the next command: your filesystem, and also unpack the zip Download the source code for ipod_fw archive directly on the player. off the web [2]; this is a tiny, but useful ./ipod_fw -o U Now unmount the drive and remove tool for modifying the firmware. Build apple_sw_5g_rcsc.bin -e 1 U any cables that are still attached to the the program by calling gcc -o ipod_fw bootpartition.bin iPod. Switch the iPod off by holding ipod_fw.c. down the lower button for a couple of Now extract the partition table infor- This unpacks the second part of the seconds. When you switch the iPod back mation for your iPod by entering fdisk firmware and stores it in the image file. on, the Rockbox bootloader will then /dev/device name (Listing 2). Replace de- automatically launch your iPod’s new vice name with the name in your dmesg Installing the Boot Loader operating system. output. Extract the current iPod firm- The next step is to merge part one of the ware using the dd command: Apple firmware with a second file – the Getting Started Rockbox bootloader – and to upload the After the Rockbox splashscreen, you will dd if=/dev/partition name U new file to your iPod. To do this step, not see a list of tracks on your iPod as of=bootpartition.bin you'll need to download the Rockbox you would normally expect. Instead, bootloader [3] and store it in your cur- you’ll see the Rockbox Filebrowser (Fig- It makes sense to burn the bootpartition. rent directory. ure 1). This is the default Rockbox view, bin file onto a CD right after this step, Run the ./ipod_fw -g video -o rockboot. and it will appear until you run a com- and save the medium somewhere safe; bin -i apple_os.bin bootloader -video.bin mand to display something else on the this is your only way back if you would command to merge the two files. iPod’s screen. like to reinstall the Apple firmware on After completing this step, you'll need The Rockbox controls (that is, the way the iPod. to upload the new Rockbox-enhanced you navigate through the various folders It’s time to use the ipod_fw download bootloader directly to the iPod boot re- and options) follow Apple’s lead. The to extract an image of the firmware from cord: dd if=rockboot.bin of=/dev/device click-wheel will work as you would ex- name; of course, device name is the pect it to, the same way it was set up by Risks and Side Effects name mentioned previously from your Apple’s firmware. For example, dragging dmesg output. your finger over the right side of the sen- Before you start, be aware that the flash sor pad will move the selection bar process does involve some inherent Installing the Firmware down the selections. dangers. If the flash process is inter- When you reboot your iPod, the iPod In the same way, the selection bar will rupted before the firmware has been will automatically know that it is sup- move up if you press the left-hand side. fully loaded, you have just converted your iPod into a really expensive and stylish paperweight. This danger is in- Listing 2: iPod Partition Table herent to any device that supports firm- 01 Device Boot Start End Blocks Id System ware upgrades by flashing memory. Try 02 /dev/sdb1 1 10 80293+ 0 Empty to remove the risk of a power outage as much as possible. 03 /dev/sdb2 11 3648 29222235 b W95 FAT32

WWW.LINUX - MAGAZINE.COM ISSUE 76 MARCH 2007 81 LINUXUSER Rockbox

down the “Select” button, takes you to the sound settings, for example. When you get to the sound settings, you can set the volume and various other audio output parameters. Rockbox can change the iPod’s ap- pearance using themes; the distribution includes a couple of interesting ones. Launch themes directly on the Rockbox. The main menu has a Browse Themes Figure 1: The main Rockbox menu gives you Figure 2: When playing a track, the player item. Open this menu item to view a list quick access to the major functions. displays additional information on the artist. of all the available themes. Toggling be- tween the individual themes gives a real- To play an entry (for example, a track in cache database. Depending on the num- time view of how changing the theme the file view), just press either the bot- ber of tracks you have installed, this step changes your iPod’s look. tom button on the click-wheel, or simply can take a while. Move back to the root Interestingly, themes change more press the large center button. level in the menu tree (Figure 2), select than just the Rockbox’s looks. They give General Settings | File View, and then users the ability to control and modify Listening In navigate to Show Files. Set the value for displays, like the WPS. To design your Naturally, playing music will still be one this to ID3 Database. own WSP with elements of your choice, of the iPod’s most important tasks. Rock- Right now, there isn’t a computer Chapter 9.2.2 of the Rockbox Manual is box even offers you two different modes counterpart for Rockbox that does what recommended reading [4]. for finding and playing music files on iTunes does for the standard iPod. Such your player. You can either launch di- a standard would be redundant, of Plugins rectly from within the file browser, or course, since Rockbox will play every Rockbox has about 60 plugins, including you can change the Tag Cache Browser, track in memory, no matter from which games like Solitaire, Chess, Pong, or to a style that is reminiscent of iTunes or directory. This makes it easy to load Minesweeper (Figure 3). Besides these the original iPod firmware to sort tracks music onto your Rockbox iPod. Simply golden oldies, you will also find a num- by genre and other categories. connect the device to your computer, ber of useful tools (one of which lets you Moving to new firmware will not and wait for Linux to mount the mobile use your iPod as a stopwatch for chess), touch any of the MP3 files you had on sound machine on your filesystem; then along with complete applications like your iPod before the change. However, copy tracks to the main iPod folder. Rockboy, a Gameboy emulator. Rockbox does not support the iTunes If you selected the Auto Update as database format. described previously, all you need to do INFO To add existing tracks to your tag now is turn off your iPod and turn it [1] Rockbox website: cache, you'll need to launch a manual back on again. Rockbox will now update http:// www. rockbox. org search; to do so, press the MENU button your tag cache and the tracks you just [2] Tool for extracting the firmware: on the click-wheel and select the Tag loaded will be available for selection. http:// www. rockbox. org/ viewcvs. cgi/ Cache Menu entry. Now scroll down to While the iPod is playing a track, it will *checkout*/ tools/ ipod_fw. c Auto Update, and press the center button display the details (just like with the [3] Rockbox bootloader: to tell Rockbox to rebuild the database standard firmware). The developers refer http:// download. rockbox. org/ automatically whenever you switch on to this function as the Rockbox While bootloader/ / bootloader-video. bin your iPod. After you have completed this Playing Screen (WPS). [4] Sources for Rockbox firmware, fonts, step, scroll down to Initialize Now and The WPS gives you fast access to and documentation: press the center select button once more. Rockbox functions. The WPS context http:// www. rockbox. org/ daily. shtml This tells the system to create the tag menu, which you can access by holding

Figure 3: Rockbox brings popular games to the iPod, like Frozen Bubble (left) and Snake (center), which you may be familiar with from your mobile phone. There is even a complete chess game.

82 ISSUE 76 MARCH 2007 WWW.LINUX - MAGAZINE.COM Rockbox LINUXUSER

Whenever the Rockbox Filebrowser reinstate the default status. To do so, users from dredging the depths of the finds a file for which a plugin exists, all connect your iPod to your PC and delete filesystem for music is the tag cache you have to do is navigate to the file- the rockbox.ipod file, as well as the function. name and press the Select button. .rockbox folder from your iPod’s main This said, you can use iTunes with a Rockbox automatically launches the directory. Rockboxed iPod to add simple and con- matching plugin. For example, if you Next, check the dmesg output to dis- venient track management. Gtkpod pro- have uploaded a JPG image, just click on cover the device name that Linux has vides a free alternative that will also talk the image name and the plugin will pop assigned to your iPod. to Rockboxed . the image up on your iPod’s display. dd if=bootpartition.bin of=/dev/sdb1 Regarding the iPod 5G, there is at least restores the original firmware (however, one function that the Rockbox system Language, Please you may see a different partition name). definitely does not support – the device Although it doesn’t make much differ- Then power the iPod off and back on will not play videos after you install the ence what language the iPod firmware again; the apple in the display tells you alternative firmware. A plugin to add speaks, you can change the menu lan- that your iPod is using the original soft- this functionality to Rockbox is in the guage for Rockbox in General Settings | ware again. making; however, this plugin is currently Languages in the main menu. regarded as experimental. If you regu- If you want the iPod to speak, for ex- Conclusions larly view videos on your iPod, you will ample, German by default, just copy the Rockbox is an interesting option for the want to avoid making this move for the german.lng file from the /.rockbox/ iPod, and you can easily revert to the time being. ■ langs/ folder to the /.rockbox folder. original firmware if you don’t enjoy this Make sure you don’t have multiple files versatile alternative. Martin Loschwitz is a Debian GNU/ with the .lng suffix in this folder. Support for Vorbis files is also a nice Linux developer, and he spends his touch, as are the plugins. However, the leisure time working with Linux and Back to Apple fact that the Rockbox confronts users listening to classical music. He's Assuming you have the original with a simple file browser after the in- also a regular writer for Linux Maga- zine, and co-author of the Projects firmware for your iPod, you can easily stallation can’t be described as leading-

THEAUTHOR on the Move column. remove Rockbox from your iPod and edge technology. The only thing keeping

advertisement