I'm getting about 1000 lines of output, so I'll try to just include just
what looks important. First off, here's my Makefile (just in case that's
the problem).
KERNELDIR = /usr/src/linux #aliased as /usr/src/linux ->
/usr/src/linux-2.6.5-1.358/
include $(KERNELDIR)/.config
CFLAGS = -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include -O -Wall
ifdef CONFIG_SMP
CFLAGS += -D__SMP__ -DSMP
endif
#PGM = # Name of final executable
all: usb-skeleton.o
#all: CypressUSB.o
#atmel.o: hello_init.o hello_clean.o
# $(LD) -r $^ -o $@
clean:
rm -f *.o *~ core
(actually, upon looking at the first set of errors, it looks like the
compiler thinks I'm trying to compile a user space program using kernel
headers. Hm). Here's the first few lines of output:
cc -D__KERNEL__ -DMODULE -I/usr/src/linux/include -O -Wall -c -o
usb-skeleton.o usb-skeleton.c
In file included from /usr/src/linux/include/linux/config.h:4,
from usb-skeleton.c:43:
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included
in userspace
In file included from /usr/src/linux/include/linux/kernel.h:11,
from usb-skeleton.c:44:
/usr/src/linux/include/linux/linkage.h:5:25: asm/linkage.h: No such file
or directory
In file included from /usr/src/linux/include/linux/kernel.h:13,
from usb-skeleton.c:44:
/usr/src/linux/include/linux/types.h:18: error: conflicting types for
`__kernel_dev_t'
/usr/include/asm/posix_types.h:10: error: previous declaration of
`__kernel_dev_t'
/usr/src/linux/include/linux/types.h:30: error: syntax error before
"timer_t"
/usr/src/linux/include/linux/types.h:30: warning: type defaults to `int'
in declaration of `timer_t'
/usr/src/linux/include/linux/types.h:30: warning: data definition has no
type or storage class
/usr/src/linux/include/linux/types.h:31: error: syntax error before
"clockid_t"
/usr/src/linux/include/linux/types.h:31: warning: type defaults to `int'
in declaration of `clockid_t'
/usr/src/linux/include/linux/types.h:31: warning: data definition has no
type or storage class
In file included from /usr/src/linux/include/linux/kernel.h:15,
from usb-skeleton.c:44:
/usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel
header; include <endian.h> instead!
In file included from usb-skeleton.c:44:
/usr/src/linux/include/linux/kernel.h:16:21: asm/bug.h: No such file or
directory
In file included from /usr/src/linux/include/linux/bitops.h:4,
from /usr/src/linux/include/linux/thread_info.h:20,
from /usr/src/linux/include/linux/spinlock.h:12,
from /usr/src/linux/include/linux/mmzone.h:8,
from /usr/src/linux/include/linux/gfp.h:4,
from /usr/src/linux/include/linux/slab.h:15,
from usb-skeleton.c:47:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not
available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in
userspace: atomicity not guaranteed
In file included from /usr/src/linux/include/linux/thread_info.h:20,
from /usr/src/linux/include/linux/spinlock.h:12,
from /usr/src/linux/include/linux/mmzone.h:8,
from /usr/src/linux/include/linux/gfp.h:4,
from /usr/src/linux/include/linux/slab.h:15,
from usb-skeleton.c:47:
-Jesse
On Tue, 15 Jun 2004, Greg KH wrote:
> On Tue, Jun 15, 2004 at 03:04:30PM -0700, J. Dosher wrote:
> > I've developed a custom I/O control board for haptics and robotics using
> > an Atmel AVR and a Cypress USB 2.0 IC.
> > (http://www-brl.ee.washington.edu/~jdosher/Pictures/Thumbnails/BoardTH.html)
> >
> > We've been having some trouble getting our USB (interrupt based) driver
> > working at anything faster than a 2ms frame rate, so we've decided to
> > start working under the 2.6 kernels, hoping that might solve out problems.
> >
> > So, in an effort to understand what's involved in porting our driver we
> > wanted to start simple and compare the old vs new usb-skeleton code. The
> > problem is, we can't even get usb-skeleton.c to compile under 2.6. We're
> > using the version that came with the 2.6.5 kernel.
> >
> > Various google searches haven't shed any light. What are we missing here?
>
> What errors are you getting from your build?
>
> thanks,
>
> greg k-h
>
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel