Changing Bootloader Pictures

From wikiPodLinux

This page is about changing the pictures the original bootloader (i.e. not Loader 2) can show at startup.

Table of contents

Disclaimer

Please note that the devs will not be responsive to requests for help with changing the bootloader pictures. If you are not confident with GIMP, terminals, compilers, or have never sucessfully compiled the ipodloader or installed iPodLinux as described in Installation from Linux, please do not attempt to change your bootloader.

If the above notice makes you 'qualified' to attempt this, but it doesn't work, you can PM littlenicky (http://ipodlinux.org/forums/profile.php?mode=viewprofile&u=709) for assistance.

What you need:

  • A source image
  • A copy of GIMP (http://gimp.org) (or a similar graphics suite)
  • The xpm2ipod utility for Linux or Windows, or compile it yourself from the Source (credit to mikey (http://www.ipodlinux.org/forums/profile.php?mode=viewprofile&u=95&sid=e85f828ca1bc33b8e7d5814bb7b09e1a) for writing the original, which was used as a reference)
  • A C compiler
  • A copy of the ipodloader source


Preparing the Image

These instuctions are specific to GIMP, but should be easily converted to a similar suite such as Photoshop.

An image loaded in GIMP
Enlarge
An image loaded in GIMP

1: Open your source image using 'File -> Open...'


First you may need to crop your image to select the portion you need. If you don't, skip to step 2.

The GIMP Toolbar, with the Crop button depressed
Enlarge
The GIMP Toolbar, with the Crop button depressed

1a: Click on the Crop button in the Toolbar window.

The Crop window
Enlarge
The Crop window

1b: In the Image window, draw a rough box around the image you want to keep. Touch up the shape in the Crop window; the width and height need to be equal.

An image about to be cropped
Enlarge
An image about to be cropped

1c: Adjust the Origin until the box fits over your desired image the way you'd like it.

1d: Now click 'Crop' in the Crop window.


Currently ipodloader only supports images which are 100x100 pixels. Anything else will make the picture garbled.

2: Right click on the image, and select 'Image -> Scale Image...'

The Image Scale window
Enlarge
The Image Scale window

3: Change the Width and Height to 100, and click 'OK'.


It's time to change your image to four shades of grey. To help out the colour indexer, we'll first convert the picture to greyscale.

A greyscale version of our cropped and scaled image
Enlarge
A greyscale version of our cropped and scaled image

4: Right click on the image and select 'Image -> Mode -> Grayscale' This will also give you a better idea of how the image will look once converted to four colours.

The Index Color Conversion window
Enlarge
The Index Color Conversion window

5: Right click on the image again, and select 'Image -> Mode -> Indexed...' You will be presented with the Index Color Conversion window.

The Custom Palette window
Enlarge
The Custom Palette window

6: Click the 'Use Custom Palette:' radio box, and click on the button next to it.

If this is not the first time you have prepared a bootloader image, skip to step 7.

The Color Palette Edit window, with a new blank palette ready for editing
Enlarge
The Color Palette Edit window, with a new blank palette ready for editing

6a: Click 'Edit'. In the Palette Edit window, click 'New', and name the palette 'iPod'.

6b: Right click in the area in the left, and click 'New'. Repeat.


6c: If you click near the left of the now slightly thicker black bar, you can see squares being highlighted. Right click on the second square from the left, and click 'Edit'.


6d: Change this colour to #555555, and click ‘OK’.


6e: Repeat steps 6c and 6d twice more, for colours #aaaaaa and #ffffff. Needless to say, you will use the third and fourth squares from the left these times.


6f: You should now have four shades of grey at the left: Black, Grey, Light Grey, and White. Click 'Save', then 'Close'.


7: Now back in the Custom Palette window, make sure the iPod palette is selected, and click 'Close'.

Back in the The Index Color Conversion window
Enlarge
Back in the The Index Color Conversion window

8: Ensure that all settings are the same as in this screenshot. Click 'OK'.

The indexed image, ready for saving
Enlarge
The indexed image, ready for saving

You will now see pretty much what the picture will look like on the iPod. You’re nearly finished.

9: Right click on the image, and select 'File -> Save As...' Select a location to save your image, and give it a name like ipod_boot.xpm. The suffix 'xpm' is important.


You can now close GIMP.


Converting from XPM to C format

1: Open up a terminal. cd to the directory in which you saved xpm2ipod, and use the following command:

$ xpm2ipod <absolute or relative path to your xpm image>

All going well, the program will exit without any output. There will be a new file in its directory, called tux.c. Copy this file to the ipodloader source directory, and run make. If you get a message similar to 'No rule for default', delete tux.o and run make again.

Use the resulting loader.bin as instructed in Installation from Linux.