% $Id$ %

\nopt{ipod6g}{

\subsubsection{Bootloader installation from Windows}

\begin{enumerate}

\item Download ipodpatcher.exe from
\download{bootloader/ipod/ipodpatcher/win32/ipodpatcher.exe}
and run it whilst logged in with an administrator account.

\item If all has gone well, you should see some information displayed about
your \dap{} and a message asking you if you wish to install the Rockbox
bootloader. Press i followed by ENTER, and ipodpatcher will now
install the bootloader. After a short time you should see the message
``[INFO] Bootloader installed successfully.'' Press ENTER again to exit
ipodpatcher.

\item \note{If ipodpatcher fails to install the bootloader for you, please
be certain that you do indeed have a supported iPod model and are logged in
as an administrator. If you do, run
ipodpatcher once more and try again. If you don't, then do not attempt to
install again.}

\end{enumerate}

\subsubsection{Bootloader installation from Mac OS X}

\begin{enumerate}

\item Attach your \dap{} to your Mac and wait for its icon to appear in
Finder.

\item Download and open ipodpatcher.dmg from
\download{bootloader/ipod/ipodpatcher/macosx/ipodpatcher.dmg}
and then double-click on the ipodpatcher icon inside. You can also
drag the ipodpatcher icon to a location on your hard drive and launch
it from the Terminal.

\item If all has gone well, you should see some
information displayed about your \dap{} and a message asking you if you
wish to install the Rockbox bootloader. Press i followed by ENTER, and
ipodpatcher will now install the bootloader. After a short time you
should see the message ``[INFO] Bootloader installed successfully.'' Press
ENTER again to exit ipodpatcher and then quit the Terminal application.

\item \note{If ipodpatcher fails to install the bootloader for you, please
be certain that you do indeed have a supported iPod model. If you do, run
ipodpatcher once more and try again. If you don't, then do not attempt to
install again.}

\item Your \dap{} will now automatically reconnect itself to your Mac.
Wait for it to connect, and then eject and unplug it in the normal way.
\note{You should unplug your ipod immediately after ejecting it to
prevent Rockbox immediately rebooting your \dap{} into disk mode when it
detects that your \dap{} is attached to a computer. }

\end{enumerate}

\subsubsection{Bootloader installation from Linux}

\begin{enumerate}

\item Download ipodpatcher from
\download{bootloader/ipod/ipodpatcher/linux32x86/ipodpatcher} (32-bit x86
binary) or \download{bootloader/ipod/ipodpatcher/linux64amd64/ipodpatcher}
(64-bit amd64 binary). You can save this anywhere you wish, but the next
steps will assume you have saved it in your home directory.

\item Attach your \dap{} to your computer.

\item Open up a terminal window and type the following commands:

\begin{code}
    cd $HOME
    chmod +x ipodpatcher
    ./ipodpatcher
\end{code}

\note{You need to be the root user in order for ipodpatcher to have
sufficient permission to perform raw disk access to your \dap{}.}

\item If all has gone well, you should see some information displayed about
your \dap{} and a message asking you if you wish to install the Rockbox
bootloader. Press i followed by ENTER, and ipodpatcher will now install the
bootloader. After a short time you should see the message ``[INFO] Bootloader
installed successfully.'' Press ENTER again to exit ipodpatcher.

\end{enumerate}}

\opt{ipod6g}{

\subsubsection{Bootloader installation from Windows}

Manual installation under Windows is not supported. Please use \caps{Rockbox
Utility} for bootloader and Rockbox installation.

\subsubsection{Bootloader installation from Mac OS X}

\warn{Please make sure that your iPod is formatted using FAT32
      (a.k.a. WinPod) before attempting to install the bootloader!
      Installation will not work on HFS/HFS+ iPods (a.k.a. MacPods).}

\begin{enumerate}

\item Download the bootloader in .ipod format from
\url{https://files.freemyipod.org/~user890104/bootloader-ipodclassic-v1_0/bootloader-ipod6g.ipod}

\item Download mks5lboot for your operating system from
\url{https://files.freemyipod.org/~user890104/bootloader-ipodclassic.html\#download_stable}

\item You need to have package libusb installed using Homebrew (brew install
libusb) or MacPorts (port install libusb) in order to run mks5lboot.

\item Start mks5lboot from a terminal with the following command-line:
mks5lboot --dfuscan -l It should scan for DFU devices every second.

\item It is important to stop iTunes (dock icon -> Quit) and iTunesHelper
(using Activity monitor, find the process and select Quit or Force
quit if it keeps restarting) BEFORE continuing to the next
step. Otherwise iTunes will put your iPod in wrong mode, and you will
not be able to proceed with the installation.

\item Put your iPod in DFU mode.

\item When the device is detected, press CTRL+C to terminate the scan
process, and proceed to the next step.

\item Start mks5lboot from a terminal with the following command-line:
mks5lboot --bl-inst path/to/bootloader-ipod6g.ipod, providing the
correct path to bootloader-ipod6g.ipod that you downloaded earlier.

\item When the installation is complete, you should have Rockbox up and
running!

\end{enumerate}

\subsubsection{Bootloader installation from Linux}

\begin{enumerate}

\item Connect your iPod in normal mode (iTunes/file transfer).
\item Download \wikilink{RockboxUtility} for your operating system.
\item When \caps{Rockbox Utility} opens, select the checkbox named Show disabled targets, and point the installer to your iPod's mount point.
\item On the installation screen make sure that Rockbox is selected and Bootloader is not selected. You can install themes or the game files if you want.
\item Start the Rockbox installation.
\item Download the \href{https://files.freemyipod.org/~user890104/bootloader-ipodclassic-v1_0/bootloader-ipod6g.ipod}{bootloader in .ipod format}.
\item Download \href{https://files.freemyipod.org/~user890104/bootloader-ipodclassic.html#download_stable}{mks5lboot} for your operating system. Alternatively, you can \href{https://files.freemyipod.org/~user890104/bootloader-ipodclassic.html#build_mks5lboot}{build it} from the source code.
\item You need to have package libusb-1.0.0 installed in order to run mks5lboot.
\item To make sure the installer is marked as executable, start the following command in the terminal: chmod +x mks5lboot.
\item Start mks5lboot from a terminal with the following command-line: ./mks5lboot --dfuscan -l. It should scan for DFU devices every second.
\item Put your iPod in \href{https://files.freemyipod.org/~user890104/bootloader-ipodclassic.html#dfu}{DFU mode}.
\item When the device is detected, press CTRL+C to terminate the scan process, and proceed to the next step.
\item Start mks5lboot from a terminal with the following command-line: ./mks5lboot --bl-inst path/to/bootloader-ipod6g.ipod, providing the correct path to bootloader-ipod6g.ipod that you downloaded earlier.
\item When the installation is complete, you should have Rockbox up and running!

\end{enumerate}
}
