summaryrefslogtreecommitdiff
path: root/manual/advanced_topics/archos-flashing.tex
diff options
context:
space:
mode:
Diffstat (limited to 'manual/advanced_topics/archos-flashing.tex')
-rw-r--r--manual/advanced_topics/archos-flashing.tex279
1 files changed, 279 insertions, 0 deletions
diff --git a/manual/advanced_topics/archos-flashing.tex b/manual/advanced_topics/archos-flashing.tex
new file mode 100644
index 0000000000..43d3cbd7ad
--- /dev/null
+++ b/manual/advanced_topics/archos-flashing.tex
@@ -0,0 +1,279 @@
1\section{\label{ref:Rockboxinflash}Rockbox in flash}
2\textbf{FLASHING ROCKBOX IS OPTIONAL!} It is not required for using
3Rockbox on your Jukebox Recorder. Please read the whole section
4thoroughly before flashing.
5
6\subsection{\label{ref:PartISection61}Introduction}
7Flashing in the sense used here and elsewhere in regard to Rockbox means
8reprogramming the flash memory of the Jukebox unit. Flash memory
9(sometimes called ``Flash ROM'') is a type of
10non{}-volatile memory that can be erased and reprogrammed in circuit. It is a variation of electrically erasable
11programmable read{}-only memory (EEPROM).
12
13A from the factory Jukebox comes with the Archos firmware flashed. It is
14possible to replace the built{}-in software with Rockbox.
15
16Terminology used in the following:\newline
17\textbf{Firmware} means the flash ROM content as a whole.\newline
18\textbf{Image} means one operating software started from there.
19
20By reprogramming the firmware, the Jukebox will boot much faster. The
21Archos boot loader seems to take forever compared to the Rockbox
22version. In fact, the Rockbox boot loader is so fast that it has to
23wait for the disk to spin up. The flashing procedure is a bit involved
24for the first time, updates are very simple later on.
25
26\subsection{\label{ref:Method}Method}
27The replaced firmware will host a bootloader and 2 images. This is made
28possible by compression. The first is the
29``permanent'' backup. The second is the
30default image to be started. The former is only used when you hold the
31F1 key during start, and is the original Archos firmware, the second is
32a current build of Rockbox. This second image is meant to be
33reprogrammed whenever a Rockbox upgrade is performed.
34
35There are two programming tools supplied:
36
37\begin{itemize}
38\item The first one is called \textbf{firmware\_flash.rock} and is used
39to program the whole flash with new content. It can also be used to
40revert back to the original firmware that is backed up as part of this
41procedure. This tool will only be needed once, and can be viewed as
42``formatting'' the flash with the desired image structure.
43\item The second one is called \textbf{rockbox\_flash.rock }and is used
44to reprogram only the second image. If the resulting programmed
45firmware image is not operational, it is
46possible to hold down the F1 key while booting to start the Jukebox
47with the Archos firmware and Rockbox booted from disk to reinstall a
48working firmware image.
49\end{itemize}
50
51\subsubsection{\label{ref:PartISection63}Risks}
52Well, is it dangerous? Yes, certainly, like programming a
53mainboard BIOS, CD/DVD drive firmware,
54mobile phone, etc. If the power fails, the chip malfunctions while
55programming or particularly if the programming software malfunctions,
56your Jukebox may stop functioning. The Rockbox team take no
57responsibility of any kind {}- do this at your own risk.
58
59However, the code has been extensively tested and is known to work well.
60 The new firmware file is completely read before it starts programming,
61there are a lot of sanity checks. If any fail, it will not program.
62There is no reason why such low level code should behave differently on
63your Jukebox.
64
65There's one ultimate safety net to bring back Jukeboxes
66with even completely garbled flash content: the UART boot mod, which in
67turn requires the serial mod. This can bring the dead back to life,
68with that it's possible to reflash independently from the outside, even
69if the flash is completely erased. It has been used during development,
70else Rockbox in flash wouldn't have been possible.
71Extensive development effort went into the development of the UART boot
72mod. Mechanically adept users with good soldering skills can easily
73perform these mods. Others may feel uncomfortable using the first tool
74(\textbf{firmware\_flash.rock}) for reflashing the firmware.
75
76If you are starting with a known{}-good image, you are unlikely to
77experience problems. The flash tools have been stable for quite a
78while. Several users have used them extensively, even flashing while
79playing! Although it worked, it's not the recommended
80method.
81
82The flashing software is very paranoid about making sure that the
83correct flash version is being installed. If the wrong file is used,
84it will simply refuse to flash the Jukebox.
85
86About the safety of operation: Since the Rockbox boot code gives ``dual
87boot'' capability, the Archos firmware is still there when you hold F1
88during startup. So even if you have problems with Rockbox from flash, you can still use
89the Jukebox, reflash the second image with an updated Rockbox copy,
90etc.
91
92The flash chip being used by Archos is specified for 100,000 cycles, so
93it's very unlikely that flashing it will wear it out.
94
95\subsection{\label{ref:Requirements}Requirements}
96You need two things:
97
98\begin{itemize}
99\item The first is a Recorder or FM model, or an Ondio SP or FM. Be sure
100you're using the correct package, they differ
101depending on your precise hardware! The technology works for the Player
102models, too. Players can also be flashed, but Rockbox does not run
103cold{}-started on those, yet.
104\item Second, you need an in{}-circuit programmable flash. Chances are
105about 85\% that you have, but Archos also used an older flash chip
106which can't do the trick. You can find out via Rockbox
107debug menu, entry Hardware Info. If the flash info gives you question
108marks, you're out of luck. The only option for
109flashing if this is the case is to solder in the right chip
110(SST39VF020), preferably with the firmware already in. If the chip is
111blank, you'll need the UART boot mod as well.
112\end{itemize}
113\subsubsection{\label{ref:FlashingProcedure}Flashing Procedure}
114Here are step{}-by{}-step instructions on how to flash and update to a
115current build. It is assumed that you can install and operate Rockbox
116the usual way. The flashing procedure has a lot of failsafes, and will
117check for correct model, file, etc. {}- if something is incompatible it
118just won't flash, that's all.
119
120Now here are the steps:
121
122\textbf{Preparation}
123
124Install (with all the files, not just the .ajz) and use the current
125daily build you'd like to have. Enable any voice
126features that are helpful throughout the process, such as menus and
127filename spelling. Set the file view to show all files, with the menu
128option \textbf{General Settings {}-{\textgreater} File View
129{}-{\textgreater} Show Files} set to ``all''.
130Have the Jukebox nicely charged to avoid
131running out of power during the flash write. Keep the Jukebox plugged
132into the charger until flashing is complete.
133
134{\bfseries
135Backup }
136
137Backup the existing flash content. This is not an essential part of the
138procedure, but is strongly recommended since you will need these files
139if you wish to reverse the flashing procedure, or if you need to update
140the bootloader (as opposed to the firmware) in the future. Keep them
141safe!
142
143Access the main menu by pressing F1 then select \textbf{Info
144{}-{\textgreater} Debug}. Select the first entry, \textbf{Dump ROM
145contents}, by pressing Play one more time. The disk should start to
146spin. Wait for it to settle down, then plug in the USB cable to copy
147the dump file this has just been created to your PC. The main folder of
148your Jukebox now should contain two strange .bin files. Copy the larger
149one named
150\textbf{internal\_rom\_2000000{}-203FFFF.bin}
151to a safe place, then delete them both from the box.
152
153{\bfseries
154Copy the new flash content file to your box }
155
156Depending on your model (recorder, FM, V2 recorder), download one of the
1573 packages:
158
159\url{http://joerg.hohensohn.bei.t-online.de/archos/flash/flash_rec.zip}
160
161\url{http://joerg.hohensohn.bei.t-online.de/archos/flash/flash_fm.zip}
162
163\url{http://joerg.hohensohn.bei.t-online.de/archos/flash/flash_v2.zip}
164\url{http://joerg.hohensohn.bei.t-online.de/archos/flash/flash_v2.zip}
165
166\url{http://joerg.hohensohn.bei.t-online.de/archos/flash/flash_v2.zip}
167
168\url{http://joerg.hohensohn.bei.t-online.de/archos/flash/flash_ondiosp.zip}
169
170\url{http://joerg.hohensohn.bei.t-online.de/archos/flash/flash_ondiofm.zip}
171
172The zip archives contain two .bin files each. Those firmware*.bin files
173are all we want, copy them to the root directory of your box. The names
174differ depending on the model, the flash
175plugin will pick the right one, no way of
176doing this wrong.
177
178{\bfseries
179Install the Rockbox
180Bootloader (``formatting'' the flash)}
181
182This procedure is only necessary the first time you flash Rockbox.
183Unplug the USB cable again, then select \textbf{Browse
184}\textbf{Plugins}\textbf{ } from the main menu (F1). Locate \textbf{firmware\_flash.rock}, and start it with PLAY. Rockbox now displays an info screen, press F1 to acknowledge it and start a file check. Again wait for the disk to
185settle, then press F2 to proceed to a warning message (if the plugin
186has exited, you don't have the proper file) and F3 to actually program
187the file. This takes maybe 15 seconds, wait for the disk to settle
188again. Then press a key to exit the plugin.
189
190{\centering\itshape
191 [Warning: Image ignored] % Unhandled or unsupported graphics:
192%\includegraphics[width=3.609cm,height=2.062cm]{images/rockbox-manual-img75.png}
193 [Warning: Image ignored] % Unhandled or unsupported graphics:
194%\includegraphics[width=3.669cm,height=2.097cm]{images/rockbox-manual-img76.png}
195 \textmd{ } [Warning: Image ignored]
196% Unhandled or unsupported graphics:
197%\includegraphics[width=3.739cm,height=2.136cm]{images/rockbox-manual-img77.png}
198 \newline
199Flashing boot loader in 3 easy steps
200\par}
201
202{\bfseries
203\label{ref:FlashingRockbox}Install the Rockbox binary in flash}
204
205All the above was necessary only once, although there will not be any
206obvious difference (other than the Archos firmware loading a bit more quickly)
207after the step above is complete. Next install the actual Rockbox firmware thatwill be used from ROM. This is how Rockbox will be updated when
208installing a new release from now on.
209
210\begin{itemize}
211\item Unpack the whole build that you are installing onto the Jukebox,
212including plugins and support files. This can be done using the Windows setup program to install the new version onto the Jukebox.
213\item Test the build you are going to flash by playing the .ajz file so
214that ROLO loads it up. This puts the firmware in memory without
215changing your flash, so you can check that everything is working. If
216you have just installed the bootloader (see above) then this will happen automatically as the existing Archos firmware loads the .ajz that you have just installed. If upgrading ROMbox, this step \textbf{must }be carried out since Rockbox cannot overwrite the ROM while it is running from it.
217\item Play the .ucl file, which is usually found in the
218\textbf{/.rockbox} directory, this will kick off the
219\textbf{rockbox\_flash.rock} plugin. It's a bit
220similar to the other one, but it's made different to
221make the user aware. It will check the file, available size, etc. With
222F2 it begins programming, there is no need for warning this time. If it
223goes wrong, you'll still have the permanent image.
224
225{\centering\itshape
226 [Warning: Image ignored] % Unhandled or unsupported graphics:
227%\includegraphics[width=3.53cm,height=2.016cm]{images/rockbox-manual-img78.png}
228 \textmd{ } [Warning: Image ignored]
229% Unhandled or unsupported graphics:
230%\includegraphics[width=3.528cm,height=2.016cm]{images/rockbox-manual-img79.png}
231 \newline
232Using rockbox\_flash to update your boot firmware
233\par}
234\item It is possible that you could get an ``Incompatible
235Version'' error if the plugin interface has changed since
236you last flashed Rockbox. This means you are running an
237``old'' copy of Rockbox, but are trying to
238execute a newer plugin, the one you just downloaded. The easiest
239solution is to ROLO into this new version,
240by playing the\textbf{ ajbrec.ajz }file. Then you are consistent and can play
241\textbf{rockbox.ucl}.
242\item When done, you can restart the box and hopefully your new Rockbox
243image.
244\end{itemize}
245UCLs for the latest Recorder and FM firmware are included in Rockbox 2.4
246and also the daily builds.
247
248\subsection{\label{ref:KnownIssuesAndLimits}Known Issues and Limitations}
249There are two variants as to how the Jukebox starts, which is why there
250are normal and \_norom firmware files. The vast majority of Jukeboxes
251all have the same boot ROM content, but some have different flash
252content. Rockbox identifies this boot ROM with a CRC value of 0x222F in
253the hardware info screen. Some recorders have the boot ROM disabled (it
254might be unprogrammed) and start directly from a flash mirror at
255address zero. They need the \_norom firmware, it has a slightly
256different bootloader. Without a boot ROM there is no UART boot safety
257net. To compensate for that as much as possible the MiniMon monitor is
258included, and can be started by pressing F3+ON. Using this the box can
259be reprogrammed via serial if the UART mod has been applied and the
260first \~{}2000 bytes of the flash are OK.
261
262\subsubsection{ROMbox}
263ROMbox is a flashable version of Rockbox that is
264uncompressed and runs directly from the flash chip rather than being
265copied into memory first. The advantage of this is that memory that
266would normally be used for storing the Rockbox code can be used for
267buffering MP3s instead, resulting in less disk
268spin{}-ups and therefore longer battery life
269 Unfortunately being uncompressed, ROMbox requires more space in flash
270than Rockbox and will therefore not fit in the space that is left on an
271FM recorder. ROMbox therefore runs on the V1 and V2 recorder models
272only.
273
274The procedure for flashing ROMbox is identical to the procedure for
275flashing Rockbox as laid out on page \pageref{ref:FlashingRockbox}.
276The only difference is that the file to install is called
277\textbf{rombox.ucl}. ROMbox is included automatically with rockbox 2.4
278and all the current daily builds, so the procedure is identical
279otherwise. \ No newline at end of file