summaryrefslogtreecommitdiff
path: root/rbutil/mkamsboot
AgeCommit message (Collapse)Author
2010-03-08Correct search&replace error.Thomas Martitz
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 Martitz
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 Martitz
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é
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 Martitz
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é
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24915 a1c6a512-1295-4272-9138-f99709370657
2010-02-22mkamsboot: use version.sh properlyRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24843 a1c6a512-1295-4272-9138-f99709370657
2010-02-19mkamsboot: prevents 2 potential problemsRafaël Carré
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 Stenberg
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é
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é
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é
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é
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 Sikken
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 Halpin
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 Halpin
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 Halpin
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 Chicoine
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é
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 Riebeling
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 Riebeling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23871 a1c6a512-1295-4272-9138-f99709370657
2009-11-28Fix building universal binaries.Dominik Riebeling
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 Riebeling
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é
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23571 a1c6a512-1295-4272-9138-f99709370657
2009-11-04Remove unused variable.Dominik Riebeling
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 Riebeling
- 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 Riebeling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23505 a1c6a512-1295-4272-9138-f99709370657
2009-10-31FS#10741 - rbutil: Fix mkamsboot Makefile dependanciesTomer Shalev
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23443 a1c6a512-1295-4272-9138-f99709370657
2009-10-11mkamsboot: allow the version string to be overridden from the commandline - ↵Dave Chapman
e.g. "make APPVERSION=v1.1 mkamsboot". git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23097 a1c6a512-1295-4272-9138-f99709370657
2009-10-10mkamsboot: support Fuze OF v 1.02.28Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23067 a1c6a512-1295-4272-9138-f99709370657
2009-10-09mkamsboot: build and package (dmg) an universal OSX binaryRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23034 a1c6a512-1295-4272-9138-f99709370657
2009-10-08Don't warn if the archive has to be created.Dominik Riebeling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23013 a1c6a512-1295-4272-9138-f99709370657
2009-09-05Make mkamsboot Makefile operate silent per default.Dominik Riebeling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22629 a1c6a512-1295-4272-9138-f99709370657
2009-09-04rbutil: modify buildsystem so you can build outside of the rbutilqt ↵Dominik Wenger
directoy. (similar to the normal buildsystem). Attention: Spaces in the path will cause errors. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22624 a1c6a512-1295-4272-9138-f99709370657
2009-09-04Explicitly set CC to prevent make trying to use cc instead. Fixes build ↵Dominik Riebeling
issues on w32. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22623 a1c6a512-1295-4272-9138-f99709370657
2009-08-15Make mkamsboot Makefile more silent.Dominik Riebeling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22320 a1c6a512-1295-4272-9138-f99709370657
2009-08-15rbutil: move extern "C" declaration into mkamsboot.h Dominik Wenger
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22319 a1c6a512-1295-4272-9138-f99709370657
2009-08-15mkamsboot: move intermediate files into a build directory and allow building ↵Dominik Wenger
of a universal lib (for macs) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22318 a1c6a512-1295-4272-9138-f99709370657
2009-08-15rbutil: add ams sansa targets. (FS#10185)Dominik Wenger
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22317 a1c6a512-1295-4272-9138-f99709370657
2009-07-17mkamsboot: remove runtime copyright noticeRafaël Carré
add a cast to remove a warning in printf() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21925 a1c6a512-1295-4272-9138-f99709370657
2009-07-05Change to versioning for mkamsboot to <rXXXXX>-<DATE> for svn builds. A ↵Thomas Martitz
fixed number like 1.1 can (and should) be used for releases. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21652 a1c6a512-1295-4272-9138-f99709370657
2009-07-05mkamsboot: change version string to 1.1, move devices list in the headerRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21650 a1c6a512-1295-4272-9138-f99709370657
2009-07-05Slightly rewrite some parts of mkamsboot for better output and some sanity ↵Thomas Martitz
in the early array declarations. No functional change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21648 a1c6a512-1295-4272-9138-f99709370657
2009-06-04mkamsboot: refuse to patch an untested OF, and provide a list of tested OF ↵Rafaël Carré
versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21189 a1c6a512-1295-4272-9138-f99709370657
2009-05-28mkamsboot : brackets at the start of functions must be on their line - ↵Rafaël Carré
thanks to linuxstb for noticing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21122 a1c6a512-1295-4272-9138-f99709370657
2009-05-28FS#10253 : mkamsboot v1.0Rafaël Carré
- Bump version to 1.0 - Add Clipv2 target - Make mkamsboot work as a library (work by domonoky : FS#10185, with a few modifications by me) . Use a macro with variadic arguments for error cases in functions which might error. . Add detailed descriptions to functions exported by the library (in the header file) - modify bin2c.c to produce only one pair of .c/.h files with several files embedded in it - move files needing to be built by an ARM cross compiler into dualboot/ - commit produced .c/.h files (containing nrv2e_d8.S and dualboot.S built for Clip, Fuze, e200v2, c200v2, m200v4, Clipv2) - Write a real README file - cosmetics: indent dualboot.S properly, remove trailing spaces, limit lines to 80 characters - comments: add/correct comments in dualboot.S and mkamsboot.c - move back extract_fw.c to utils/AMS/hacking git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21118 a1c6a512-1295-4272-9138-f99709370657
2009-05-25mkamsboot: really error out if OF model is different from bootloader modelRafaël Carré
Error out if firmware md5sum isn't known, and leave the current code #if 0'ed for easier testing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21073 a1c6a512-1295-4272-9138-f99709370657
2009-05-22mkamsboot : use left button for dual boot on Sansa Clip for consistency with ↵Rafaël Carré
other Sansa models git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21029 a1c6a512-1295-4272-9138-f99709370657
2009-05-22mkamsboot : remove a misleading comment (we only use IRAM)Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21028 a1c6a512-1295-4272-9138-f99709370657
2009-04-11Support Fuze 01.02.26 OF version.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20688 a1c6a512-1295-4272-9138-f99709370657