Skip to content

dwelch67/ipod_mini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

If you climb into your wayback machine, when the ipod (now called classic)
3rd gen was the latest thing.  I was just getting into ARM and embedded
stuff.  And bought my first ipod because I had found something called
ipodlinux (http://ipodlinux.org but it appears to be gone) where they
had figured out stuff and had a linux running.  I didnt want to run
linux but like the GameBoyAdvance wanted to do some homebrew.

I did, ported Asteroids and some other things, bare metal to the ipod.

Repeated this task with the ipod 5G video.

But have not done anything since.  I do have some mini's though, I
think they are pretty cool, fairly easy to take apart and replace
the battery and the hard drive with a compact flash, so no more
moving parts, uses less power, and will last much longer.

Note, use the hot glue approach to remove the end caps, not the jam
a screwdriver in approach, the screwdriver approach damages the case.
For the hot glue you need something a little stronger than the hobby
glue that comes with the gun, I ended up having to use so much that I
later had to dig it out of the headphone jack and the 30 pin connector
as well as take several tries.  Tougher glue will get the ends off on
the first try.  Just google around to find out about upgrading the mini.

So ipodlinux had a bootloader approach, a multiboot thing allowing for
the apple firmware and the ipodlinux firmware (and whatever other firmware)
you wanted to have in the boot order, you pressed one of the four buttons
menu play/pause prev next to pick which image to boot.  Well, now we have
http://www.rockbox.org.  Which is light years ahead and supports many
more brands and players than ipodlinux.  It has a different loader
approach and best of all a very simple to use installer.

You can recover if you screw up, well you might not recover your music
or other files so if you are worried about that dont do any of this.  But
if you are willing.  Mess up or not, you will need to use this approach
to try new programs that I am going to show you.

You should already know that pressing and holding select and menu at
the same time for a while causes any ipod (well the real, classic, non
touch ipods) to reboot.  If while rebooting you press and hold select
and play it goes into a file mode where you can plug in the usb and
mount it on a computer, have iTunes recover the device with the apple
firmware and such or have rockbox re-install, etc or try more of my
programs.

I start by using the rockbox installer to install rockbox, and boot
rockbox to see that everything is working.

Note that if you use select+menu to reboot from rockbox and then hold
menu through the apple logo, the rockbox firmware will try to boot the
prior/Apple firmware so you can basically dual boot rockbox and apple.
That does not work for my programs that is code in the rockbox program
doing that.

What I am doing now is, after installing rockbox, there will
be a .rockbox directory on your ipod if you mount the drive.  In
that directory is a file called rockbox.ipod.  Which is just an ARM
binary, basically bare metal.  The rockbox bootloader wants a small
checksum and header up front, which for the ipod mini is the checksum
of all the bytes in the binary, plus 11 for the mini2g (for now I am
learning on the 2g will add 1g stuff along the way), big endian four
bytes, then the four byte string "mn2g" and then the ARM binary.  Rockbox
sources have a tool named scramble that preps a binary for all their
targets, I made a program named rockloader that simply adds these 8
bytes and outputs a file (which my makefile calls rockbox.ipod).

I recommend that you backup the real rockbox.ipod file from rockbox,
call it rockbox.ipod.back or something.  While using my programs copy
the rockbox.ipod file generated by the example to the .rockbox directory
on the ipod.  Then use menu+select to reboot.

An alternative is to copy one of my rockbox.ipod files to apple_os.ipod
on the ipod in the .rockbox directory (assuming you dont have an
apple_os.ipod file, I dont).  The stock rockbox firmware (original
rockbox.ipod file that you backed up) looks for this file name if you
hold the menu button while booting.  So you can use this apple_os.ipod
solution to allow a dual boot between a bare metal example program and
then reboot and dont hold menu and you get rockbox back.  Then mount
the drive remove apple_os.ipod and reboot and hold menu and you get
the apple firmware again if that is what you want.  For whatever
reason when you boot with the menu button pressed it runs slower,
I will learn more about why at some point.

Start with mini2g/blinker0 this simply blinks the backlight.

Ipodlinux stuff:
http://ipodlinux.sourceforge.net/index.shtml

Hurry while it is still there.
svn co https://ipodlinux.svn.sourceforge.net/svnroot/ipodlinux

The rockbox folks have lots of good info, mostly though you have to
go through the source code.  Both ipodlinux and rockbox are well
written and easy to read.

For development tools I either use my own build of the gnu tools, see
my build_gcc repo for scripts. (build_arm) or go to codesourcery.com
even though they have been assimilated by Mentor Graphics, and then find/follow
your way to the LITE version of their gnu tools, get the gnu eabi version
and install that somewhere.  For either one set your PATH accordingly.
My bare metal programs try to not use C nor compiler libraries so you
can usually use any cross compiler, the gnu linux arm cross compiler
will work, just change the

CROSS_COMPILE = arm-none-eabi

line in the Makefile.

I will eventually put clang/llvm Makefile support in and such.  The linker
scripts are gnu based (memmap is usally what I call it).  If you want
to read more ramblings on taking control of the compiler and linker and
how and why I do the strange looking things I do see the baremetal and
bssdata directorys in my raspberrypi repo.

I assume that you know better than to run these programs on the wrong
device (note the rockbox installer will try to detect your device, you
dont have to actually install).  I will not be responsible for you
destroying hardware, bare metal development more so than application
development includes the risk of partial to total loss of the hardware
(and stuff connected to it).  You have been warned.

Ipod mini's are still easy to find around $30 on ebay.  Hurry before I
buy all of them.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published