> But when I compile with: > urop-vm:~# gcc -c -O2 lkm.c -DMODULE -D__KERNEL__ -DLINUX > > it gives me a handful of error messages: > > In file included from /usr/include/linux/prefetch.h:13, > from /usr/include/linux/list.h:6, > from /usr/include/linux/module.h:12, > from lkm.c:2: > /usr/include/asm/processor.h:56: error: `CONFIG_X86_L1_CACHE_SHIFT' I've got the same problem when try to compile a kernel module inside a UML. Try this Makefile: CC=gcc KERNELDIR=/usr/src/linux-`uname -r` ARCHDIR=$(KERNELDIR)/arch/um TTDIR=$(ARCHDIR)/kernel/tt SKASDIR=$(ARCHDIR)/kernel/skas CFLAGS= -DDEBUG -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include -I$(ARCHDIR)/include -I$(TTDIR)/include -I$(SKASDIR)/include -Wall \ -Wunused -Wuninitialized -g -O ALL = main.o all: $(ALL) ------------------------------------------------------------------------------------------------------------------------------------------------------------- PGP PKEY http://pgp.mit.edu:11371/pks/lookup?search=belch76@libero.it&op=index ICQ# 104896040 Netphone/Fax 178.605.7063 Homepage http://web.tiscali.it/bellucda ------------------------------------------------------------------------------------------------------------------------------------------------------------- Daniele Bellucci -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/