forked from len0rd/rockbox
Update the comments describing how to build ipodpatcher - no functional changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24361 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2347a7dc65
commit
4cb879d08d
5 changed files with 8 additions and 13 deletions
|
|
@ -2,11 +2,14 @@ CFLAGS=-Wall -W
|
||||||
|
|
||||||
BOOT_H = ipod1g2g.h ipod3g.h ipod4g.h ipodcolor.h ipodmini1g.h ipodmini2g.h ipodnano1g.h ipodvideo.h
|
BOOT_H = ipod1g2g.h ipod3g.h ipod4g.h ipodcolor.h ipodmini1g.h ipodmini2g.h ipodnano1g.h ipodvideo.h
|
||||||
|
|
||||||
# Enable the next two lines to build with embedded bootloaders and the
|
# Build with "make BOOTOBJS=1" to build with embedded bootloaders and the
|
||||||
# --install option and interactive mode. You need the full set of Rockbox
|
# --install option and interactive mode. You need the full set of Rockbox
|
||||||
# bootloaders in this directory - download them from
|
# bootloaders in this directory - download them from
|
||||||
# http://download.rockbox.org/bootloader/ipod/bootloaders.zip
|
# http://download.rockbox.org/bootloader/ipod/bootloaders.zip
|
||||||
|
|
||||||
|
# Releases of ipodpatcher are created with "make RELEASE=1". This
|
||||||
|
# enables BOOTOBJS and uses the VERSION string defined in main.c
|
||||||
|
|
||||||
ifdef RELEASE
|
ifdef RELEASE
|
||||||
CFLAGS+=-DRELEASE
|
CFLAGS+=-DRELEASE
|
||||||
BOOTOBJS=1
|
BOOTOBJS=1
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ int ipod_open(struct ipod_t* ipod, int silent)
|
||||||
/* Read information about the disk */
|
/* Read information about the disk */
|
||||||
|
|
||||||
if(ioctl(ipod->dh,IPOD_SECTORSIZE_IOCTL,&ipod->sector_size) < 0) {
|
if(ioctl(ipod->dh,IPOD_SECTORSIZE_IOCTL,&ipod->sector_size) < 0) {
|
||||||
ipod->sector_size=512;
|
ipod->sector_size=2048;
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
fprintf(stderr,"[ERR] ioctl() call to get sector size failed, defaulting to %d\n"
|
fprintf(stderr,"[ERR] ioctl() call to get sector size failed, defaulting to %d\n"
|
||||||
,ipod->sector_size);
|
,ipod->sector_size);
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,7 @@ ssize_t ipod_read(struct ipod_t* ipod, unsigned char* buf, int nbytes)
|
||||||
{
|
{
|
||||||
unsigned long count;
|
unsigned long count;
|
||||||
|
|
||||||
|
printf("[DEBUG] ipod_read - nbytes=%d\n",nbytes);
|
||||||
if (!ReadFile(ipod->dh, buf, nbytes, &count, NULL)) {
|
if (!ReadFile(ipod->dh, buf, nbytes, &count, NULL)) {
|
||||||
ipod_print_error(" Error reading from disk: ");
|
ipod_print_error(" Error reading from disk: ");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
|
|
@ -2080,7 +2080,7 @@ static int find_key(struct ipod_t* ipod, int aupd, unsigned char* key)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((n = ipod_read(ipod, ipod_sectorbuf, 512)) < 0) {
|
if ((n = ipod_read(ipod, ipod_sectorbuf, ipod->sector_size)) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#ifdef RELEASE
|
#ifdef RELEASE
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
#define VERSION "4.0 with v3.0 bootloaders (v1.0 for 2nd Gen Nano)"
|
#define VERSION "4.1 with v3.0 bootloaders (v1.0 for 2nd Gen Nano)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -398,15 +398,6 @@ int main(int argc, char* argv[])
|
||||||
if (ipod.ramsize > 0) { printf("(%dMB RAM) ",ipod.ramsize); }
|
if (ipod.ramsize > 0) { printf("(%dMB RAM) ",ipod.ramsize); }
|
||||||
printf("(\"%s\")\n",ipod.macpod ? "macpod" : "winpod");
|
printf("(\"%s\")\n",ipod.macpod ? "macpod" : "winpod");
|
||||||
|
|
||||||
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 :");
|
|
||||||
fgets(yesno,4,stdin);
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ipod.macpod) {
|
if (ipod.macpod) {
|
||||||
print_macpod_warning();
|
print_macpod_warning();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue