Subject: LKM Module Template for 1.6.2
To: None <tech-kern@NetBSD.org>
From: Sam Thigpen <sthigpen@sdf.lonestar.org>
List: tech-kern
Date: 03/04/2004 00:22:34
The lkm examples (ExplorerDriverTreeLKM, etc) compile okay with the 1.6.1
source hierarchy, but -current and now 1.6.2 give the following errors:

In file included from machine/signal.h:52,
                 from /sys/sys/siginfo.h:46,
                 from /sys/sys/signal.h:128,
                 from /sys/sys/time.h:41,
                 from /sys/sys/param.h:126,
                 from explore_lkm.c:11:
machine/trap.h:3: x86/trap.h: No such file or directory
In file included from machine/cpu.h:54,
                 from machine/param.h:48,
                 from /sys/sys/param.h:146,
                 from explore_lkm.c:11:
machine/intrdefs.h:3: x86/intrdefs.h: No such file or directory
In file included from machine/param.h:48,
                 from /sys/sys/param.h:146,
                 from explore_lkm.c:11:
machine/cpu.h:55: x86/cacheinfo.h: No such file or directory
In file included from /sys/sys/lock.h:87,
                 from machine/cpu.h:58,
                 from machine/param.h:48,
                 from /sys/sys/param.h:146,
                 from explore_lkm.c:11:
machine/lock.h:3: x86/lock.h: No such file or directory
In file included from machine/cpu.h:431,
                 from machine/param.h:48,
                 from /sys/sys/param.h:146,
                 from explore_lkm.c:11:
machine/psl.h:3: x86/psl.h: No such file or directory

trap.h for -current and 1.6.2 just contains:
---
/*      $NetBSD: trap.h,v 1.7 2003/02/26 21:29:03 fvdl Exp $    */

#include <x86/trap.h>
---

pretty much the same for the other includes listed in the error above.

Right now I am just using the old include files to create lkm modules.
They seem to work ok on the newer kernels (-current, 1.6.2) for basic
tests.

Is anyone doing a template or have lkm examples with the new source
hierarchy?

Thanks,
Sam.

------------------------------------------------------
SA Thigpen  *  KL1FE  *  http://sthigpen.freeshell.org
------------------------------------------------------