LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Some more Questions : )

[ILUG] Some more Questions : )

John P. Looney jplooney-ilug at online.ie
Wed Feb 2 11:49:44 GMT 2000


On Wed, Feb 02, 2000 at 03:13:23AM -0800, Vinayak Risbud mentioned:
> Is it possible to RESTART a Device Driver in Linux (Manually or
> through a program)?

 If a Device Driver is written with "Module" support in mind, you may
create a single binary file, and distribute this to users. They can then
run: "modprobe mymodule", and it will look in
/lib/modules/kernelversion/*/ for the module. 

 It's quite possible to unload a running module (if no program is using
it), copy in a new/updated version of the module, and reload it, without
rebooting. To "restart" a driver, you can just run:

# rmmod mymodule
# modprobe mymodule

 However, Linus has stated, that when you make a "binary" module, it can
only be installed in the version of the Linux kernel that it was written
for. If you compile a binary module, against 2.2.12-20 (which ships with
RedHat 6.1), it will work with that version, and only that version. Why
such a restriction, you make ask ? So that kernel developers don't have to
keep to old APIs, to retain backward compatibility.

 There is an excellent book on writing device drivers, called "Linux
Device Drivers (Nutshell Handbook)" by Alessandro Rubini, Andy Oram.
However, if you are a commercial entity, it may be better to hire a
current Linux developer to write the drivers for you. A mail to the
linux-kernel mailing list would get you many interested developers, though
future support could be a problem. If your hardware is likely to be
popular, a release of complete programming specs (or just the source of an
NT driver) would spur someone to write the driver themeselves, for free,
and maintain it.

 It's recommended that if you want to write and distribute a driver, that
will work with *any* kernel version, you should send Alan Cox (the
"stable" kernel maintainer) a patch between a current 2.2.x kernel, and
your 2.2.x kernel with kernel module installed in it. It would then be
distributed with any future linux kernels, free of charge :)

> In Windows we have,  registry database, where in we dump all
> system related information.  Do we have a similar registry in
> Linux ?

 Not really. All applications are invited to install a configuration file
in /etc, or make a directory in /etc/ if there are many configuration
files. For graphical applications, the "GNOME desktop environment" offers
a registry-style API, that allows you to save key/value pairs, like the
Microsoft registry. However, it is for user-preferences style information,
and it maps directly to a directory in a users ~/.gnome/ directory.

John

-- 
Do you have a problem with American Mulitnationals forcing the arrest of a 
Norwegian 16 year old, because he made them look like fools by cracking
DVD encryption, so he could play his own DVDs, and then sharing his DVD
player ? Sign the petition: http://linuxguiden.linpro.no/protesteng.php




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell