Using Cygwin
From iPodLinux
On these wiki pages you will find a lot of instructions intended for Linux PC users, giving command examples, mostly with dd and make_fw, which are hard to follow for Windows users.
Cygwin is a Unix/Linux-like command shell environment for Windows.
On this page you will learn how to translate instructions with Linux commands into Cygwin commands.
Contents |
Preparation - Install Cygwin
To install Cygwin, download it from the Cygwin website.
When you install it, you get to choose which programs and packages you want installed. Make sure you install at least these items, all under the "devel" category:
- cvs
- gcc
- make
- patchutils
- svn (subversion)
Basics
Available commands
The most used commands on this wiki are all available on Cygwin:
- gcc -- the C compiler
- dd -- for copying blocks from/to disks
How to access devices
The most important part is to understand how to address a disk (usually your iPod disk) under Cygwin.
On Linux, you would use a pathname such as: /dev/sdXN where X is to be replaced with a letter identifying the current iPod disk, and N being an optional partition number on the disk.
On Windows, this path translates to either:
- \\.\physicaldiskN -- for paths without a partition number (/dev/sdX)
- \\.\L: -- to access a mounted partition (L is to be replaced with the drive letter)
- Note: you must type two backslashes for each backslash you want to enter under Cygwin! That means that if you use a path like this shown here with a command, you actually have to type \\\\.\\physicaldriveN. Alternatively, enclose the path in single quotes, e.g. '\\.\physicaldriveN'.
There is a problem, though: You cannot translate /dev/sdX1 easily, because that means the first partition, which is not mounted on a Windows PC and thus there is no drive letter to address, either. But we can deal with this with a bit of extra work:
- You need to know that the firmware partition starts at block 63 of the disk. Hence, when Linux refers to sdX1, you can refer to the entire drive on Windows and offset any access by 63 blocks (à512 byte).
- For example, to copy a Firmware file from the Apple Restore tool to the firmware partition, a Linux command would be like this:
- dd if=Firmware-x.y.z of=/dev/sdX1
- On Windows, you'd then use:
- dd if=Firmware-x.y.z of='\\.\physicaldriveN' seek=63
- (seek is used when you want to offset on output, while skip is used on the input side to start reading at that offset)