% $Id: %

In order to install the bootloader, you will need to download the following
files:

\begin{itemize}
  \item An original firmware (OF) from
    \opt{e200v2}{
      \url{http://forums.sandisk.com/t5/User-guides-Firmware-Software/e200v2-03-01-16-Firmware-Download-amp-Instructions/td-p/36562}}%
    \opt{fuze,fuzev2}{
      \url{http://forums.sandisk.com/t5/Fuze/Sansa-Fuze-Firmware-Update-01-02-31-amp-02-03-33/td-p/139175}}%
    \opt{clipv1,clipv2}{
      \url{http://forums.sandisk.com/t5/Clip-Clip/Sansa-Clip-Firmware-01-01-35-amp-02-01-35-Release/td-p/144965}}%
    \opt{clipplus}{
      \url{http://forums.sandisk.com/t5/Clip-Clip/Sansa-Clip-Firmware-Update-01-02-15/td-p/150227}}%
    \opt{c200v2}{
      \url{http://forums.sandisk.com/t5/User-guides-Firmware-Software/c200-version2-Latest-Firmware-Installation-Instructions-03-02-05/td-p/34097}}
    \opt{clipzip}{
      \url{http://forums.sandisk.com/t5/Clip-Zip/Sansa-Clip-Zip-Firmware-01-01-18/td-p/254122}}

  \item The bootloader:
    \opt{e200v2}{\download{bootloader/sandisk-sansa/e200v2/bootloader-e200v2.sansa}}%
    \opt{fuze}{\download{bootloader/sandisk-sansa/fuze/bootloader-fuze.sansa}}%
    \opt{fuzev2}{\download{bootloader/sandisk-sansa/fuzev2/bootloader-fuzev2.sansa}}%
    \opt{clipv1}{\download{bootloader/sandisk-sansa/clip/bootloader-clip.sansa}}%
    \opt{clipv2}{\download{bootloader/sandisk-sansa/clipv2/bootloader-clipv2.sansa}}%
    \opt{clipplus}{\download{bootloader/sandisk-sansa/clipplus/bootloader-clipplus.sansa}}%
    \opt{c200v2}{\download{bootloader/sandisk-sansa/c200v2/bootloader-c200v2.sansa}}%
    \opt{clipzip}{\download{bootloader/sandisk-sansa/clipzip/bootloader-clipzip.sansa}}

  \item The version of mkamsboot for your operating system from
    \download{bootloader/sandisk-sansa/mkamsboot/}
\end{itemize}

\subsection{Bootloader installation from Windows}

\begin{enumerate}

\item Create a folder called ``rbinstall'' on your desktop, and then extract
  the OF, the bootloader and mkamsboot into it.

\item Open a new command prompt, and navigate to the ``rbinstall'' folder.

\item Run mkamsboot.exe, passing the name of the OF and bootloader files that
  you downloaded, in addition to a name for the output file.

  % The following arguments to the code environment select the correct line out
  % of the code block. This is necessary as using \opt{} in the code block would
  % create unwanted empty lines.
  \begin{code}[firstline=\opt{fuze}{1}\opt{fuzev2}{2}\opt{e200v2}{3}%
            \opt{clipv1}{4}\opt{clipv2}{5}\opt{clipplus}{6}\opt{c200v2}{7}%
            \opt{clipzip}{8},%
               lastline=\opt{fuze}{1}\opt{fuzev2}{2}\opt{e200v2}{3}%
            \opt{clipv1}{4}\opt{clipv2}{5}\opt{clipplus}{6}\opt{c200v2}{7}%
            \opt{clipzip}{8}]
    mkamsboot.exe fuzea.bin bootloader-fuze.sansa patched.bin
    mkamsboot.exe fuzpa.bin bootloader-fuzev2.sansa patched.bin
    mkamsboot.exe e200pe.bin bootloader-e200v2.sansa patched.bin
    mkamsboot.exe m300a.bin bootloader-clip.sansa patched.bin
    mkamsboot.exe m30pa.bin bootloader-clipv2.sansa patched.bin
    mkamsboot.exe clppa.bin bootloader-clipplus.sansa patched.bin
    mkamsboot.exe c200pa.bin bootloader-c200v2.sansa patched.bin
    mkamsboot.exe clpza.bin bootloader-clipzip.sansa patched.bin
  \end{code}
 
  If mkamsboot.exe does not report success, then retry or abort.

\item Copy the output file (``patched.bin'' in the example given above) to the
  root of the device and rename it to the same name as the OF file you downloaded earlier 
  \opt{fuze}{(``fuzea.bin''} \opt{e200v2}{(``e200pe.bin''}
  \opt{clipv1}{(``m300a.bin''} \opt{clipv2}{(``m30pa.bin''}
  \opt{clipplus}{(``clppa.bin''} \opt{fuzev2}{(``fuzpa.bin''}
  \opt{clipzip}{(``clpza.bin''} \opt{c200v2}{(``c200pa.bin''} above).

\item Safely eject the device, unplug USB and wait for the firmware update to finish.
\end{enumerate}

\subsection{Bootloader installation from Mac OS X and Linux}

\begin{enumerate}

\item Create a folder called ``rbinstall'' in your home directory, and then
  extract the OF, the bootloader and mkamsboot into it.

\item Open a new terminal, and navigate to the ``rbinstall'' folder.

\item Run mkamsboot, passing the name of the OF and bootloader files that
  you downloaded, in addition to a name for the output file.

% See above for the code environment arguments explanation.
  \begin{code}[firstline=\opt{fuze}{1}\opt{fuzev2}{2}\opt{e200v2}{3}%
            \opt{clipv1}{4}\opt{clipv2}{5}\opt{clipplus}{6}\opt{c200v2}{7}%
            \opt{clipzip}{8},%
               lastline=\opt{fuze}{1}\opt{fuzev2}{2}\opt{e200v2}{3}%
            \opt{clipv1}{4}\opt{clipv2}{5}\opt{clipplus}{6}\opt{c200v2}{7}%
            \opt{clipzip}{8}]
    ./mkamsboot fuzea.bin bootloader-fuze.sansa patched.bin
    ./mkamsboot fuzpa.bin bootloader-fuzev2.sansa patched.bin
    ./mkamsboot e200pe.bin bootloader-e200v2.sansa patched.bin
    ./mkamsboot m300a.bin bootloader-clip.sansa patched.bin
    ./mkamsboot m30pa.bin bootloader-clipv2.sansa patched.bin
    ./mkamsboot clppa.bin bootloader-clipplus.sansa patched.bin
    ./mkamsboot c200pa.bin bootloader-c200v2.sansa patched.bin
    ./mkamsboot clpza.bin bootloader-clipzip.sansa patched.bin
  \end{code}
 
  If mkamsboot does not report success, then retry or abort.

\item Copy the output file (``patched.bin'' in the example given above) to the
  root of the device and rename it to the same name as the OF file you downloaded earlier 
  \opt{fuze}{(``fuzea.bin''} \opt{e200v2}{(``e200pe.bin''}
  \opt{clipv1}{(``m300a.bin''} \opt{clipv2}{(``m30pa.bin''}
  \opt{clipplus}{(``clppa.bin''} \opt{fuzev2}{(``fuzpa.bin''}
  \opt{c200v2}{(``c200pa.bin''} \opt{clipzip}{(``clpza.bin''} above).

\item Safely eject the device, unplug USB and wait for the firmware update to finish.
\end{enumerate}
