how to make driver module

how to make driver module

Post by mitc » Tue, 22 Feb 2000 04:00:00



I am developing a network driver.

And I need only one object file to setup module.

But I have several source.

Examples about make file)

hwmain.o: hwmain.o hwfpga.o
 gcc -c hwmain.o hwmain.o hwfpga.o

----> I don't want to link.
             I only need one object file from hwmain.o and hwfpga.o
             Because driver needs one object module.

hwmain.o:hwmain.c
 gcc -c hwmain.c -O2 -Wall -Wstrict-prototypes \
               -fomit-frame-pointer \
        -fno-strength-reduce -pipe -m486 -malign-loops=2 \
        -malign-jumps=2 -malign-functions=2 -DCPU=486 \
        -DMODULE -D__KERNEL__

hwfpga.o:source/hwfpga.c
 gcc -c source/hwfpga.c -O2 -Wall -Wstrict-prototypes \
               -fomit-frame-pointer \
        -fno-strength-reduce -pipe -m486 -malign-loops=2 \
        -malign-jumps=2 -malign-functions=2 -DCPU=486 \
        -DMODULE -D__KERNEL__

 
 
 

how to make driver module

Post by Ralf Rende » Tue, 22 Feb 2000 04:00:00


Try

ld -r hwmain.o hwfpga.o -o hwmodule.o

Ralf.

 
 
 

how to make driver module

Post by mitc » Wed, 23 Feb 2000 04:00:00


I tried to make object file by your advice.

And I successed.

Thank you for your help.


> Try

> ld -r hwmain.o hwfpga.o -o hwmodule.o

> Ralf.

 
 
 

how to make driver module

Post by Ralf Rende » Wed, 23 Feb 2000 04:00:00


Try

ld -r hwmain.o hwfpga.o -o hwmodule.o

Ralf.

 
 
 

how to make driver module

Post by hoter » Fri, 25 Feb 2000 04:00:00


Where you find ifo about this? if you have , can you send it to me?

                                                        Thanx Hernan


> I am developing a network driver.

> And I need only one object file to setup module.

> But I have several source.

> Examples about make file)

> hwmain.o: hwmain.o hwfpga.o
>  gcc -c hwmain.o hwmain.o hwfpga.o

> ----> I don't want to link.
>              I only need one object file from hwmain.o and hwfpga.o
>              Because driver needs one object module.

> hwmain.o:hwmain.c
>  gcc -c hwmain.c -O2 -Wall -Wstrict-prototypes \
>                -fomit-frame-pointer \
>         -fno-strength-reduce -pipe -m486 -malign-loops=2 \
>         -malign-jumps=2 -malign-functions=2 -DCPU=486 \
>         -DMODULE -D__KERNEL__

> hwfpga.o:source/hwfpga.c
>  gcc -c source/hwfpga.c -O2 -Wall -Wstrict-prototypes \
>                -fomit-frame-pointer \
>         -fno-strength-reduce -pipe -m486 -malign-loops=2 \
>         -malign-jumps=2 -malign-functions=2 -DCPU=486 \
>         -DMODULE -D__KERNEL__

 
 
 

1. editing modules.conf to load sound driver modules

After installing RH 8 my /etc/modules.conf looked like this:

  > alias parport_lowlevel parport_pc
  > alias eth0 8139too
  > alias sound-slot-0 via82cxxx_audio
  > post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L
  >/dev/null 2>&1 || :
  > pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S
  >/dev/null 2>&1 || :
  > alias sound-slot-1 es1371
  > post-install sound-slot-1 /bin/aumix-minimal -f /etc/.aumixrc -L
  >/dev/null 2>&1 || :
  > pre-remove sound-slot-1 /bin/aumix-minimal -f /etc/.aumixrc -S
  >/dev/null 2>&1 || :
  > alias usb-controller usb-uhci

I have an audio pci 128 (es1371) sound card as you can see and couldn't
get any sounds.
However, I quoted out the lines that load the via82cxxx module to
sound-slot-0 and changed sound-slot-1 to sound-slot-0 so that
modules.conf looked like this:

  > alias parport_lowlevel parport_pc
  > alias eth0 8139too
  > ### alias sound-slot-0 via82cxxx_audio
  > ##post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L
  >/dev/null 2>&1 || :
  > ##pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S
  >/dev/null 2>&1 || :
  > alias sound-slot-0 es1371
  > post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L
  >/dev/null 2>&1 || :
  > pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S
  >/dev/null 2>&1 || :
  > alias usb-controller usb-uhci

I can now get sounds after rebooting but it sounds a bit scratchy.  Is
there any way I can improve the sound quality.  It sounds much better
under XP.  Would installling the ALSA drivers improve sound qualtiy?

Thanks
James

2. NIS software for Slackware 96

3. Ft. Worth - Linux Kernel Module Programmer - Unix kernel modules & Unix device drivers

4. mscreen

5. How can I put a module/driver below IP driver in a stream?

6. How to display texinfo help pages?

7. rc (plan9 shell) on unix -- configuration file

8. Streams drivers standard module/driver interfaces

9. Making a PCI SCSI module

10. Making HPFS module?

11. making/linking Sound Modules