summaryrefslogtreecommitdiffstats
path: root/rbutil/ipodpatcher/main.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-06-02 10:10:31 +0000
committerDave Chapman <dave@dchapman.com>2007-06-02 10:10:31 +0000
commitbbde44506b7c544b6b049f56fbb1c99c5d67660f (patch)
treeb7a01e5d89b5158bc79985cd5a05bc60a8261982 /rbutil/ipodpatcher/main.c
parent52a64c3af97a5847d298ba7897f22b85df4cc776 (diff)
downloadrockbox-bbde44506b7c544b6b049f56fbb1c99c5d67660f.tar.gz
rockbox-bbde44506b7c544b6b049f56fbb1c99c5d67660f.tar.bz2
rockbox-bbde44506b7c544b6b049f56fbb1c99c5d67660f.zip
Add --write-embedded (-we) option. This replaces the Apple firmware with the bootloader embedded in ipodpatcher (equivalent to -wf bootloader-ipodxxx.ipod when using an external bootloader).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13536 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher/main.c')
-rw-r--r--rbutil/ipodpatcher/main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/rbutil/ipodpatcher/main.c b/rbutil/ipodpatcher/main.c
index 8d70fd789c..0983af768f 100644
--- a/rbutil/ipodpatcher/main.c
+++ b/rbutil/ipodpatcher/main.c
@@ -29,7 +29,7 @@
#include "ipodpatcher.h"
#include "ipodio.h"
-#define VERSION "1.0 with v1.1 bootloaders"
+#define VERSION "1.1-svn"
int verbose = 0;
@@ -79,6 +79,9 @@ void print_usage(void)
fprintf(stderr," -rfb, --read-firmware-bin filename.bin\n");
fprintf(stderr," -wf, --write-firmware filename.ipod\n");
fprintf(stderr," -wfb, --write-firmware-bin filename.bin\n");
+#ifdef WITH_BOOTOBJS
+ fprintf(stderr," -we, --write-embedded\n");
+#endif
fprintf(stderr," -a, --add-bootloader filename.ipod\n");
fprintf(stderr," -ab, --add-bootloader-bin filename.bin\n");
fprintf(stderr," -d, --delete-bootloader\n");
@@ -248,6 +251,14 @@ int main(int argc, char* argv[])
if (i == argc) { print_usage(); return 1; }
filename=argv[i];
i++;
+#ifdef WITH_BOOTOBJS
+ } else if ((strcmp(argv[i],"-we")==0) ||
+ (strcmp(argv[i],"--write-embedded")==0)) {
+ action = WRITE_FIRMWARE;
+ type = FILETYPE_INTERNAL;
+ filename="[embedded bootloader]"; /* Only displayed for user */
+ i++;
+#endif
} else if ((strcmp(argv[i],"-wf")==0) ||
(strcmp(argv[i],"--write-firmware")==0)) {
action = WRITE_FIRMWARE;