Changeset 10584


Ignore:
Timestamp:
2008-03-11T01:45:22+01:00 (9 years ago)
Author:
matteo
Message:

Add AG241 code pattern (fixes #1089)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar7/image/Makefile

    r9533 r10584  
    7979        $(call Image/Build/CyberTAN,$(1),WA22,WA22,$(1)) 
    8080        $(call Image/Build/CyberTAN,$(1),WAG2,WAG2,$(1)) 
     81        $(call Image/Build/CyberTAN,$(1),AG241v2,AG3A -b -r 2.0,$(1)) 
     82        $(call Image/Build/CyberTAN,$(1),AG241v1,AG3A -b,$(1)) 
    8183        $(call Image/Build/CyberTAN,$(1),WA31,WA31 -b,$(1)) 
    8284        $(call Image/Build/CyberTAN,$(1),WA32,WA32 -b,$(1)) 
  • trunk/tools/firmware-utils/src/addpattern.c

    r3018 r10584  
    3838 *  -{0|1|2} sets {0|1} sets hw_ver flag to 0/1. {2} sets hw_ver to 1 
    3939 *     and adds the new hardware "flags" for the v2.2/v1.1 units 
     40*/ 
     41 
     42/* January 1, 2007 
     43 * 
     44 * Modified by juan.i.gonzalez at subdown dot net 
     45 * Support added for the AG241v2  and similar 
     46 * 
     47 * Extensions: 
     48 *  -r #.# adds revision hardware flags. AG241v2 and similar. 
     49 * 
     50 * AG241V2 firmware sets the hw_ver to 0x44. 
     51 * 
     52 * Example: -r 2.0 
     53 * 
     54 * Convert 2.0 to 20 to be an integer, and add 0x30 to skip special ASCII 
     55 * #define HW_Version ((HW_REV * 10) + 0x30)  -> from cyutils.h 
    4056*/ 
    4157 
     
    7894void usage(void) 
    7995{ 
    80         fprintf(stderr, "Usage: addpattern [-i trxfile] [-o binfile] [-p pattern] [-g] [-b] [-v v#.#.#] [-{0|1|2|4}]\n"); 
     96        fprintf(stderr, "Usage: addpattern [-i trxfile] [-o binfile] [-p pattern] [-g] [-b] [-v v#.#.#] [-r #.#] [-{0|1|2|4}] -h\n"); 
    8197        exit(EXIT_FAILURE); 
    8298} 
     
    106122        memset(hdr, 0, sizeof(struct code_header)); 
    107123 
    108         while ((c = getopt(argc, argv, "i:o:p:gbv:0124")) != -1) { 
     124        while ((c = getopt(argc, argv, "i:o:p:gbv:0124hr:")) != -1) { 
    109125                switch (c) { 
    110126                        case 'i': 
     
    143159                                hdr->flags[0] = 0x1f; 
    144160                                break; 
    145  
     161                        case 'r': 
     162                                hdr->hw_ver = (char)(atof(optarg)*10)+0x30; 
     163                                break; 
     164 
     165                        case 'h': 
    146166                        default: 
    147167                                usage(); 
     
    149169        } 
    150170 
    151         if (optind != argc) { 
     171        if (optind != argc || optind == 1) { 
    152172                fprintf(stderr, "illegal arg \"%s\"\n", argv[optind]); 
    153173                usage(); 
Note: See TracChangeset for help on using the changeset viewer.