Subject: Re: trying ethfoo on NetBSD 2.0 [was: Re: [cube@cubidou.net: Re:
To: Quentin Garnier <cube@cubidou.net>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-kern
Date: 12/15/2004 22:43:36
On Wed, 15 Dec 2004, Quentin Garnier wrote:
>> 1) what do I do wrong, and
>
> Loading an intermediate object file. The correct one is 'ethfoo.o'.
>
>> 2) where's the postload-script for ethfoo to create /dev entries?
>
> There isn't... Once loaded, modstat will tell you the major number in
> the 'Offset' column.
>
> The command to load the module is simply
> 'modload <wherever it is>/ethfoo.o'. -s, -x are optional, -e should
> not be needed (if you think you need it, you're doing something wrong).
Um... I can't seem to load ethfoo.o w/o -s:
miyu# pwd
/home/cvs/src-2.0/sys/lkm/net/ethfoo/ethfoo/obj.i386
miyu# ls
ethfoo.o ethfoo_lkm.o i386 machine x86
miyu# modload ethfoo.o
modload: error initializing module: Program version wrong
miyu# modload -s ethfoo.o
Module loaded as ID 0
miyu# modstat
Type Id Offset Loadaddr Size Info Rev Module Name
DEV 0 -1/-1 c8fd6000 0008 c8fd7900 2 ethfoo
I guess the Offset would give the major/minor number, but -1 is probably
not the right one. Also, unloading paniced the system (dunno how, I was in
X).
- Hubert
--
NetBSD - Free AND Open! (And of course secure, portable, yadda yadda)