Changeset 11707


Ignore:
Timestamp:
03/02/09 20:33:04 (4 years ago)
Author:
BrainSlayer
Message:

support overclocking for standard routerstation boards

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/services/tools/overclock_routerstation.c

    r11706 r11707  
    5959    len = ftell(in); 
    6060    rewind(in); 
     61    char check[8]; 
     62    char check2[8]; 
     63    char values[8]={0x24,0x08,0x00,0xaa,0x15,0x09,0x00,0x04}; 
    6164    fseek(in,0xc0,SEEK_SET); 
    62     char check[8]; 
    63     char values[8]={0x24,0x08,0x00,0xaa,0x15,0x09,0x00,0x04}; 
    6465    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))) 
    6671        { 
    6772        fprintf(stderr,"no compatible routerstation bootloader found\n"); 
     
    6974        return; 
    7075        } 
     76    if (!ret1) 
     77        fprintf(stderr,"bootloader rev1 found\n"); 
     78    if (!ret2) 
     79        fprintf(stderr,"bootloader rev2 found\n"); 
    7180    FILE *out = fopen( "/tmp/boot", "w+b" ); 
    7281    rewind(in); 
     
    101110 
    102111 
    103 // int main (int argc, char *argv[]) { start_overclock (); }  
     112int main (int argc, char *argv[]) { start_overclock (); }  
    104113 
     114 
Note: See TracChangeset for help on using the changeset viewer.