Skip to contentSkip to conversation

Making a module 2.4 compatible

DISCUSSION James Lamanna 3 participants 3 messages Jun 24, 2001 – Jun 25, 2001

lore
Share & tools
lore
#0 lore raw

I have a kernel module for a robot that was developed for the 2.0 and 2.2 kernels and does not work under 2.4. Unfortunately, the company that made it is not in business anymore. It would be nice to have it working under 2.4, so is there someplace that outlines some of the major things that would have changed so I can update the module accordingly?

Thanks,
--James Lamanna

#1 lore raw

** Reply to message from James Lamanna <[email protected]> on Sat, 23 Jun 2001 22:10:58 -0700

Quoted 3 lines

It would be nice to have it working under 2.4, so is there someplace that outlines some of the major things that would have changed so I can update the module accordingly?

Unfortunately, no. But if it turns out I'm wrong, please let me know what you find.

Signature · 2 lines
Timur Tabi - [email protected]
Interactive Silicon - http://www.interactivesi.com
#2 lore raw
Quoted 11 lines · Timur Tabi

** Reply to message from James Lamanna <[email protected]> on Sat, 23 Jun 2001 22:10:58 -0700

Quoted 3 lines

It would be nice to have it working under 2.4, so is there someplace that outlines some of the major things that would have changed so I can update the module accordingly?

Unfortunately, no. But if it turns out I'm wrong, please let me know what you find.

As a start:

wait_queue_head_t Now defined.
You can do '#if !defined(...)` and make code changes backwards compatible.

Macro, THIS_MODULE is now the first member of struct file_operations.

Include <linux/init.h> __init data type for one-time initialization code
or data.
This is new, hense not backwards compatible.

Explicit initialization of spin-locks, SPIN_LOCK_UNLOCKED and/or

			spin_lock_init(spinlock_t *);

If you fix this, it's backwards compatible.

ioremap() and friends is now required even for low memory stuff. You can no longer access this with a simple pointer, you must use readl()/writel(), etc., for proper defererence. If you fix this, it's backwards compatible.

These changes should get your module to compile (or nearly so).

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of course you get it all back when you reboot..."; Actual explanation obtained from the Micro$oft help desk.