rockbox/rbutil/rbutilqt
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
..
base mkamsboot: prevents 2 potential problems 2010-02-19 14:10:26 +00:00
docs Merge rbutil CREDITS file with main one and use that. 2010-01-24 20:48:38 +00:00
icons Add Save icon and add a note to the about dialog about the origin of the icons. Should have been there much earlier ... 2009-08-16 19:46:41 +00:00
irivertools Completely rework the bootloader installation class: 2008-09-28 17:02:36 +00:00
lang Rockbox Utility polish translation update. 2010-02-12 19:01:16 +00:00
zip Let unzip class accept files created by Info-Zip 3.0 instead of rejecting the files without reporting an error. Seems to not cause negative side effects but further investigation needed. 2009-04-26 13:05:33 +00:00
zlib
aboutbox.ui Add Save icon and add a note to the about dialog about the origin of the icons. Should have been there much earlier ... 2009-08-16 19:46:41 +00:00
browsedirtree.cpp Set the layout direction of the dir tree when setting up the widget. 2010-01-05 22:39:05 +00:00
browsedirtree.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
browsedirtreefrm.ui
configure.cpp Use QFileDialog::getExistingDirectory() for path selection. 2010-02-16 21:34:39 +00:00
configure.h Use QFileDialog::getExistingDirectory() for path selection. 2010-02-16 21:34:39 +00:00
configurefrm.ui Remove column from tree widget -- this is set up by the caller. 2010-02-16 18:30:21 +00:00
createvoicefrm.ui rbutil: improve accessibility a little bit. 2009-06-15 19:41:16 +00:00
createvoicewindow.cpp rbutil: split RbSettings. use Stable/unstable status from server. 2010-01-24 21:12:11 +00:00
createvoicewindow.h rbutil: make RbSettings a static class. (FS#10183 with improvements) 2009-05-09 16:59:14 +00:00
deploy-release.py Merge rbutil CREDITS file with main one and use that. 2010-01-24 20:48:38 +00:00
encttscfggui.cpp rbutil: Explicitly set some widgets layout direction to LTR 2010-01-03 20:04:45 +00:00
encttscfggui.h Set svn:keywords property. 2009-11-06 23:20:51 +00:00
Info.plist Update Rockbox Utility version to 1.2.5 2010-02-12 20:56:04 +00:00
installtalkfrm.ui Name some unnamed GridLayouts. Fixes uic warnings about names being used multiple times. 2009-12-03 21:30:45 +00:00
installtalkwindow.cpp Start with mountpoint as folder to talk selection if old value is invalid. 2010-02-16 21:38:00 +00:00
installtalkwindow.h Use QFileDialog::getExistingDirectory() for path selection. 2010-02-16 21:34:39 +00:00
installwindow.cpp Rename InstallFrm to InstallWindowFrm. 2010-02-16 18:30:24 +00:00
installwindow.h Rename InstallFrm to InstallWindowFrm. 2010-02-16 18:30:24 +00:00
installwindowfrm.ui Rename InstallFrm to InstallWindowFrm. 2010-02-16 18:30:24 +00:00
langstats.py Fix stupid typo in my last commit. How did I miss that? 2010-02-02 21:20:10 +00:00
main.cpp rbutil: Change layout to RTL if Hebrew language is used 2009-10-19 17:38:46 +00:00
osx_deploy.sh rbutil: include the qt accessible plugin into the mac bundle. (Enables screenreader support on macs) 2008-10-13 17:19:45 +00:00
preview.cpp
preview.h Updated our source code header to explicitly mention that we are GPL v2 or 2008-06-28 18:10:04 +00:00
previewfrm.ui
progressloggerfrm.ui Add Save icon and add a note to the about dialog about the origin of the icons. Should have been there much earlier ... 2009-08-16 19:46:41 +00:00
progressloggergui.cpp rbutil: dont write logfile if user aborts filename selection. 2009-08-29 18:55:52 +00:00
progressloggergui.h Fix "Warning: Signals cannot be declared virtual" for progresslogger when building with Qt 4.6. 2009-12-04 21:33:25 +00:00
rbutil.ini Disable D2 in rbutil as discussed in IRC. 2010-02-02 20:19:24 +00:00
rbutilqt-lang.qrc Remove turkish from the languages bundled in the binary. The translation is broken on file level (all non-ASCII characters are broken). 2010-02-11 22:26:38 +00:00
rbutilqt-win.qrc
rbutilqt.cpp rbutil: fix voice downloads. 2010-02-18 19:47:09 +00:00
rbutilqt.h Restore the default message handler on application shutdown. Fixes sporadic segfaults on exit. 2010-02-11 19:51:50 +00:00
rbutilqt.manifest
rbutilqt.pro Rename InstallFrm to InstallWindowFrm. 2010-02-16 18:30:24 +00:00
rbutilqt.qrc Merge rbutil CREDITS file with main one and use that. 2010-01-24 20:48:38 +00:00
rbutilqt.rc
rbutilqtfrm.ui Restore the default message handler on application shutdown. Fixes sporadic segfaults on exit. 2010-02-11 19:51:50 +00:00
sysinfo.cpp rbutil: add a errorlog function into rbutil and the possibility to save a log if a error happens. (thanks to bluebrother for the trace functionality) 2009-08-15 17:02:25 +00:00
sysinfo.h rbutil: add a errorlog function into rbutil and the possibility to save a log if a error happens. (thanks to bluebrother for the trace functionality) 2009-08-15 17:02:25 +00:00
sysinfofrm.ui
systrace.cpp FS#10748 - rbutil: Explicitly override GUI layout direction setting for some widgets 2009-10-31 17:16:34 +00:00
systrace.h rbutil: add a errorlog function into rbutil and the possibility to save a log if a error happens. (thanks to bluebrother for the trace functionality) 2009-08-15 17:02:25 +00:00
systracefrm.ui Add Save icon and add a note to the about dialog about the origin of the icons. Should have been there much earlier ... 2009-08-16 19:46:41 +00:00
themesinstallfrm.ui Rename ThemeInstall class files to actually match the class name. 2009-03-31 19:50:43 +00:00
themesinstallwindow.cpp rbutil: split RbSettings. use Stable/unstable status from server. 2010-01-24 21:12:11 +00:00
themesinstallwindow.h rbutil: make RbSettings a static class. (FS#10183 with improvements) 2009-05-09 16:59:14 +00:00
uninstallfrm.ui fix typo (and update translations for it) 2008-07-06 18:07:44 +00:00
uninstallwindow.cpp rbutil: make RbSettings a static class. (FS#10183 with improvements) 2009-05-09 16:59:14 +00:00
uninstallwindow.h rbutil: make RbSettings a static class. (FS#10183 with improvements) 2009-05-09 16:59:14 +00:00
version.h Update Rockbox Utility version to 1.2.5 2010-02-12 20:56:04 +00:00