2002-10-04 04:19:09

by immortal1015

[permalink] [raw]
Subject: How to replace the network cards

Hi, all. Sorry for my stupid problems.
I installed Redhat7.2 on my computer and netcard was installed properly.
I used 'lsmod' and find my network card driver module is 'pcnet32'. Now
I have modified the source code in pcnet32.c and compile it. How can I
make my modifications work?




2002-10-04 04:33:22

by David Lloyd

[permalink] [raw]
Subject: Re: How to replace the network cards


Hi There,

> Hi, all. Sorry for my stupid problems.

If you weren't called "immortal" I'd forgive you, but if you are a god
surely you would know all!

> I installed Redhat7.2 on my computer and netcard was installed properly.
> I used 'lsmod' and find my network card driver module is 'pcnet32'. Now
> I have modified the source code in pcnet32.c and compile it. How can I
> make my modifications work?

make modules
make modules_install

...should do it unless you've got your pcnet32.c not in its usual place
in the kernel tree.

[ I hope that made sense :-) ]

DSL
--
Qualcuno no mi basta.
Vivere cercando il grande amore.
Vivere come se mai dovessimo morire.
(Anastasio, Valli e Travato)

2002-10-04 04:50:19

by immortal1015

[permalink] [raw]
Subject: Re: Re: How to replace the network cards

:)))
Thanks. But how can I do it if I have move pcnet32.c to my own place.
>Hi There,
>
>> Hi, all. Sorry for my stupid problems.
>
>If you weren't called "immortal" I'd forgive you, but if you are a god
>surely you would know all!
>
>> I installed Redhat7.2 on my computer and netcard was installed properly.
>> I used 'lsmod' and find my network card driver module is 'pcnet32'. Now
>> I have modified the source code in pcnet32.c and compile it. How can I
>> make my modifications work?
>
>make modules
>make modules_install
>
>....should do it unless you've got your pcnet32.c not in its usual place
>in the kernel tree.
>
>[ I hope that made sense :-) ]
>
>DSL
>--
>Qualcuno no mi basta.
> Vivere cercando il grande amore.
> Vivere come se mai dovessimo morire.
>(Anastasio, Valli e Travato)
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/



2002-10-04 05:35:10

by Chad Netzer

[permalink] [raw]
Subject: Re: How to replace the network cards (kernel newbies)

On Thursday 03 October 2002 21:56, immortal1015 wrote:
>
> Thanks. But how can I do it if I have move pcnet32.c to my own place.

Well, you can make a copy of the existing kernel tree, and simply
modify things in there, then "make modules_install". Or you can make a
link from the kernel tree pcnet32.c, to your own.

If you don't have space or permissions for that, you are pretty much
SOL, I think. :-)

Ok, I kid you. Put the driver somewhere, and type something like:

gcc -D__KERNEL__ -I/usr/src/linux-2.4.19/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686
-DMODULE -nostdinc -I /usr/lib/gcc-lib/i386-linux/2.95.4/include
-DKBUILD_BASENAME=pcnet32 -c -o pcnet32.o pcnet32.c

Or whatever the actual command is that is output for the module when
you build the unmodified kernel.

Then copy it to /lib/modules/2.4.19/kernel/drivers/net/, or wherever,
and "insmod" away.

--

Chad Netzer
[email protected]