Commit graph

33 commits

Author SHA1 Message Date
James Buren
3831051c47 mknkboot: optimize verifyfirm
The checksum only needs to be calculated once. A small oversight on
my initial implementation.

Change-Id: Ie23faf36f5add7ed7f146769b604dbd8204c2605
2021-06-17 15:30:51 +00:00
James Buren
a90ef8195b mknkboot/beastpatcher: implement basic firmware validation
This imports the MD5 code used by other utilities and creates
a function for checking the provided NK.bin against known original
firmware checksums. Integration into mknkboot and beastpatcher is
also added.

For the sake of consistency with beastpatcher, mknkboot had its
printf statements rewrote to print to stderr like beastpatcher
does.

Change-Id: I0e52271d8d627a5b02302ab5cd1da2815b7cec1e
2021-06-12 06:32:08 +00:00
James Buren
fe9bcd0468 beastpatcher: fix some minor issues
This mainly fixes some compiler warnings and makes it
work with mingw64.

Change-Id: Iabd13b5bed3427869ae78ceeb7e2255e68a6f7bd
2021-06-11 19:32:55 +00:00
Dominik Riebeling
6f92c498c4 beastpatcher: don't hardcode lib paths.
Let the linker find libmtp / libusb. Also don't insist on linking them
statically -- current Debian doesn't have a static libmtp.
Set STATIC to force linking statically.

