5g

From wikiPodLinux

Table of contents

Development Status

Hardware

LCD Input Serial Hard Drive Piezo Audio Playback Recording Firewire USB Power Management Video Out
Image:Tick.png Image:Tick.png Image:Cross.png Image:Tick.png 1 Image:Tick.png Image:Cross.png 2 3 Image:Cross.png
1 - Currently podzilla accesses the piezo directly - there is no kernel driver.
2 - Only querys if the user wants to switch to the Apple disk mode. iPL does not have its own disk mode yet.
3 - A basic battery meter and deep sleep functions are available.

Software

Bootloader Podzilla MPD Ipodmame
Image:Tick.png Image:Tick.png1 Image:Cross.png Image:Tick.png
1 - podzilla2

Mac Instructions

The instructions below are for Linux, but a script for installing iPodLinux on your 5G Mac-formatted iPod is available here: http://ipodlinux.org/forums/viewtopic.php?t=8138

Also, go here for an installer script to install linux on a Mac 5G iPod http://www.ipodlinux.org/Linux_Installer_from_Mac

An alternative installer is available here (http://ipodlinux.org/5.5G#Mac_OS_X).

Windows Installation

To install using windows, please refer to this (http://ipodlinux.org/forums/viewtopic.php?t=7748) page.

Avoiding Cygwin is highly recommended!!!

Linux Installation

To install using linux, follow the instructions below. Warning: Linux install recommended for advanced users only

Prerequisites

3.4.3 arm-uclinux-elf toolchain

  • For Linux on x86 or AMD64: arm-uclinux-elf-tools-base-gcc3.4.3-20050722.sh
% wget http://www.so2.sys-techs.com/ipod/toolchain/linux-x86/arm-uclinux-elf-tools-base-gcc3.4.3-20050722.sh 
  • For OS X on PowerPC: arm-uclinux-elf-tools-base-gcc3.4.3-20050915.sh
% wget http://www.so2.sys-techs.com/ipod/toolchain/OSX-ppc/arm-uclinux-elf-tools-base-gcc3.4.3-20050915.sh 
  • For Cygwin on Windows on x86: arm-uclinux-tools-cygwin-20060116.tar.bz2
% wget http://www.josh.sys-techs.com/ipl/arm-uclinux-tools-cygwin-20060116.tar.bz2

Downloads

ipod_fs (userland)

% wget http://so2.sys-techs.com/ipod/ipod_fs_240206.tar.gz

kernel

Nightly kernel builds (http://www.ipodlinux.org/builds/)

make_fw

% wget http://ipodlinux.cvs.sourceforge.net/*checkout*/ipodlinux/tools/ipodloader/make_fw.c

iPodLoader2

% svn co http://svn.ipodlinux.org/tools/ipodloader2

TTK & HotDog

% svn co https://ipodlinux.svn.sourceforge.net/svnroot/ipodlinux/libs/hotdog/
% svn co https://ipodlinux.svn.sourceforge.net/svnroot/ipodlinux/libs/ttk/

podzilla2

% svn co https://ipodlinux.svn.sourceforge.net/svnroot/ipodlinux/apps/ipod/podzilla2/

Tips

If you are using a Linux distributions that automatically mount your iPod on the desktop, you will encounter problem with the following instructions when you are trying to do mkfs commands. You will need to:

  • Logout your GNOME or KDE session
  • Go into the command console by pressing CTRL-ALT-1
  • Do the following steps from the command console

Installation

First Time

Backup

Do take all the steps, even the backing up of the files, these will be needed afterwards!

For all of you Ubuntu users, that like me, are new in all this Linux scene, I'd advise you to do something you'd usually rather stay away from, if you are certain that you are doing this step by step (it worked for me at least ;). Do this while on superuser mode (root). I say this because there's one part in this tutorial that requires you to sudo, and you would have a lotsa headaches to surpass some errors that showed up (I ultimatelly gave up and restarted 100% root mode)


Connect the iPod to your system using the USB cable. After that open a console and type dmesg you will see something like:

usb-storage: device found at 2 
usb-storage: waiting for device to settle before scanning 
 Vendor: Apple     Model: iPod              Rev: 1.62
 Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdb: 58605120 512-byte hdwr sectors (30006 MB)

This means that it was assigned a device name called sdb, you should always check this, if you have other SCSI alike devices (e.g. sata discs, usb pendrives, usb storage, ...) connected to your system you will need to check the devicename first. And replace sda in this text by this devicename (in the example given above I would replace sda by sdb everywhere.

% dd if=/dev/sda of=ipod_boot_sector_backup bs=512 count=1
% dd if=/dev/sda1 of=ipod_os_partition_backup

Repartition HD

Use fdisk or any other partition editing utility.

  • partition 1 the "firmware partition" must start on cylinder 1 and needs to be atleast 80MB.
  • partition 3 the "iPodLinux partition" must physically start after "firmware partition". Its size should be at least 100MB but can be larger to suit your needs.
  • partition 2 the "iTunes partition" must physically start after Partition3 and can fill the remaining space on the disk.

This can be done by following the following sequence in fdisk:

lapedb:/home/edb/ipodlinux# fdisk /dev/sda

The number of cylinders for this disk is set to 3648.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          10       80293+   0  Empty
/dev/sda2              11        3648    29222235    b  W95 FAT32

Command (m for help):
Command (m for help): d
Partition number (1-4): 2
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (1-3648, default 1): 11
Last cylinder or +size or +sizeM or +sizeK (11-3648, default 3648): 180

Command (m for help): p

Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          10       80293+   0  Empty
/dev/sda3              11         180     1365525   83  Linux

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1-3648, default 1): 181
Last cylinder or +size or +sizeM or +sizeK (181-3648, default 3648):
Using default value 3648

Command (m for help): p

Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          10       80293+   0  Empty
/dev/sda2             181        3648    27856710   83  Linux
/dev/sda3              11         180     1365525   83  Linux

Partition table entries are not in disk order

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): b
Changed system type of partition 2 to b (W95 FAT32)

Command (m for help): p

Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          10       80293+   0  Empty
/dev/sda2             181        3648    27856710    b  W95 FAT32
/dev/sda3              11         180     1365525   83  Linux

Partition table entries are not in disk order

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
 
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional 
information.
Syncing disks.

Now the partition table has been saved. If you take a look at dmesg you will see the kernel redetected the new iPod partition table.

Format Partitions

Format the newly create partitions

% mkfs.vfat -F 32 /dev/sda2
% mkfs.ext3 /dev/sda3

Disable filesystem check for the ext3 partition

% tune2fs -c 0 /dev/sda3

Build make_fw

% gcc -o make_fw make_fw.c

Extract Firmware

% ./make_fw -o apple_os.bin -e 0 ipod_os_partition_backup
% ./make_fw -o apple_sw_5g_rcsc.bin -e 1 ipod_os_partition_backup

When successful you will see the files apple_os.bin and apple_sw_5g_rcsc.bin in you current working directory.


Build iPodLoader2 (and install toolchain)

In order to comple this step you will need to have the arm-uclinux-elf toolchain installed on your system. If you haven't installed it yet you will get a warning like:

edb@lapedb:~/ipodlinux/downloads/ipodloader2$ make 
Compiling startup.s
make: arm-uclinux-elf-gcc: Command not found
make: *** [startup.o] Error 127

In order to install this toolchain simply run the shellcommand (requires root) from a shell:

% chmod +x arm-uclinux-elf-tools-base-gcc3.4.3-20050722.sh
% ./arm-uclinux-elf-tools-base-gcc3.4.3-20050722.sh

And add the toolchain bin directory to your path:

% PATH=$PATH:/usr/local/arm-uclinux-tools2/bin/

Now you are ready to build.

% cd ipodloader2/
% make
% cp loader.bin ../
% cd ../

Create Bootloader Image

% ./make_fw -g 5g -v -o my_sw.bin -i apple_os.bin loader.bin

On success the file my_sw.bin will be created in the current working directory.

Install Bootloader

% dd if=my_sw.bin of=/dev/sda1

Setup Userland

% mkdir /mnt/ipod (for the first time)
% mount /dev/sda3 /mnt/ipod
% cd /mnt/ipod
% tar xvzf /<path_to>/ipod_fs_240206.tar.gz

Install Kernel

Unpack the kernel gzip and copy it to the iPod:

% gunzip <latest_nightly_build>-kernel.bin.gz 
% mount /dev/sda3 /mnt/ipod
% cp <latest_nightly_build>-kernel.bin /mnt/ipod/vmlinux

Updates

podzilla(pz1->pz2)

% mount /dev/sda3 /mnt/ipod
% cd ttk/
% make IPOD=1 (make NOHDOG=1)
% make install (make NOHDOG=1 install)
% cd ../
% cd podzilla2
% make IPOD=1
% mkdir -p /mnt/ipod/usr/share/fonts
% mkdir -p /mnt/ipod/usr/share/schemes
% cp ../ttk/fonts/* /mnt/ipod/usr/share/fonts/
% cp ../ttk/schemes/* /mnt/ipod/usr/share/schemes/
% make install DESTDIR=/mnt/ipod

podzilla(pz2)

% mount /dev/sda3 /mnt/ipod
% cd ttk/
% make IPOD=1 (make NOHDOG=1)
% make install (make NOHDOG=1 install)
% cd ../
% cd podzilla2
% make IPOD=1
% make install DESTDIR=/mnt/ipod IPOD=1

Please refer to Building Podzilla (http://www.ipodlinux.org/Building_Podzilla) for more information.

Screenshots And Demonstrations

Video demonstrating a finished install HERE (http://sleep.shadowpuppet.net/ipodLinux.php)

Matrix demo on iPod Video

Image:5g matrix.jpg


Loader 2.4 running on a Video iPod

Image:Loader2-5g.JPG

Retrieved from "http://ipodlinux.org/5g"
Views