Commit graph

115 commits

Author SHA1 Message Date
Rafaël Carré
e4614c4208 mkamsboot: update README
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31380 a1c6a512-1295-4272-9138-f99709370657
2011-12-20 18:48:20 +00:00
Rafaël Carré
6a94f6b551 mkamsboot: don't boot OF when USB is plugged
USB now works on all models

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31379 a1c6a512-1295-4272-9138-f99709370657
2011-12-20 18:48:14 +00:00
Dominik Riebeling
84205025c7 libtools.make: add rule to build a DLL.
This only works for Windows, so you need to use it on Windows or set CROSS
accordingly.

Update mkamsboot to make mkamsboot.dll build and link against ucl.dll.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31333 a1c6a512-1295-4272-9138-f99709370657
2011-12-16 21:10:29 +00:00
Dominik Riebeling
d16cefca95 mkamsboot: convert to use libtools.make.
As a result building mkamsboot for Rockbox Utility will now respect BUILD_DIR,
which should eliminate all possibly remaining issues with dualboot.o.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31283 a1c6a512-1295-4272-9138-f99709370657
2011-12-15 18:45:05 +00:00
Bertrik Sikken
c9a8031695 mkamsboot: add support for sansa clip zip firmware version v1.01.18
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31195 a1c6a512-1295-4272-9138-f99709370657
2011-12-10 09:45:28 +00:00
Rafaël Carré
444b17626f mkamsboot: make clip zip boot OF when pressing left button
pressing vol- to boot OF is still possible

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31112 a1c6a512-1295-4272-9138-f99709370657
2011-12-02 18:31:40 +00:00
Rafaël Carré
ab76a0db28 mkamsboot/dualboot: use arm-elf-eabi cross compiler by default
also allows user to change it with CROSS_COMPILE=xxx

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31111 a1c6a512-1295-4272-9138-f99709370657
2011-12-02 18:31:36 +00:00
Bertrik Sikken
1ab2aa1f28 Sansa clip zip: allow original firmware versions 1.1.12, 1.1.15 and 1.1.17 to be patched
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30860 a1c6a512-1295-4272-9138-f99709370657
2011-10-30 08:09:46 +00:00
Bertrik Sikken
e90f961593 Sansa clip zip: update mkamsboot and fix various drivers to make it boot to the main firmware
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30853 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 17:08:05 +00:00
Bertrik Sikken
94c573f3ec Sansa clipzip: miscellaneous updates
* add support for OF version 01.01.17 in mkamsboot
* introduce and implement oled_brightness function
* configure voltage CVDD2 to 2.8V (like the OF does)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30831 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 14:20:47 +00:00
Bertrik Sikken
1195b2384f sansa clipplus: add version 01.02.16 to mkamsboot as a firmware that can be patched
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30726 a1c6a512-1295-4272-9138-f99709370657
2011-10-07 22:49:37 +00:00
Dominik Riebeling
c7c657ca92 Prevent unnecessary rebuilding of libs.
- When building for Rockbox Utility the called Makefiles would rebuild the libs
  every time. Change dependencies a bit to allow make to properly detect if the
  lib is already up to date.
- Remove dependency on output folder in some cases to avoid unnecessary
  rebuilds.
- Add standard Rockbox header to files lacking it.
- Make make calls from qmake silent.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30608 a1c6a512-1295-4272-9138-f99709370657
2011-09-26 20:51:23 +00:00
Bertrik Sikken
2052540972 sansa clipzip: implement default dualboot code (boots to OF unconditionally for now)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30435 a1c6a512-1295-4272-9138-f99709370657
2011-09-05 18:14:29 +00:00
Bertrik Sikken
463b3ed8b2 Initial framework for the Sandisk Sansa Clip Zip
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30365 a1c6a512-1295-4272-9138-f99709370657
2011-08-27 16:21:19 +00:00
Rafaël Carré
1a6172d2a0 mkamsboot: remove useless casts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30115 a1c6a512-1295-4272-9138-f99709370657
2011-07-02 02:49:01 +00:00
Rafaël Carré
621524e001 mkamsboot: correct old comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30114 a1c6a512-1295-4272-9138-f99709370657
2011-07-02 02:48:54 +00:00
Dominik Riebeling
02dce4500d mkamsboot: restructure model / firmware file information.
Merge the various arrays holding model specific information into a
structure and give it a distinct name. Avoids problems when linking with
Rockbox Utility.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29177 a1c6a512-1295-4272-9138-f99709370657
2011-01-31 20:15:50 +00:00
Dominik Riebeling
e1b1183f40 Tweak Makefiles a bit to allow cross compiling Rockbox Utility.
- pass AR to the lib Makefiles to make sure the correct one gets used.
- create an archive index for archives.
- simplify ucl Makefile a bit.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28883 a1c6a512-1295-4272-9138-f99709370657
2010-12-23 18:59:58 +00:00
Rafaël Carré
b0db713970 mkamsboot: don't boot OF if USB is plugged (AMSv1 only)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27618 a1c6a512-1295-4272-9138-f99709370657
2010-07-29 23:15:55 +00:00
Rafaël Carré
bff5e3d7ab mkamsboot: take in account the additional 0x200 block when calculating size
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-18 17:05:05 +00:00
Rafaël Carré
765c4f1a97 mkamsboot: update outdated comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27442 a1c6a512-1295-4272-9138-f99709370657
2010-07-16 00:05:52 +00:00
Rafaël Carré
f5c79105a4 mkamsboot: fix for newer fuzev2
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-07-16 00:00:29 +00:00
Tobias Diedrich
49a3808ddf Remove the unused ENRD0_USB_STATUS define, I'll leave the other button 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-23 07:05:05 +00:00
Tobias Diedrich
7d15c43bd7 Use DBOP to check for left button on C200v2 like we are supposed to instead of right button
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27080 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 07:01:38 +00:00
Tobias Diedrich
470be759e6 Use DBOP to check for left button on C200v2 like we are supposed to instead of right button
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27079 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 06:57:53 +00:00
Rafaël Carré
27d529e186 mkamsboot / nrv2e_d8.S thubm decompressor : comment the use of mov pc, lr
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26449 a1c6a512-1295-4272-9138-f99709370657
2010-06-01 16:53:26 +00:00
Dominik Riebeling
0dcf93ed18 Use build dir and respect TARGET_DIR when building mkamsboot.
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-27 17:36:39 +00:00
Rafaël Carré
ff6b0425e4 mkamsboot/rbutil/amsinfo : do not try to detect the model of a given Sansa 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-24 10:06:52 +00:00
Rafaël Carré
e2d1eb6fc8 mkamsboot: support Fuzev2 OF 2.03.33
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26230 a1c6a512-1295-4272-9138-f99709370657
2010-05-21 13:13:53 +00:00
Rafaël Carré
d9e508b584 mkamsboot: support Clip+ OF v01.02.15
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26207 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 18:51:49 +00:00
Rafaël Carré
c23a7ccbbc Fuzev2: use enrd0 for USB detection, GPIO didn't work on some models
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26125 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 00:11:42 +00:00
Rafaël Carré
66f183077d Clip+: boot to OF if USB is connected
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-17 21:57:46 +00:00
Marcoen Hirschberg
268f7c42f0 fix mkamsboot compilation on systems where 'make' is not 'GNU make' (FreeBSD for example)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25825 a1c6a512-1295-4272-9138-f99709370657
2010-05-05 10:56:19 +00:00
Rafaël Carré
fdf8e2d1e4 mkamsboot: accept Clip+ OF v01.02.13
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25662 a1c6a512-1295-4272-9138-f99709370657
2010-04-17 12:17:01 +00:00
Rafaël Carré
be920c4fb5 Fix Fuzev2 OF version
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25366 a1c6a512-1295-4272-9138-f99709370657
2010-03-28 02:58:00 +00:00
Rafaël Carré
0d96f9e581 mkamsboot: add fuzev2 OF 2.02.31
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25365 a1c6a512-1295-4272-9138-f99709370657
2010-03-28 02:45:09 +00:00
Rafaël Carré
20fccd8489 mkamsboot: add Clipv2 OF v2.01.35
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25287 a1c6a512-1295-4272-9138-f99709370657
2010-03-22 08:32:04 +00:00
Rafaël Carré
b0e3fc6560 mkamsboot: update README for Clip+/Fuzev2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25218 a1c6a512-1295-4272-9138-f99709370657
2010-03-16 15:24:56 +00:00
Rafaël Carré
a384cdf7e8 mkamsboot: update for Clipv1 OF v01.01.35 (tested)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25213 a1c6a512-1295-4272-9138-f99709370657
2010-03-16 02:11:04 +00:00
Rafaël Carré
1f251ea30d mkamsboot: Use audio master irq_enrd0 usb_status bit instead of gpio on C200V2
FlySpray: FS#11085
Author: Tobias Diedrich

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25088 a1c6a512-1295-4272-9138-f99709370657
2010-03-09 16:29:38 +00:00
Thomas Martitz
5c4659ab29 Correct search&replace error.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25073 a1c6a512-1295-4272-9138-f99709370657
2010-03-08 17:49:06 +00:00
Thomas Martitz
d98520859f Make it easier to change the toolchain in the dualboot Makefile.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25072 a1c6a512-1295-4272-9138-f99709370657
2010-03-08 16:05:11 +00:00
Thomas Martitz
ccefc95d8e Make bin2c ensure that the generated C arrays are 32bit aligned. Building 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-08 16:05:08 +00:00
Rafaël Carré
86f2458269 mkamsboot/dualboot: make the unused vectors be infinite loops
Patch by Tobias Diedrich

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25018 a1c6a512-1295-4272-9138-f99709370657
2010-03-04 00:08:53 +00:00
Thomas Martitz
f6540e800d Sansa Fuzev2: Add mkamsboot and dualboot support. The bootloader doesn't 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-26 13:55:17 +00:00
Rafaël Carré
3b53fe0485 mkamsboot: make sure files depending on dualboot.h are updated
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24915 a1c6a512-1295-4272-9138-f99709370657
2010-02-25 18:08:16 +00:00
Rafaël Carré
c36a644cc6 mkamsboot: use version.sh properly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24843 a1c6a512-1295-4272-9138-f99709370657
2010-02-22 05:41:09 +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
Björn Stenberg
b4f6c6ffba Tweaked dependencies a bit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24770 a1c6a512-1295-4272-9138-f99709370657
2010-02-19 08:09:41 +00:00
Rafaël Carré
75919d5f3d Revert r24763 : LIBOBJS is already included in OBJS
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-19 07:16:51 +00:00