Change-Id: I3ce9cea832705c87f08054435eadf9f169afedb2
2020-08-05 23:48:43 +02:00
Robert Menes
b674751974 Fix a typo spotted from r30864.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30865 a1c6a512-1295-4272-9138-f99709370657
2011-10-30 11:58:33 +00:00
Dominik Riebeling
1e74ef639d beastpatcher: check WMP version.
The current implementation fails silently if Windows Media Player is version
10. Add a check and inform the user if the version installed is too old to work
properly with beastpatcher.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30864 a1c6a512-1295-4272-9138-f99709370657
2011-10-30 11:01:00 +00:00
Thomas Jarosch
51ae2e6ffc Don't close file descriptor twice
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30352 a1c6a512-1295-4272-9138-f99709370657
2011-08-25 20:38:27 +00:00
Dominik Riebeling
9d242ab167 Add error messages to a few more failure cases to beastpatcher.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26978 a1c6a512-1295-4272-9138-f99709370657
2010-06-19 21:27:43 +00:00
Rafaël Carré
c0bd4173aa Make sure files which aren't windows-specific use \n line endings only
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26893 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 16:59:51 +00:00
Robert Menes
9096114bd3 Revert an accidental commit that I didn't want to go in.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23839 a1c6a512-1295-4272-9138-f99709370657
2009-12-04 02:54:27 +00:00
Robert Menes
29d20d8068 Another round of plugin keymaps for the Philips GoGear SA9200.
Just a few more to go...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23838 a1c6a512-1295-4272-9138-f99709370657
2009-12-03 23:13:45 +00:00
Dominik Riebeling
46da0818af Adjust mknkboot sources path to recently changed location.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23458 a1c6a512-1295-4272-9138-f99709370657
2009-11-01 10:47:58 +00:00
Dave Chapman
a9f3dde79c Correct the bootloader download path.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23431 a1c6a512-1295-4272-9138-f99709370657
2009-10-31 00:25:29 +00:00
Barry Wardell
9a765817d7 Add support for building OSX disk image of beastpatcher.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23424 a1c6a512-1295-4272-9138-f99709370657
2009-10-30 21:07:06 +00:00
Barry Wardell
304fcbe633 Get beastpatcher working on OSX.
I don't know why we need to split the compiling and linking steps on OSX, but this was the only way
I could get static linking against libusb and libmtp to work.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23418 a1c6a512-1295-4272-9138-f99709370657
2009-10-30 13:31:04 +00:00
Dominik Riebeling
1992c389ae Update bootloader download location and add a note about building with VS2005.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23381 a1c6a512-1295-4272-9138-f99709370657
2009-10-28 20:51:41 +00:00
Dominik Riebeling
b82963bd9d Move mknkboot.[ch] to beastpatcher folder.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23372 a1c6a512-1295-4272-9138-f99709370657
2009-10-27 21:15:21 +00:00
Dominik Riebeling
55cd14f875 Make beastpatcher build with VS2005 again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22821 a1c6a512-1295-4272-9138-f99709370657
2009-09-24 20:46:19 +00:00
Dominik Riebeling
0cab10e2f5 Add non-interactive mode to beastpatcher.
- Extend beastpatcher() to optionally work non-interactively.
- Don't ask for confirmation if beastpatcher was started with command line arguments.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22820 a1c6a512-1295-4272-9138-f99709370657
2009-09-24 17:07:08 +00:00
Dominik Riebeling
6d1d9bed3e Integrate mknkboot into beastpatcher.
Add a new option to beastpatcher to patch and upload an original firmware file.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22745 a1c6a512-1295-4272-9138-f99709370657
2009-09-20 08:28:18 +00:00
Dominik Riebeling
1b1bd7ef46 Fix signedness mismatch.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22733 a1c6a512-1295-4272-9138-f99709370657
2009-09-18 21:36:33 +00:00
Dominik Riebeling
d6b219387c Extend beastpatcher command line.
- prepare for building without included bootloader binary
- allow specifying a bootloader.bin file on the command line



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22479 a1c6a512-1295-4272-9138-f99709370657
2009-08-23 20:06:46 +00:00
Dominik Riebeling
73f9bde908 Make bin2c compile with VS2005 and move it to a separate folder as its getting used by different tools now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21272 a1c6a512-1295-4272-9138-f99709370657
2009-06-13 14:15:50 +00:00
Dominik Riebeling
1c83e6ab90 Refactor sendfirm functionality in beastpatcher and do some code police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21271 a1c6a512-1295-4272-9138-f99709370657
2009-06-13 14:03:31 +00:00
Dominik Riebeling
ef4e8b2d81 Build beastpatcher by incorporating the MTP_DLL code instead of linking the DLL.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21270 a1c6a512-1295-4272-9138-f99709370657
2009-06-13 08:58:48 +00:00
Dominik Riebeling
94823c65ac Fix beastpatcher on linux and code police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21263 a1c6a512-1295-4272-9138-f99709370657
2009-06-12 17:12:41 +00:00
Dominik Riebeling
11fa12c366 Implement sendfirm functionality in beastpatcher. Set svn:eol-style properties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21260 a1c6a512-1295-4272-9138-f99709370657
2009-06-12 16:35:34 +00:00
Dominik Riebeling
864a4787b0 Allow building beastpatcher with libmtp 0.2.[0-5].
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21249 a1c6a512-1295-4272-9138-f99709370657
2009-06-11 19:55:28 +00:00
Dominik Riebeling
20a78a36f3 Remove never used code -- libmtp is not used on Windows.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21227 a1c6a512-1295-4272-9138-f99709370657
2009-06-08 22:33:36 +00:00
Dominik Riebeling
eebde2a367 Major W32 beastpatcher rework (FS#10220).
Update beastpatcher to scan for the device separately, rework MTP_DLL and modify to allow building with VS2005.
- include pstdint.h when building with VS2005 as VS doesn't have inttypes.h
- don't use bool in the DLL as VS doesn't support type bool in C.
- rearrange DLL files to avoid filename ambiguities with sendfirm.
- include MTP_DLL.h instead of duplicating prototypes. Adjust header for easy inclusion.
- make MTP_DLL project file also copy the resulting dll to MTP folder for convenience.
- extend MTP_DLL API for separate device scanning. Note that this (intentionally) breaks compatibility of the dll.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21221 a1c6a512-1295-4272-9138-f99709370657
2009-06-08 18:04:10 +00:00
Dominik Riebeling
1af18d52af Support building beastpatcher with MinGW.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20960 a1c6a512-1295-4272-9138-f99709370657
2009-05-16 10:51:20 +00:00
Dave Chapman
93f4bd351b Initial (untested) attempt at a Windows version. The MTP_DLL.dll library needs expanding to offer the same API as mtp_libmtp.c, but this needs someone with access to a MS compiler. Ideally we should also stop using a separate DLL and compile a single standalone beastpatcher.exe.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20088 a1c6a512-1295-4272-9138-f99709370657
2009-02-22 23:35:29 +00:00
Dave Chapman
c06071e2e7 Initial version of a BSD-licensed beastpatcher utility for Gigabeat S installation. Currently only compiles on Linux, but Windows and OS X support are planned.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20083 a1c6a512-1295-4272-9138-f99709370657
2009-02-22 13:54:46 +00:00