rockbox/utils/MTP/beastpatcher
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
..
vs2005 Adjust mknkboot sources path to recently changed location. 2009-11-01 10:47:58 +00:00
beastpatcher.c mknkboot/beastpatcher: implement basic firmware validation 2021-06-12 06:32:08 +00:00
beastpatcher.h Add non-interactive mode to beastpatcher. 2009-09-24 17:07:08 +00:00
main.c Fix a typo spotted from r30864. 2011-10-30 11:58:33 +00:00
Makefile mknkboot/beastpatcher: implement basic firmware validation 2021-06-12 06:32:08 +00:00
md5.c mknkboot/beastpatcher: implement basic firmware validation 2021-06-12 06:32:08 +00:00
md5.h mknkboot/beastpatcher: implement basic firmware validation 2021-06-12 06:32:08 +00:00
mknkboot.c mknkboot/beastpatcher: implement basic firmware validation 2021-06-12 06:32:08 +00:00
mknkboot.h mknkboot/beastpatcher: implement basic firmware validation 2021-06-12 06:32:08 +00:00
mtp_common.h beastpatcher: check WMP version. 2011-10-30 11:01:00 +00:00
mtp_libmtp.c beastpatcher: fix some minor issues 2021-06-11 19:32:55 +00:00
mtp_win32.c beastpatcher: check WMP version. 2011-10-30 11:01:00 +00:00
pstdint.h Implement sendfirm functionality in beastpatcher. Set svn:eol-style properties. 2009-06-12 16:35:34 +00:00
README Correct the bootloader download path. 2009-10-31 00:25:29 +00:00
README.pstdint Implement sendfirm functionality in beastpatcher. Set svn:eol-style properties. 2009-06-12 16:35:34 +00:00
TODO

beastpatcher - a tool for installing the Rockbox bootloader on the Gigabeat S

Unlike most other parts of the Rockbox project, this tool is
distributed under the BSD license.  This is due to the fact that the
Windows version links with the Microsoft MTP library.



Building instructions - All OSes
--------------------------------

For all versions, you need to copy a "bootloader.bin" file (containing
the Rockbox bootloader) into this directory.

This can be built from the Rockbox source by selecting "41" and then
"B" when running tools/configure.

You need the Rockbox toolchain to build any Rockbox target binaries -
this can be downloaded and built with the tools/rockboxdev.sh script.

The latest officially released bootloader can always be downloaded from:

http://download.rockbox.org/bootloader/toshiba/gigabeat-s/



Linux
-----

The Unix versions requires libmtp, which in turn requires libusb.

beastpatcher is built to statically link to these libraries and
expects them to exist as /usr/lib/libmtp.a and /usr/lib/libusb.a
respectively.  Change the definition of LIBS in the Makefile if this
is not the case for your system.

After this, just type "make" to get a 



OS X
----

The OS X build is a universal binary statically linked with libusb and libmtp. 
It has been tested with libusb version 0.1.12 and libmtp version 1.0.1.

The following files are expected the beaspatcher source directory:

Intel:
    libusb: usb.h libusb-i386.a
    libmtp: libmtp.h libmtp-i386.a
    
PowerPC:
    libusb: usb.h libusb-ppc.a
    libmtp: libmtp.h libmtp-ppc.a

These are easily compiled from source using the standard 
'./configure && make'. Look in .libs for libusb.a and src/.libs for libmtp.a, 
and make sure to rename them to their -i386/-ppc filenames when copying into 
the beastpatcher directory.

After this, just type "make beastpatcher-mac" to get a universal binary. If you
only want a binary for a particular architecture, you can use
"make beastpatcher-i386" or "make beastpatcher-ppc" instead. In this case, you
only need the libusb and libmtp library for your desired architecture.


Windows
-------

The MTP_DLL.dll requires VC2005 to compile - see instructions in
MTP_DLL/README

To compile beastpatcher itself, you can either cross-compile from
Linux using the mingw32 package, or compile in Cygwin.  Just type
"make beastpatcher.exe" (in Linux) or "make" (in Cygwin).

To run beastpatcher.exe, you need MTP_DLL.dll in the same directory
(or the Windows DLL path).

Alternatively, beastpatcher can be built as binary that includes the
MTP functionality and thus doesn't require the MTP_DLL. Building has
the additional requirements as building the MTP_DLL. A VS2005 project
file is available.