| From: Chris Kennedy <[EMAIL PROTECTED]>
| Unstable:
| http://ivtv.no-ip.info/ivtv-0.3/ivtv-0.3.2e.tgz
I actually tried to build this on my Fedora Core 3 x86_64 linux2.6 system
instead of just talking about the code :-)
There were a few small problems.
1)
/home/hugh/tba/ivtv/ivtv-0.3.2e/driver/msp3400.c: In function `msp3400c_thread':
/home/hugh/tba/ivtv/ivtv-0.3.2e/driver/msp3400.c:838: warning:
`interruptible_sleep_on' is deprecated (declared at include/linux/wait.h:310)
/home/hugh/tba/ivtv/ivtv-0.3.2e/driver/msp3400.c: In function `msp3410d_thread':
/home/hugh/tba/ivtv/ivtv-0.3.2e/driver/msp3400.c:1125: warning:
`interruptible_sleep_on' is deprecated (declared at include/linux/wait.h:310)
I have no idea what you are supposed to use these days. But this
error should probably not be ignored.
I assume this is a 2.6ism.
2)
pointers don't fit in unsigned int on x86_64. So formats for pointers
need to be adjusted.
If I had built the LINUX headers, I would have defined a macro with
the correct formatting directive for dma_addr_t. I don't see such a
macro in the header that defines dma_addr_t (asm-x86_64/types.h). So
I think that the most portable way of printing something of that type
is to use %0lx format and cast the value to unsigned long.
A real pointer type can be portably printed with %p.
Here are (untested!) diffs to implement this. I only made these
changes where gcc produced warnings -- there may be other places that
have not been discovered.
Note: my goal is portability -- this should continue to work on other
architectures. Since I don't know the number of hex digits in a
pointer, I cannot specify a 0-filled fixed length.
===================================================================
RCS file: RCS/ivtv-osd.c,v
retrieving revision 1.1
diff -u -r1.1 ivtv-osd.c
--- ivtv-osd.c 2005/02/23 07:34:53 1.1
+++ ivtv-osd.c 2005/02/23 07:57:53
@@ -1035,8 +1035,8 @@
#endif
IVTV_DEBUG_OSD(IVTV_DEBUG_INFO,
- "Sched OSD dma: addr: 0x%08x, links 0x%08x, bytes
0x%08x, type 0x%08x\n",
- osd_stream->SG_handle, osd_stream->SG_length,
size_in_bytes, 0x01);
+ "Sched OSD dma: addr: 0x%0lx, links 0x%08x, bytes
0x%08x, type 0x%08x\n",
+ (unsigned long)osd_stream->SG_handle,
osd_stream->SG_length, size_in_bytes, 0x01);
/* This uses the cards DMA registers instead of the firmware API
to send the Decoder DMA, I suspect this is safer than how the
@@ -1595,10 +1595,10 @@
if (ret != -ERESTARTSYS)
{
IVTV_DEBUG(IVTV_DEBUG_ERR,
- "OSD: DMA xfer from 0x%08x of "
+ "OSD: DMA xfer from %p of "
"%d bytes "
"failed with (%d) offset = 0x%08lx, total %d\n",
- (u32)args.source, args.count, ret,
+ args.source, args.count, ret,
args.dest_offset,
(args.count + (unsigned int)args.dest_offset));
} else
===================================================================
3)
At least on Fedora Core 3, kernel headers live in the same tree as
modules. Separate headers for different kernel versions. I am
guessing that this applies to all 2.6 systems, so I have adjusted
driver/Makefile2.6 to take this into account.
===================================================================
RCS file: RCS/Makefile2.6,v
retrieving revision 1.1
diff -u -r1.1 Makefile2.6
--- Makefile2.6 2005/02/23 07:46:35 1.1
+++ Makefile2.6 2005/02/23 07:47:58
@@ -1,5 +1,6 @@
KDIR := /lib/modules/$(shell uname -r)/build
-HEADERDIR = /usr/include/linux
+HEADERDIR = $(KDIR)/include
INSTALL_HEADERS = ivtv.h
ifdef HP_FWLOAD
================================================================
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
ivtv-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ivtv-devel