diff options
| author | Dave Chapman <dave@dchapman.com> | 2006-08-30 23:17:04 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2006-08-30 23:17:04 +0000 |
| commit | 530f31dbe9fe404d41fd21867c8ed9cec1addd96 (patch) | |
| tree | ec4caa9ead19f3e0756e4cb02bf11d6f8e4163e2 /tools/scramble.c | |
| parent | e379225754b326806df1a037a7610e3b2c1a11bc (diff) | |
| download | rockbox-530f31dbe9fe404d41fd21867c8ed9cec1addd96.zip rockbox-530f31dbe9fe404d41fd21867c8ed9cec1addd96.tar.gz rockbox-530f31dbe9fe404d41fd21867c8ed9cec1addd96.tar.bz2 rockbox-530f31dbe9fe404d41fd21867c8ed9cec1addd96.tar.xz | |
Add generation of .mi4 files - the generic PortalPlayer firmware format used by the iriver H10, Sansa E200 etc. Based on the documentation available at http://daniel.haxx.se/sansa/mi4.html and examination of files produced by mkmi4.sh
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10816 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/scramble.c')
| -rw-r--r-- | tools/scramble.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/scramble.c b/tools/scramble.c index c3eb178..d1e3d1d 100644 --- a/tools/scramble.c +++ b/tools/scramble.c @@ -22,6 +22,7 @@ #include <stdbool.h> #include <string.h> #include "iriver.h" +#include "mi4.h" int iaudio_encode(char *iname, char *oname, char *idstring); int ipod_encode(char *iname, char *oname, int fw_ver, bool fake_rsrc); @@ -82,6 +83,8 @@ void usage(void) "\t-ipod3g ipod firmware partition format (3rd Gen)\n" "\t-ipod4g ipod firmware partition format (4th Gen, Mini, Nano, Photo/Color)\n" "\t-ipod5g ipod firmware partition format (5th Gen - aka Video)\n" + "\t-mi4v2 PortalPlayer .mi4 format (revision 010201)\n" + "\t-mi4v3 PortalPlayer .mi4 format (revision 010301)\n" "\t-add=X Rockbox generic \"add-up\" checksum format\n" "\t (X values: h100, h120, h140, h300, ipco, nano, ipvd\n" "\t ip3g, ip4g, mini, x5, h10, h10_5gb)\n" @@ -241,6 +244,16 @@ int main (int argc, char** argv) oname = argv[3]; return ipod_encode(iname, oname, 3, true); /* Firmware image v3 */ } + else if(!strcmp(argv[1], "-mi4v2")) { + iname = argv[2]; + oname = argv[3]; + return mi4_encode(iname, oname, 0x00010201); + } + else if(!strcmp(argv[1], "-mi4v3")) { + iname = argv[2]; + oname = argv[3]; + return mi4_encode(iname, oname, 0x00010301); + } /* open file */ file = fopen(iname,"rb"); |