summaryrefslogtreecommitdiffstats
path: root/rbutil/ipodpatcher/main.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2009-10-13 08:02:59 +0000
committerDave Chapman <dave@dchapman.com>2009-10-13 08:02:59 +0000
commit8e95cc432935df1225a7bcc8e87e04f9f16bb643 (patch)
treecff528d4f69aed098f178236eee1ee26c759bf5e /rbutil/ipodpatcher/main.c
parente486241c0143580ef81c79dbc75b69b0abbc5b2c (diff)
downloadrockbox-8e95cc432935df1225a7bcc8e87e04f9f16bb643.tar.gz
rockbox-8e95cc432935df1225a7bcc8e87e04f9f16bb643.tar.bz2
rockbox-8e95cc432935df1225a7bcc8e87e04f9f16bb643.zip
ipodpatcher and rbutil support for the Nano2G - FS#10609 with a few further changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23142 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher/main.c')
-rw-r--r--rbutil/ipodpatcher/main.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/rbutil/ipodpatcher/main.c b/rbutil/ipodpatcher/main.c
index 1dcb916240..e1002b23c9 100644
--- a/rbutil/ipodpatcher/main.c
+++ b/rbutil/ipodpatcher/main.c
@@ -31,7 +31,11 @@
#include "ipodpatcher.h"
#include "ipodio.h"
-#define VERSION "3.0 with v3.0 bootloaders"
+#ifdef RELEASE
+#undef VERSION
+#define VERSION "4.0 with v3.0 bootloaders (v1.0 for 2nd Gen Nano)"
+#endif
+
enum {
NONE,
@@ -80,14 +84,14 @@ void print_usage(void)
fprintf(stderr," -l, --list\n");
fprintf(stderr," -r, --read-partition bootpartition.bin\n");
fprintf(stderr," -w, --write-partition bootpartition.bin\n");
- fprintf(stderr," -rf, --read-firmware filename.ipod\n");
+ fprintf(stderr," -rf, --read-firmware filename.ipod[x]\n");
fprintf(stderr," -rfb, --read-firmware-bin filename.bin\n");
- fprintf(stderr," -wf, --write-firmware filename.ipod\n");
+ fprintf(stderr," -wf, --write-firmware filename.ipod[x]\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," -a, --add-bootloader filename.ipod[x]\n");
fprintf(stderr," -ab, --add-bootloader-bin filename.bin\n");
fprintf(stderr," -d, --delete-bootloader\n");
fprintf(stderr," -f, --format\n");
@@ -97,6 +101,8 @@ void print_usage(void)
fprintf(stderr," -x --dump-xml filename.xml\n");
fprintf(stderr,"\n");
+ fprintf(stderr,"The .ipodx extension is used for encrypted images for the 2nd Gen Nano.\n\n");
+
#ifdef __WIN32__
fprintf(stderr,"DISKNO is the number (e.g. 2) Windows has assigned to your ipod's hard disk.\n");
fprintf(stderr,"The first hard disk in your computer (i.e. C:\\) will be disk 0, the next disk\n");
@@ -148,7 +154,8 @@ int main(int argc, char* argv[])
int type;
struct ipod_t ipod;
- fprintf(stderr,"ipodpatcher v" VERSION " - (C) Dave Chapman 2006-2007\n");
+ fprintf(stderr,"ipodpatcher " VERSION "\n");
+ fprintf(stderr,"(C) Dave Chapman 2006-2009\n");
fprintf(stderr,"This is free software; see the source for copying conditions. There is NO\n");
fprintf(stderr,"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n");
@@ -364,9 +371,9 @@ int main(int argc, char* argv[])
return 1;
}
- if (getmodel(&ipod,(ipod.ipod_directory[0].vers>>8)) < 0) {
+ if (getmodel(&ipod,(ipod.ipod_directory[ipod.ososimage].vers>>8)) < 0) {
fprintf(stderr,"[ERR] Unknown version number in firmware (%08x)\n",
- ipod.ipod_directory[0].vers);
+ ipod.ipod_directory[ipod.ososimage].vers);
return -1;
}
@@ -391,7 +398,7 @@ int main(int argc, char* argv[])
if (ipod.ramsize > 0) { printf("(%dMB RAM) ",ipod.ramsize); }
printf("(\"%s\")\n",ipod.macpod ? "macpod" : "winpod");
- if (ipod.ipod_directory[0].vers == 0x10000) {
+ if (ipod.ipod_directory[ipod.ososimage].vers == 0x10000) {
fprintf(stderr,"[ERR] *** ipodpatcher does not support the 2nd Generation Nano! ***\n");
#ifdef WITH_BOOTOBJS
printf("Press ENTER to exit ipodpatcher :");