Ignore:
Timestamp:
12/02/11 05:32:17 (2 years ago)
Author:
philmoz
Message:

Updates for finsig_dryos.c:

  • The 'ctypes' array used in generic/wrappers.c exists in the firmware for dryos cameras. finsig_dryos.c now adds an entry for this to stubs_entry.S so the array is no longer needed in the CHDK code.
  • Values from stubs_min.S that are correctly found by finsig_dryos.c can be removed from stubs_min.S. The entries will then be included in stubs_entry.S (as is done for stubs_entry_2.S). stubs_min.S cleaned up for G12, SX30, SX40 and IXUS310.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/finsig_dryos.c

    r1436 r1444  
    27642764{ 
    27652765        osig *o = find_sig(stubs_min,name); 
    2766         bprintf("//DEF(%-40s,0x%08x) // Found @0x%08x",name,fadr,atadr); 
    27672766        if (o) 
    27682767        { 
     2768        bprintf("//DEF(%-40s,0x%08x) // Found @0x%08x",name,fadr,atadr); 
    27692769                if (fadr != o->val) 
    27702770                { 
     
    27762776                } 
    27772777        } 
     2778    else 
     2779    { 
     2780        bprintf("DEF(%-40s,0x%08x) // Found @0x%08x",name,fadr,atadr); 
     2781    } 
    27782782        bprintf("\n"); 
    27792783} 
     
    27872791        add_blankline(); 
    27882792 
    2789         bprintf("// Values below go in 'stubs_min.S':\n"); 
     2793        bprintf("// Values below can be overridden in 'stubs_min.S':\n"); 
    27902794 
    27912795        // Find 'physw_status' 
     
    30803084                } 
    30813085        } 
     3086} 
     3087 
     3088//------------------------------------------------------------------------------------------------------------ 
     3089 
     3090// Search for things that go in 'stubs_min.S' 
     3091void find_other_vals(firmware *fw) 
     3092{ 
     3093        out_hdr = 1; 
     3094        add_blankline(); 
     3095 
     3096        bprintf("// Misc stuff\n"); 
     3097 
     3098    unsigned char ctypes[] =  
     3099    {  
     3100        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x60, 0x60, 0x60, 0x60, 0x60, 0x20, 0x20, 
     3101        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
     3102        0x48, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
     3103        0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x84, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
     3104        0x10, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
     3105        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0x10, 0x10, 0x10, 0x10, 0x10, 
     3106        0x10, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
     3107        2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0x10, 0x10, 0x10, 0x10, 0x20 
     3108    }; 
     3109 
     3110    unsigned char *p = (unsigned char*)fw->buf; 
     3111    int i, found = 0; 
     3112    for (i=0; i<fw->size*4-sizeof(ctypes); i++, p++) 
     3113    { 
     3114        if (memcmp(p,ctypes,sizeof(ctypes)) == 0) 
     3115        { 
     3116            bprintf("DEF(ctypes, 0x%08x)\n", fw->base + i); 
     3117            found = 1; 
     3118            break; 
     3119        } 
     3120    } 
     3121    if (!found) 
     3122    { 
     3123        bprintf("//DEF(ctypes, *** Not Found ***)\n"); 
     3124    } 
    30823125} 
    30833126 
     
    33933436        find_key_vals(&fw); 
    33943437        find_platform_vals(&fw); 
     3438    find_other_vals(&fw); 
    33953439 
    33963440    fprintf(stderr,"Time to generate stubs %.2f seconds\n",(double)(t2-t1)/(double)CLOCKS_PER_SEC); 
Note: See TracChangeset for help on using the changeset viewer.