Subject: Re: trying ethfoo on NetBSD 2.0 [was: Re: [cube@cubidou.net: Re: Moving ethfoo in the main tree]]
To: Hubert Feyrer <hubert@feyrer.de>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 12/15/2004 07:17:56
--ABYnUdqoGSokwVM+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Dec 15, 2004 at 02:45:50AM +0100, Hubert Feyrer wrote:
> On Mon, 13 Dec 2004, Quentin Garnier wrote:
> >Yes.  I did exactly this:
> >
> >ifconfig ethfoo0 create
>=20
> OK, I tried to get there on NetBSD 2.0. What I've done:
>=20
>  * Merge changes between rev. 1.1 and 1.5 as well as between 1.6 and 1.7
>    of src/sys/lkm/net/ethfoo/ethfoo_lkm.c (i.e. leave out changes in
>    rev. 1.5) into 2.0 sources:
>=20
> 	cd src/sys/lkm/net/ethfoo/ethfoo
> 	cvs diff -r1.1 -r1.4 ethfoo_lkm.c | patch
> 	cvs diff -r1.5 -r1.7 ethfoo_lkm.c | patch
>=20
>  * compile
>=20
>  * modload -s -v -o x -e ethfoo_lkmentry obj.i386/ethfoo_lkm.o
                                                    ^^^^^^^^^^^^
>    This is mostly a guess...
>=20
>  * "modstat" says:
> 	Type    Id   Offset Loadaddr Size Info     Rev Module Name
> 	DEV       0  -1/-1  c6d10000 0008 c6d11900   2 ethfoo
>=20
>  * "ifconfig -C" gives:
> 	bridge vlan stf tun pppoe
>=20
>    No ethfoo?!
>=20
>  * ifconfig ethfoo0 create
> 	ifconfig: SIOCIFCREATE: Invalid argument
>=20
> Um...
> 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).

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"Commala-come-five! / Even when the shadows rise!
To see the world and walk the world / Makes ya glad to be alive."
Susannah's Song, The Dark Tower VI, Stephen King, 2004.

--ABYnUdqoGSokwVM+
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQb/XFNgoQloHrPnoAQJY8Qf/aN9NLGRl/2qE5L8/hn3HnkcTyEcU1oIi
m0K/ScCHkyX1wKnk5wFTkJmNQvmUQ9mXhZZ2qaXEaNwyWm+WUfa9iW5+olVYCRwo
IYNpOkcbYDD64N8jpd+E2aN29L4+cJRT02PGTIYVCyISkb7Wstl5VXn8zYNcdoA7
SOjxUf4KkBFqLYDZi87zanBk+Ip90uoGGqGGwJ+OQvNxo4QkClZDiyFp1QelGwHb
5rQ4Yst64gmuvxu+FzJXk0CtExTnOs6TePNm0fXhPG83M4wO3prM1oiV6ZMgO2oD
06uTPLdlWIDBkzIGUi+tT8BLoo7gc8Ztja6UJq9AMlk6oLlopgA2Og==
=p9v+
-----END PGP SIGNATURE-----

--ABYnUdqoGSokwVM+--