lkml.org 
[lkml]   [2003]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Can't build external module against 2.6.0-test6 kernel
Sam Ravnborg wrote:
>
> On Thu, Oct 09, 2003 at 07:22:07AM -0400, Mark Hounschell wrote:
> > I'm trying to build a driver external to the kernel. I'm running 2.6.0-test6
> > kernel.
> > It appears to me (I'm probably wrong) that there is a kernel include file issue.
> Please follow Documentation/kbuild/modules.txt when building
> external modules.
>
> Please come back if you continue to have problems.
>
> Sam
Ok, I can now build it but I have to hardcode _my_ include directories in the
Makefile like:

/home/markh/work2/pcirtom_tst/driver/Makefile:

EXTRA_CFLAGS = -I/home/markh/work2/pcirtom_tst/include/linux/sys
-I/home/markh/work2/pcirtom_tst/include/linux
-I/home/markh/work2/pcirtom_tst/include

ifneq ($(KERNELRELEASE),)
obj-m += rtom.o
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif

My driver tree looks like

driver/
include/
diags/
samples/
library/

I've also tried setting the EXTRA_CFLAGS var in the top makefile but it doesn't
seem to get passed down when the driver is compiled?? I've also tried creating a
link in the driver directory pointing back to the include dir and adjusting the
paths in the EXTRA_CFLAGS to
-Iinclude/linux/sys -Iinclude/linux -Iinclude to no avail.

Thanks
Mark
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.075 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site