[Pkg-voip-commits] r10089 - in /dahdi-firmware/trunk/debian/patches: ./ make-binary-bitfiles series

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Tue Jan 29 22:03:43 UTC 2013


Author: tzafrir
Date: Tue Jan 29 22:03:42 2013
New Revision: 10089

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=10089
Log:
The missing patch.

Added:
    dahdi-firmware/trunk/debian/patches/
    dahdi-firmware/trunk/debian/patches/make-binary-bitfiles
    dahdi-firmware/trunk/debian/patches/series

Added: dahdi-firmware/trunk/debian/patches/make-binary-bitfiles
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-firmware/trunk/debian/patches/make-binary-bitfiles?rev=10089&op=file
==============================================================================
--- dahdi-firmware/trunk/debian/patches/make-binary-bitfiles (added)
+++ dahdi-firmware/trunk/debian/patches/make-binary-bitfiles Tue Jan 29 22:03:42 2013
@@ -1,0 +1,73 @@
+Author: Ben Hutchings <ben at decadent.org.uk>
+Description: Add makefw -b option to enable binary output
+Bug-Debian: http://bugs.debian.org/699104
+
+We can't compile these bitfiles into the drivers in the free
+dahdi-source package.  Add the -b option to write a binary
+instead of a C array.
+
+---
+--- a/drivers/dahdi/makefw.c
++++ b/drivers/dahdi/makefw.c
+@@ -1,6 +1,7 @@
+ /* Xilinx firmware convertor program.
+  *
+  * Written by Jim Dixon <jim at lambdatel.com>.
++ * Binary output adde by Ben Hutchings <ben at decadent.org.uk>.
+  *
+  * Copyright (C) 2001 Jim Dixon / Zapata Telephony.
+  * Copyright (C) 2001-2008 Digium, Inc.
+@@ -34,10 +35,12 @@ FILE *fp;
+ int i,j,nbytes;
+ unsigned char c;
+ char	buf[300];
++int bin;
+ 
+ 	if (argc < 3)
+ 	   {
+ 		puts("Usage... makefw  filename.rbt  array_name");
++		puts("         makefw  filename.rbt  -b");
+ 		exit(1);
+ 	   }	
+ 
+@@ -47,8 +50,10 @@ char	buf[300];
+ 		perror("bit file open");
+ 		exit(1);
+ 	   }
++	bin = !strcmp(argv[2], "-b");
+ 	nbytes = 0;
+-	printf("static unsigned char %s[] = {\n",argv[2]);
++	if (!bin)
++		printf("static unsigned char %s[] = {\n",argv[2]);
+ 	i = 0;
+ 	while(fgets(buf,sizeof(buf) - 1,fp))
+ 	   {
+@@ -66,17 +71,22 @@ char	buf[300];
+ 			if ((j & 7) == 7)
+ 			   {
+ 				nbytes++;
+-				if (i) printf(",");				
+-				printf("0x%02x",c);
+-				if (i++ == SWATH) {
+-					printf(",\n");
+-					i = 0;
++				if (bin) {
++					putchar(c);
++				} else {
++					if (i) printf(",");
++					printf("0x%02x",c);
++					if (i++ == SWATH) {
++						printf(",\n");
++						i = 0;
++					}
+ 				}
+ 				c = 0;
+ 			   }
+ 		   }
+ 	   }
+-	printf("\n};\n\n");
++	if (!bin)
++		printf("\n};\n\n");
+ 	fprintf(stderr,"Loaded %d bytes from file\n",nbytes);
+ 	fclose(fp);
+ 	exit(0);

Added: dahdi-firmware/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-firmware/trunk/debian/patches/series?rev=10089&op=file
==============================================================================
--- dahdi-firmware/trunk/debian/patches/series (added)
+++ dahdi-firmware/trunk/debian/patches/series Tue Jan 29 22:03:42 2013
@@ -1,0 +1,1 @@
+make-binary-bitfiles




More information about the Pkg-voip-commits mailing list