Commit graph

16 commits

Author SHA1 Message Date
Dominik Riebeling
9d8bcbeb2a sansapatcher: rework exit code handling.
- #define all exit codes and use them for indicating further errors.
- only enable interactive (i.e. wait for keypress before exiting) mode
  when built with bootloaders.

Change-Id: I6dcbc51226aadc4ab640bf260b6331ddbd4773cc
2020-09-27 09:28:15 +02:00
Dominik Riebeling
9c1ed84d28 sansapatcher: move sectorbuf pointer into sansa_t structure.
Similar as the ipod_t structure for ipodpatcher the sansa_t structure holds all
relevant information for sansapatcher. Put the global sansa_sectorbuf pointer
into it as well.

Change-Id: Iad08ef6aafc49609c3d0d556914246f230ee0179
2013-01-01 15:06:34 +01:00
Dominik Riebeling
ab49b5e77b MSVC compatibility adjustments.
When using a global variable from a DLL with MSVC special handling is necessary
to avoid going through additional redirection.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31640 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 19:51:11 +00:00
Dominik Riebeling
38f03d4eae sansapatcher: factor out handling of bundled bootloaders.
Instead of handling bundled bootloaders in the sansapatcher functions leave
that to the caller. This removes the need to have Rockbox Utility specific
parts in sansapatcher. sansa_add_bootloader() now operates on an already loaded
bootloader. For loading a convenience function sansa_read_bootloader() is
added. This also introduces a new check on loading to prevent installing an
e200 bootloader on a c200 (and vice versa).

These changes will allow building a libsansapatcher for linking with Rockbox
Utility later.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31144 a1c6a512-1295-4272-9138-f99709370657
2011-12-04 19:40:43 +00:00
Dominik Riebeling
08a27c1df7 Let sansa_list_images() return the number of mi4 images found.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18074 a1c6a512-1295-4272-9138-f99709370657
2008-07-16 18:46:37 +00:00
Bertrik Sikken
d4e3839f05 Make functions in sansapatcher static and their arguments const if possible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18037 a1c6a512-1295-4272-9138-f99709370657
2008-07-14 16:43:47 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Dominik Riebeling
d131a31266 Rename variables sectorbuf and verbose to avoid clashes in rbutil. Cleanup exports a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17730 a1c6a512-1295-4272-9138-f99709370657
2008-06-17 17:52:13 +00:00
Dominik Riebeling
3f65a7051f Move C linkage binding for c++ to exporting header files instead of includes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17609 a1c6a512-1295-4272-9138-f99709370657
2008-05-22 17:51:35 +00:00
Barry Wardell
080889a135 Add support for installing/replacing the bootloader in the PPBL section of the firmware partition. Allows installation of the Rockbox bootloader in place of the Sandisk one. This expects a plain bootloader binary with no header. Our Rockbox bootloader successfully boots both Rockbox and the OF when installed in this way. This makes it easy to get to a state where e200tool is required, so care is advised.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15108 a1c6a512-1295-4272-9138-f99709370657
2007-10-14 18:09:40 +00:00
Dave Chapman
8d145a5574 Initial attempt at c200 support - you now need both a "firmware.mi4" file (c200 bootloader) and "PP5022.mi4" file (e200 bootloader) to compile. sansapatcher should detect the device type and install the correct bootloader.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14755 a1c6a512-1295-4272-9138-f99709370657
2007-09-19 18:46:54 +00:00
Barry Wardell
6a0ec8bfa8 Add --update-original-firmware (or -of) option to sansapatcher. This allows for changing the original firmware version when the rockbox bootloader is also present.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14138 a1c6a512-1295-4272-9138-f99709370657
2007-08-02 11:39:43 +00:00
Dave Chapman
be2971646f Some code rearrangement and function renaming to help incorporation into rbutil without clashing with ipodpatcher.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12797 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 00:23:23 +00:00
Dave Chapman
e815601afb Implement the ability to embed a bootloader in sansapatcher - the --install option installs the embedded bootloader, and running without any parameters will cause a prompt to be displayed asking the user if they want to install, uninstall or cancel. sansapatcher now requres a PP5022.mi4 file (the Rockbox bootloader) in the current directory when building.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12794 a1c6a512-1295-4272-9138-f99709370657
2007-03-15 23:26:47 +00:00
Dave Chapman
4a81291284 Correct the svn:keywords
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12793 a1c6a512-1295-4272-9138-f99709370657
2007-03-15 23:02:37 +00:00
Dave Chapman
e17043ead7 Initial commit of sansapatcher - an installation tool for the Sansa E200.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12792 a1c6a512-1295-4272-9138-f99709370657
2007-03-15 22:55:36 +00:00