OK, Mail Client on Text Only no HTML.
Sorry --- Index: trunk/tools/firmware-utils/src/addpattern.c =================================================================== --- trunk/tools/firmware-utils/src/addpattern.c (revisión: 10082) +++ trunk/tools/firmware-utils/src/addpattern.c (copia de trabajo) @@ -39,6 +39,22 @@ * and adds the new hardware "flags" for the v2.2/v1.1 units */ +/* January 1, 2007 + * + * Modified by juan.i.gonzalez at subdown dot net + * Support added for the AG241v2 and similar + * + * Extensions: + * -r #.# adds revision hardware flags. AG241v2 and similar. + * + * AG241V2 firmware sets the hw_ver to 0x44. + * + * Example: -r 2.0 + * + * Convert 2.0 to 20 to be an integer, and add 0x30 to skip special ASCII + * #define HW_Version ((HW_REV * 10) + 0x30) -> from cyutils.h +*/ + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -77,7 +93,7 @@ void usage(void) { - fprintf(stderr, "Usage: addpattern [-i trxfile] [-o binfile] [-p pattern] [-g] [-b] [-v v#.#.#] [-{0|1|2|4}]\n"); + fprintf(stderr, "Usage: addpattern [-i trxfile] [-o binfile] [-p pattern] [-g] [-b] [-v v#.#.#] [-r #.#] [-{0|1|2|4}] -h\n"); exit(EXIT_FAILURE); } @@ -105,7 +121,7 @@ hdr = (struct code_header *) buf; memset(hdr, 0, sizeof(struct code_header)); - while ((c = getopt(argc, argv, "i:o:p:gbv:0124")) != -1) { + while ((c = getopt(argc, argv, "i:o:p:gbv:0124hr:")) != -1) { switch (c) { case 'i': ifn = optarg; @@ -142,13 +158,17 @@ hdr->hw_ver = 0; hdr->flags[0] = 0x1f; break; + case 'r': + hdr->hw_ver = (char)(atof(optarg)*10)+0x30; + break; + case 'h': default: usage(); } } - if (optind != argc) { + if ((optind != argc) || (optind == 1)) { fprintf(stderr, "illegal arg \"%s\"\n", argv[optind]); usage(); } --- Juan I. Gonzalez [ Subdown Systems Networks ] - WEB: http://www.subdown.net | Email: [EMAIL PROTECTED] * Telf: +34 902.884.394 | Fax: +34 91 771.02.74 ----- Original Message ----- From: Felix Fietkau [mailto:[EMAIL PROTECTED] To: OpenWrt Development List [mailto:[EMAIL PROTECTED] Sent: Wed, 02 Jan 2008 15:48:26 +0000 Subject: Re: [OpenWrt-Devel] Linksys AG241 and AG241v2 Build images > Juan Ignacio González Braña wrote: > This changes the Image Builder for > Linksys AG241 and AG241v2 on > trunk/target/linux/ar7/image/Makefile > > > The revision of Hardware 2.0 of AG241 is necesary add new option > to > generate the hw_version on trunk/tools/firmware-utils/src/addpattern.c > > > Signed-off-by: Juan I. Gonzalez <juan.i.gonzalez at subdown dot net> Your > patch does not apply and seems to be whitespace mangled. Please check your > email client settings and send the patch again. You can also try sending it > as an attachment. Thanks, - > Felix _______________________________________________ openwrt-devel mailing > list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- PRIVACIDAD: Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o CONFIDENCIAL. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción. PRIVACITY: This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege. If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it. Powered by Subdown System Network _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel