speedtch crc.c, NONE, 1.1 crc.h, NONE, 1.1 firmware.c, NONE, 1.1 firmware.h, NONE, 1.1 Makefile, 1.4, 1.5

Duncan Sands duncan at infradead.org
Fri Oct 15 11:00:59 EDT 2004


Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv22119

Modified Files:
	Makefile 
Added Files:
	crc.c crc.h firmware.c firmware.h 
Log Message:
Firmware extractor from the user-mode driver.  Some changes are needed
before it will be really simple to use - I hope to feed them back to the
user-mode project so we don't need to fork (I've sent the first patches
already - that should show if they are receptive or not).


***** Error reading new file: [Errno 2] No such file or directory: 'crc.c'
***** Error reading new file: [Errno 2] No such file or directory: 'crc.h'
***** Error reading new file: [Errno 2] No such file or directory: 'firmware.c'
--- NEW FILE firmware.h ---
#ifndef __FIRMWARE_H__
#define __FIRMWARE_H__

typedef struct
{
	unsigned long crc;
	unsigned long length;
	const char *id;
} stusb_firmware_id_t;


typedef struct
{
	unsigned char *phase1;
	unsigned char *phase2;
	unsigned long phase1_length;
	unsigned long phase2_length;
} stusb_firmware_t;

stusb_firmware_t *
extract_firmware(const char *boot_file, const char *firm_file, int rev4);

void
free_firmware(stusb_firmware_t *f);

#endif

Index: Makefile
===================================================================
RCS file: /home/cvs/speedtch/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile	4 Oct 2004 12:37:59 -0000	1.4
+++ Makefile	15 Oct 2004 15:00:56 -0000	1.5
@@ -2,13 +2,22 @@
 	KERNELDIR  := /lib/modules/$(shell uname -r)/build
 endif
 
+FIRMWARE_EXTRACTOR := firmware
+
 obj-m := speedtch.o usb_atm.o
 
-all clean help modules modules_install:
+all help modules modules_install:
 	$(MAKE) -C $(KERNELDIR) M=$(PWD) $(filter-out all,$(MAKECMDGOALS)) EXTRA_CFLAGS=-DDEBUG
 
+clean:
+	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
+	-rm $(FIRMWARE_EXTRACTOR)
+
 nodebug:
 	make -C $(KERNELDIR) M=$(PWD)
 
+firmware: firmware.c firmware.h
+	gcc -o $(FIRMWARE_EXTRACTOR) firmware.c -DSTANDALONE_EXTRACTER
+
 install:
 	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install




More information about the Usbatm-commits mailing list