summaryrefslogtreecommitdiffstats
path: root/rbutil/mkamsboot
AgeCommit message (Collapse)AuthorFilesLines
2010-07-29mkamsboot: don't boot OF if USB is plugged (AMSv1 only)mkamsboot_1.4Rafaël Carré3-121/+48
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27618 a1c6a512-1295-4272-9138-f99709370657
2010-07-18mkamsboot: take in account the additional 0x200 block when calculating sizeRafaël Carré2-12/+14
Align sizes of different blocks on mkamsboot output git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27482 a1c6a512-1295-4272-9138-f99709370657
2010-07-16mkamsboot: update outdated commentRafaël Carré1-6/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27442 a1c6a512-1295-4272-9138-f99709370657
2010-07-16mkamsboot: fix for newer fuzev2Rafaël Carré4-173/+162
These models are restricted to OF >= v02.3.31, probably because of a hardware change The OF checks a version string located between 0x0 and 0x200 in the firmware block, so let's keep this part unmodified We put our dualboot code at 0x200, and insert a branch + vectors at 0x0 That way our patched file will present the OF version to the fuzev2 OF patching it, and we only waste 512 bytes on other models git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27441 a1c6a512-1295-4272-9138-f99709370657
2010-06-23Remove the unused ENRD0_USB_STATUS define, I'll leave the other button ↵Tobias Diedrich1-1/+0
defines in, maybe someone wants his bootloader to use one of those instead ;) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27081 a1c6a512-1295-4272-9138-f99709370657
2010-06-23Use DBOP to check for left button on C200v2 like we are supposed to instead ↵Tobias Diedrich3-14/+19
of right button git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27080 a1c6a512-1295-4272-9138-f99709370657
2010-06-23Use DBOP to check for left button on C200v2 like we are supposed to instead ↵Tobias Diedrich1-7/+52
of right button git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27079 a1c6a512-1295-4272-9138-f99709370657
2010-06-01mkamsboot / nrv2e_d8.S thubm decompressor : comment the use of mov pc, lrRafaël Carré1-1/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26449 a1c6a512-1295-4272-9138-f99709370657
2010-05-27Use build dir and respect TARGET_DIR when building mkamsboot.Dominik Riebeling1-2/+4
libmkamsboot still did put files into its source folder when building for Rockbox Utility out-of-tree. As with the other libraries use the specified build folder. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26335 a1c6a512-1295-4272-9138-f99709370657
2010-05-24mkamsboot/rbutil/amsinfo : do not try to detect the model of a given Sansa ↵Rafaël Carré4-65/+41
AMS OF The field we thought was representative of the model is not, it has changed in the past for fuzev1 and fuzev2. For example the value 0x23 is found in 2 old fuzev1 OF versions, and in the c200v2 OF The only reliable way to detect the model of a given OF is by using the built-in list of md5sums. Modify mkamsboot and rbutilqt to load the rockbox bootloader first, and then check if the model in the bootloader corresponds to the model of the known md5sum of the given OF. That way we can continue to present the user with a list of known OF versions in case the OF is unknown to mkamsboot Also explicit the dependency of main.c on mkamsboot.h in case the prototypes change Correct the header's description not updated in r21648 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26248 a1c6a512-1295-4272-9138-f99709370657
2010-05-21mkamsboot: support Fuzev2 OF 2.03.33Rafaël Carré1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26230 a1c6a512-1295-4272-9138-f99709370657
2010-05-20mkamsboot: support Clip+ OF v01.02.15Rafaël Carré1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26207 a1c6a512-1295-4272-9138-f99709370657
2010-05-18Fuzev2: use enrd0 for USB detection, GPIO didn't work on some modelsRafaël Carré3-46/+66
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26125 a1c6a512-1295-4272-9138-f99709370657
2010-05-17Clip+: boot to OF if USB is connectedRafaël Carré4-13/+85
To be sure that there is no mistake in this code, it is run *after* the known to work HOME & LEFT buttons checks, unlike other Sansas git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26122 a1c6a512-1295-4272-9138-f99709370657
2010-05-05fix mkamsboot compilation on systems where 'make' is not 'GNU make' (FreeBSD ↵Marcoen Hirschberg1-1/+1
for example) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25825 a1c6a512-1295-4272-9138-f99709370657
2010-04-17mkamsboot: accept Clip+ OF v01.02.13Rafaël Carré1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25662 a1c6a512-1295-4272-9138-f99709370657
2010-03-28Fix Fuzev2 OF versionRafaël Carré1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25366 a1c6a512-1295-4272-9138-f99709370657
2010-03-28mkamsboot: add fuzev2 OF 2.02.31Rafaël Carré1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25365 a1c6a512-1295-4272-9138-f99709370657
2010-03-22mkamsboot: add Clipv2 OF v2.01.35mkamsboot_1.2Rafaël Carré1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25287 a1c6a512-1295-4272-9138-f99709370657
2010-03-16mkamsboot: update README for Clip+/Fuzev2Rafaël Carré1-2/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25218 a1c6a512-1295-4272-9138-f99709370657
2010-03-16mkamsboot: update for Clipv1 OF v01.01.35 (tested)Rafaël Carré1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25213 a1c6a512-1295-4272-9138-f99709370657
2010-03-09mkamsboot: Use audio master irq_enrd0 usb_status bit instead of gpio on C200V2Rafaël Carré3-16/+91
FlySpray: FS#11085 Author: Tobias Diedrich git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25088 a1c6a512-1295-4272-9138-f99709370657
2010-03-08Correct search&replace error.Thomas Martitz1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25073 a1c6a512-1295-4272-9138-f99709370657
2010-03-08Make it easier to change the toolchain in the dualboot Makefile.Thomas Martitz1-14/+14
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25072 a1c6a512-1295-4272-9138-f99709370657
2010-03-08Make bin2c ensure that the generated C arrays are 32bit aligned. Building ↵Thomas Martitz1-2/+9
nrv2e_d8 with the eabi toolchain breaks this assumption git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25071 a1c6a512-1295-4272-9138-f99709370657
2010-03-04mkamsboot/dualboot: make the unused vectors be infinite loopsRafaël Carré2-24/+25
Patch by Tobias Diedrich git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25018 a1c6a512-1295-4272-9138-f99709370657
2010-02-26Sansa Fuzev2: Add mkamsboot and dualboot support. The bootloader doesn't ↵Thomas Martitz6-4/+44
work, but pressing |<< or inserting USB to boot the OF does. It should be pretty safe to run test code on it now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24924 a1c6a512-1295-4272-9138-f99709370657
2010-02-25mkamsboot: make sure files depending on dualboot.h are updatedRafaël Carré1-0/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24915 a1c6a512-1295-4272-9138-f99709370657
2010-02-22mkamsboot: use version.sh properlyRafaël Carré1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24843 a1c6a512-1295-4272-9138-f99709370657
2010-02-19mkamsboot: prevents 2 potential problemsRafaël Carré6-135/+207
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-19Tweaked dependencies a bitBjörn Stenberg1-14/+10
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24770 a1c6a512-1295-4272-9138-f99709370657
2010-02-19Revert r24763 : LIBOBJS is already included in OBJSRafaël Carré1-1/+1
The problem seems related to dependency on a directory git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24765 a1c6a512-1295-4272-9138-f99709370657
2010-02-19mkamsboot binary depends on the same object files than libmkamsbootRafaël Carré1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24763 a1c6a512-1295-4272-9138-f99709370657
2010-02-17Clip+ remove setting GPIOB PIN0, it seems needed only for powerRafaël Carré3-35/+16
Also only use 0x50000 bytes of memory since the files just fit in. TODO: make mkamsboot abort if the decompressed OF or bootloader doesn't fit in RAM / or overlap on compressed data or uclunpack function git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24727 a1c6a512-1295-4272-9138-f99709370657
2010-02-17mkamsboot: update dualboot.c / dualboot.h in placeRafaël Carré2-7/+6
This removes the need for copying these files to ../ and removes the risk of only copying one of the files (which led to bricking 2 c200v2 already) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24719 a1c6a512-1295-4272-9138-f99709370657
2010-02-13Include dualboot.h in dualboot.c as an additional compile time sanity checkBertrik Sikken2-0/+3
Author: Tobias Diedrich Flyspray: FS #11009 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24636 a1c6a512-1295-4272-9138-f99709370657
2010-02-10Sansa Clip+: Unset B0 correctly in dualboot.SJack Halpin2-7/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24582 a1c6a512-1295-4272-9138-f99709370657
2010-02-09Sansa Clip+: Unset pin B0 correctly in dualboot.SJack Halpin2-8/+8
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24573 a1c6a512-1295-4272-9138-f99709370657
2010-02-08Sansa Clip+ : Add dualboot support for sansa clip+ to mkamsboot.Jack Halpin4-17/+43
Dualboot works on the sansa clip+ by holding either the left "|<<" or home buttons. The USB pin is still undiscovered at this point and should replace the home button when found. By including the home button for dualboot we avoid bricking due to a single button failure. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24561 a1c6a512-1295-4272-9138-f99709370657
2010-01-21Update mkamsboot for Fuze OF 01.02.31Michael Chicoine1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24311 a1c6a512-1295-4272-9138-f99709370657
2010-01-13Add Sansa Clip+ target to test mkamsbootRafaël Carré7-7/+47
UNTESTED, could ver well brick your Clip+ If it works, booting should just be delayed by a small delay (perhaps not noticeable) Hopefully the Clipv2 checks will work for Clip+ and then we'll be able to test the other Clipv2 code (LCD/button) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24219 a1c6a512-1295-4272-9138-f99709370657
2009-12-13Make lipo calls silent.Dominik Riebeling1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23982 a1c6a512-1295-4272-9138-f99709370657
2009-12-06Remove special lib Makefile targets that aren't used anymore.Dominik Riebeling1-5/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23871 a1c6a512-1295-4272-9138-f99709370657
2009-11-28Fix building universal binaries.Dominik Riebeling1-1/+0
When building various libraries for Rockbox Utility make sure they use the same compiler as Qt. Pass Qt's CC instead of explicitly setting it. This fixes issues linking on OS X (with recent XCode building universal binaries requires the use of gcc-4-0 while the default one is 4.2). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23779 a1c6a512-1295-4272-9138-f99709370657
2009-11-28Handle TARGET_DIR in universal library building.Dominik Riebeling1-3/+3
Building universal libraries needs to take TARGET_DIR into account as when set the individual libraries are placed into the build output folder and didn't got found anymore. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23778 a1c6a512-1295-4272-9138-f99709370657
2009-11-08mkamsboot: fix linking (typo from r23520)Rafaël Carré1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23571 a1c6a512-1295-4272-9138-f99709370657
2009-11-04Remove unused variable.Dominik Riebeling1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23523 a1c6a512-1295-4272-9138-f99709370657
2009-11-04Clean up mkamsboot building. No functional changes.Dominik Riebeling4-151/+199
- split out standalone functions to a separate file. - adjust and clean up Makefile. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23520 a1c6a512-1295-4272-9138-f99709370657
2009-11-03Fix building of Rockbox Utility by restoring object list for libmkamsboot.aDominik Riebeling1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23505 a1c6a512-1295-4272-9138-f99709370657
2009-10-31FS#10741 - rbutil: Fix mkamsboot Makefile dependanciesTomer Shalev1-11/+14
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23443 a1c6a512-1295-4272-9138-f99709370657