Changeset 11707
- Timestamp:
- 03/02/09 20:33:04 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/router/services/tools/overclock_routerstation.c
r11706 r11707 59 59 len = ftell(in); 60 60 rewind(in); 61 char check[8]; 62 char check2[8]; 63 char values[8]={0x24,0x08,0x00,0xaa,0x15,0x09,0x00,0x04}; 61 64 fseek(in,0xc0,SEEK_SET); 62 char check[8];63 char values[8]={0x24,0x08,0x00,0xaa,0x15,0x09,0x00,0x04};64 65 fread(check,1,8,in); 65 if (memcmp(check,values,8)) 66 fseek(in,0xc4,SEEK_SET); 67 fread(check2,1,8,in); 68 int ret1=0xff; 69 int ret2=0xff; 70 if ((ret1=memcmp(check,values,8)) && (ret2=memcmp(check2,values,8))) 66 71 { 67 72 fprintf(stderr,"no compatible routerstation bootloader found\n"); … … 69 74 return; 70 75 } 76 if (!ret1) 77 fprintf(stderr,"bootloader rev1 found\n"); 78 if (!ret2) 79 fprintf(stderr,"bootloader rev2 found\n"); 71 80 FILE *out = fopen( "/tmp/boot", "w+b" ); 72 81 rewind(in); … … 101 110 102 111 103 //int main (int argc, char *argv[]) { start_overclock (); }112 int main (int argc, char *argv[]) { start_overclock (); } 104 113 114
Note: See TracChangeset
for help on using the changeset viewer.
