Kernel 2.2 and device driver/modules

Kernel 2.2 and device driver/modules

Post by davi » Sat, 14 Apr 2001 20:29:14



I'm converting a device driver for an Avtec high speed serial I/O card
from the 2.0.X kernel to the 2.2.X kernel

Other then a few changes in the 'C' function profiles very little was
done to get  the code to compile without warnings.  The 2.2 code didn't
come with a Makefile so I modified a Makefile I used with the 2.0 code.

However, when I use insmod to load the module I got alot of unresolved
referneces, several of which are my variables, but most are system
variables and/or functions.

Was there a big change in the kernel from 2.0 to 2.2 that would cause
all of the unresolved variables and functions or I am doing something
really stupid here.

 I was thinking I had problems in 3 areas

    1. The makefile wasn't configured right and didn't compile or link
the code into a module correctly.

    2.  insmode was not resolving all the references

    3. Either the kernel has been radically changed from 2.0 to 2.2 or
the symbols were not being exported.

here's a list of unresolved references.

bh_active
boot_cpu_data
check_region
del_timer
disable_irq
enable_irq
free_dma
free_irq
interruptible_sleep_on
interruptible_sleep_on_timeout
jiffies
printk
register_chrdev
release_region
request_dma
request_irq
request_region
schedule_timeout
tq_immediate
tq_timer
unregister_chrdev

I am using a Caldera 2.3 distribution with a 2.2.10 kernel.

P.S.

The return email address is bad.

 
 
 

Kernel 2.2 and device driver/modules

Post by tlin » Sun, 15 Apr 2001 00:11:37


See below.


Quote:> I'm converting a device driver for an Avtec high speed serial I/O card
> from the 2.0.X kernel to the 2.2.X kernel

> Other then a few changes in the 'C' function profiles very little was
> done to get  the code to compile without warnings.  The 2.2 code didn't
> come with a Makefile so I modified a Makefile I used with the 2.0 code.

> However, when I use insmod to load the module I got alot of unresolved
> referneces, several of which are my variables, but most are system
> variables and/or functions.

> Was there a big change in the kernel from 2.0 to 2.2 that would cause
> all of the unresolved variables and functions or I am doing something
> really stupid here.

>  I was thinking I had problems in 3 areas

>     1. The makefile wasn't configured right and didn't compile or link
> the code into a module correctly.

Possible, and also make sure you boot up the system with the right kernel.

Quote:

>     2.  insmode was not resolving all the references

This may not be the problem, I did use some timer and irq in 2.2.16 kernel.
So I think the system should export them.

Quote:

>     3. Either the kernel has been radically changed from 2.0 to 2.2 or
> the symbols were not being exported.

Same reason as 2.

- Show quoted text -

Quote:

> here's a list of unresolved references.

> bh_active
> boot_cpu_data
> check_region
> del_timer
> disable_irq
> enable_irq
> free_dma
> free_irq
> interruptible_sleep_on
> interruptible_sleep_on_timeout
> jiffies
> printk
> register_chrdev
> release_region
> request_dma
> request_irq
> request_region
> schedule_timeout
> tq_immediate
> tq_timer
> unregister_chrdev

> I am using a Caldera 2.3 distribution with a 2.2.10 kernel.

> P.S.

> The return email address is bad.


 
 
 

Kernel 2.2 and device driver/modules

Post by Peter T. Breue » Sun, 15 Apr 2001 00:09:21



> Was there a big change in the kernel from 2.0 to 2.2 that would cause

Yes.

Quote:> all of the unresolved variables and functions or I am doing something
> really stupid here.

Yes.

Quote:>     3. Either the kernel has been radically changed from 2.0 to 2.2 or
> the symbols were not being exported.

That's the answer. 2.2. is a major new release number. It's incompatible
with 2.0.

Quote:> here's a list of unresolved references.
> bh_active
> boot_cpu_data
> check_region
> del_timer
> disable_irq
> enable_irq
> free_dma
> free_irq
> interruptible_sleep_on
> interruptible_sleep_on_timeout
> jiffies
> printk

 ^^^^^^^

Impossible. Printk is in the kernel! So you are doing something else
stupid. Possibly not compiling with -O? Or compiling for a kernel
without module support (oh, module support has chanegd radically)?
You do have flags -O2 -D__KERNEL__ -DMODULE ?

Peter

 
 
 

Kernel 2.2 and device driver/modules

Post by el.. » Sun, 15 Apr 2001 11:37:01




Quote:>Impossible. Printk is in the kernel! So you are doing something else
>stupid. Possibly not compiling with -O? Or compiling for a kernel
>without module support (oh, module support has chanegd radically)?
>You do have flags -O2 -D__KERNEL__ -DMODULE ?

Think MODVERSIONS.  This is such an FAQ.

--
http://www.spinics.net/linux/

 
 
 

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

Linux Kernel Module Programmer - A very loose environment, casual attire,
needs an intermediate to advanced Linux Kernel Module Programmer
immediately for a critical role. This person must have specific experience
in programming Unix kernel modules or drivers and TCP/sockets, preferably
with Linux kernel modules or drivers, or an understanding or experience of
parallel and distributed processing. Program a Linux kernal module to
fulfill the need for a routing program performing communications and shared
server resource management on web servers. These programming tasks are below
the socket level, but some manipulation of sockets is part of the tasks.
This person will perform cutting edge server applications development in a
parallel and distributed environment. This experience is a huge resume
boost.

Required Skills: MUST HAVE experience in programming a Unix or Linux KERNAL
MODULE or DRIVER! ... and C / Unix, networks and protocols, an innovative
mind that enjoys thinking out of the box, good work ethic, work well alone,
self motivated, requires little supervision.

Desired Skills: parallel and distributed processing.

Start Date: ASAP

Type: - Permanent -

Pay Range: $60,000 - $65,000 Annual
+stock options

Benefits: Health Insurance, Life Insurance, Dental Insurance, Disability
Insurance, Paid Vacation, Paid Sick Leave, Stock Options, Flex Time

Location: Ft. Worth , TX - Hurst, TX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TO APPLY, PLEASE CALL OR FORWARD RESUME TO:

Larry Bergstrom
Computer Staff, LLC
1701 W. Northwest Highway
Grapevine, Texas 76051-8105

OFFICE metro  (817) 329-5009
FAX   (817) 329-5091
WEBSITE:  http://www.compstaffonline.com/listings.html
HOME  (817) 251-2029
MOBILE  (817) 723-4298
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Information Technology Contract & Permanent Placement Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ALL RESUME RESPONDENTS ARE HELD CONFIDENTIAL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2. A Tale of Four Charters

3. Looking for device driver references for Linux 2.2 kernel.

4. best way to add win95 to NT+DOS+Linux system?

5. Can you use the NTFS module from 2.2 kernel to 2.0 kernel?

6. cross compiling - newbie

7. Kernel 2.2 Network Drivers to Kernel 2.4?

8. Connecting to a network using radio transceiver

9. "Segmentation fault " while porting a driver from kernel 2.2 to kernel 2.4

10. modify driver of kernel 2.2.x to kernel 2.0.x

11. how to write 2.2.X driver to receive parameter for linux module in load time

12. Sol 2.2 device driver

13. Q: Linux Device Drivers book code example in 2.2?