% $Id$ %

\opt{ipodnano}{\warn{If your Nano has a stainless steel back and plastic front 
it is a 1st generation and is compatible with Rockbox.  If, on the other hand, 
your Nano has a one-piece aluminum body it is a 2nd generation Nano and there 
is currently no Rockbox port available.  Do not attempt to install the 
bootloader on a 2nd generation Nano}}

In order to make your \dap{} load and execute the Rockbox firmware you
have just installed, you will need to install the Rockbox
bootloader. Unless bugs are found in the bootloader code, or
significant new feature are added, you will only have to perform this
step once.

\subsubsection{Bootloader installation from Windows}

\begin{enumerate}

\item Make sure you are logged into your computer as Administrator, or a 
user with Administrator privileges and connect your \dap{}.

\item Download ipodpatcher.exe from 
\download{bootloader/ipod/ipodpatcher/win32/ipodpatcher.exe} 
and run it.

\item If all has gone well, you should see some information displayed about
your ipod 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 Make sure that you have correctly extracted a build of Rockbox so that
you have a \fname{/.rockbox}, which contains all the files needed by Rockbox
in the root of your \daps{} drive and that you have also installed the fonts
package -- see \reference{sec:installing_fonts} for more information.

\item Disconnect your \dap{} in the usual way. The bootloader is now installed. 

\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. If you have configured itunes to open automatically when your
\dap{} is attached (the default behaviour), then wait for it to open and
then quit it. You also need to ensure the ``Enable use as disk'' option
is enabled for your \dap{} in itunes.

\item\label{subsec:macos_umount} Open up Disk Utility
(in Applications $\rightarrow$ Utilities) and click 
on the name of your \dap{} (e.g. DAVES IPOD) in the list on the left 
pane. Then click on the ``unmount'' icon at the top. \warn{Do \emph{not}
click on the ``eject'' icon.}

\item Download and open ipodpatcher.dmg from 
\download{bootloader/ipod/ipodpatcher/macosx/ipodpatcher.dmg} 
and then double-click on the ipodpatcher icon inside. 

\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 \warn{If you received a ``Resource busy'' error from 
ipodpatcher, then this means you didn't complete step 
\ref{subsec:macos_umount}. Go back to Disk Utility, unmount your
\dap{} and then run ipodpatcher 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. }

\item Make sure that you have correctly extracted a build of Rockbox so that
you have a \fname{/.rockbox}, which contains all the files needed by Rockbox
in the root of your \daps{} drive and that you have also installed the fonts
package -- see \reference{sec:installing_fonts} for more information.

\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've 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}

\warn{You may 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 ipod 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 Make sure that you have correctly extracted a build of Rockbox so that
you have a \fname{/.rockbox}, which contains all the files needed by Rockbox
in the root of your \daps{} drive and that you have also installed the fonts
package -- see \reference{sec:installing_fonts} for more information.

\item Disconnect your \dap{} in the usual way. The bootloader is now installed.

\end{enumerate}
