Commit graph

8 commits

Author SHA1 Message Date
Rafaël Carré
8b1bbdb013 rbutil: link to the Sansa forums when the user is requested to download a Sansa AMS firmware
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24778 a1c6a512-1295-4272-9138-f99709370657
2010-02-19 23:45:29 +00:00
Rafaël Carré
b6c20c17e4 mkamsboot: prevents 2 potential problems
We checked if the new firmware block (bootloader+ucl function+packed
bootloader & OF) fit in the OF file, but not if it would run properly.

For example the Clipv2 OF is bigger than 0x50000 bytes uncompressed, but
it fitted in this space when packed and concatenated to a packed
bootloader + ucl function and dualboot code (but we use 1MB of RAM and
not 0x50000 anyway).

Now we check that both bootloader and OF are small enough to be unpacked
at runtime: the unpacked data must be smaller than available memory and
not overlap with ucl function and packed data (although the unpacked and
packed data could probably overlap a bit, I don't know how to calculate
this and this could be quite complex).

total_size() is replaced by check_sizes() which will perform all the
checks and set an error string if the firmware can't be patched.
(both mkamsboot and rbutilqt modified accordingly)

The second problem is that dualboot.S assumed r3 and r5 were left
untouched in the device specific checks. This was undocumented and very
error prone when modifying these checks.

r3 is the last byte of packed copy (bootloader or OF)
r5 is the entry point of uclunpack function derived from r3, so move r5
calculation after the device specific code.

Even if r3 is currently unused in the device specific code, we store it
in memory after copying the ucl function, when it points to the last byte
of packed data (not yet copied at this point since we didn't chose if we
boot the OF or the bootloader), and restore it just before using it so no
restriction is placed on registers usage in device specific code.

Add a new variable ucl_dest in dualboot.S set by mkamsboot.c, which
represents the last bound of buffer where we copy the ucl function, and
then the packed data (bootloader or OF).

RAM_SIZE definition is moved from dualboot.S to mkamsboot.c new
model_memory_size(), where it is a bit better documented.

Tested on e200v2 and Clip+

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24772 a1c6a512-1295-4272-9138-f99709370657
2010-02-19 14:10:26 +00:00
Dominik Riebeling
92042548a2 Make Rockbox Utility build again and make some strings translatable. Break some long lines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24293 a1c6a512-1295-4272-9138-f99709370657
2010-01-19 23:16:43 +00:00
Dominik Wenger
8d29cadaa1 rbutil: add a few qDebug outputs, to better track the install process in BootloaderInstallAms.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24288 a1c6a512-1295-4272-9138-f99709370657
2010-01-19 21:59:25 +00:00
Rafaël Carré
6b06648239 rbutilqt: always rename the OF to the name specified in rbtutil.ini
The OF could have been stored by the user with a different name

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23700 a1c6a512-1295-4272-9138-f99709370657
2009-11-22 14:28:48 +00:00
Dominik Riebeling
18e6547ffa Add a pointer to the manual and wiki for finding an OF file for AMS bootloader installation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23364 a1c6a512-1295-4272-9138-f99709370657
2009-10-26 22:18:27 +00:00
Dominik Wenger
cb55d5c65f rbutil: move extern "C" declaration into mkamsboot.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22319 a1c6a512-1295-4272-9138-f99709370657
2009-08-15 14:09:05 +00:00
Dominik Wenger
a66dfa4ab7 rbutil: add ams sansa targets. (FS#10185)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22317 a1c6a512-1295-4272-9138-f99709370657
2009-08-15 13:04:21 +00:00