2001-10-29 23:27:11

by Josh Hansen

[permalink] [raw]
Subject: Ease of hardware configuration

Hello,
Perhaps I'm beating a dead horse with this, but my belief is that the feature
of greatest benefit to "Joe User" would be simplified hardware
installation/configuration. A user coming from Windows who is used to being
able to plug in a scanner, a mouse, a video card, whatever and having the OS
tell him what it is and automatically set up drivers for him will have real
trouble coming to Linux and having to compile a new kernel or new kernel
module for a new piece of hardware.
I am not familiar with the innards of the Linux Kernel, but here is my
"vision" of what could be done to change this. The kernel already is able to
detect what hardware is attached to the system's different buses generally
speaking, so the next step is for it to identify which hardware already has
drivers installed for it (built into the kernel or loaded modules). If no
drivers are installed, a kernel message to the effect of "New Hardware
Detected" could be issued. That is all the kernel has to do. The next steps
are handled in userspace software.
Some sort of daemon or cronjob mechanism can then monitor kernel messages
until it finds the "New Hardware Detected" message. Then, a generic
configuration utility is launched along with an appropriate frontend (simple,
ncurses, GTK+, KDE, Motif, Tcl/Tk, whatever...) to allow the user to
configure the device.
Now here comes the radical part (ok, so all of this is somewhat radical): the
configuration utility connects to a server such as linuxdevicedrivers.org or
some other slick domain name and downloads the appropriate kernel module
binaries for the hardware based on kernel version number and architecture
(example: nVidia GeForce module for kernel 2.4.13 on i386, or USB Scanner
module for kernel 2.4.4 on PowerPC). Once the module is obtained, it is
loaded into the kernel (with explicit IO/IRQ parameters for older hardware if
necessary).
Once the module is loaded, the utility quits.
The configuration utility could also allow for loading of modules from floppy
disk or any other filesystem, or from another internet server.
A working name for this utility and kernel message system could be "Linux
Kernel Device Configurator".
I expect that there will be many technical or other objections to such a
system. I also expect to get ripped apart by at least a few hackers out
there. However, that's great! I want input. I think this or a similar
mechanism could really increase the ease of use for the "average user" and
his nephew's godmother's granddaughter's roommate's dog, etc., etc.
Thank you!
- Josh Hansen



2001-10-30 04:40:10

by Greg KH

[permalink] [raw]
Subject: Re: Ease of hardware configuration

On Mon, Oct 29, 2001 at 05:27:34PM -0600, Josh Hansen wrote:
> Now here comes the radical part (ok, so all of this is somewhat radical): the
> configuration utility connects to a server such as linuxdevicedrivers.org or
> some other slick domain name and downloads the appropriate kernel module
> binaries for the hardware based on kernel version number and architecture
> (example: nVidia GeForce module for kernel 2.4.13 on i386, or USB Scanner
> module for kernel 2.4.4 on PowerPC). Once the module is obtained, it is
> loaded into the kernel (with explicit IO/IRQ parameters for older hardware if
> necessary).
> Once the module is loaded, the utility quits.

Please check out the linux-hotplug package:
http://linux-hotplug.sf.net/

It does most of what you are talking about right now. And if it's
missing anything that you want, feel free to contribute :)

thanks,

greg k-h

2001-10-30 08:05:44

by Rob Landley

[permalink] [raw]
Subject: Re: Ease of hardware configuration

On Monday 29 October 2001 18:27, Josh Hansen wrote:

> A working name for this utility and kernel message system could be "Linux
> Kernel Device Configurator".

Or, on redhat, you could call it "kudzu". (Type "man kudzu".) I first
noticed it in the boot sequence during... 6.2? Might have been there
earlier...

Now true hotplug is a seperate issue. Kudzu runs at boot time (or when you
type it in from the command line) and detects network cards and mice and
stuff. You can't hotplug PCI. (Well, you can, but not if you expect it to
WORK. Or if you don't want to replace burned out pieces of hardware.)
Generally, for hotpluggable bus types, we have a daemon. There's one for
pcmcia/cardbus devices, for example. I'm guessing there's something for USB
(I don't use it). All of this is sort of getting not-exactly integrated into
devfs, which also has a userspace daemon and does automatic device detection.

Auto-detecting oddball peripherals connected to serial and paralell ports
(mice and printers) is a problem for things like XFree86 or the print spooler
that actually uses them. (And if you run kudzu it'll get those too, it just
doesn't know WHEN to run because they don't generate a hotplug interrupt when
they get changed.) Again, a user space issue.

As for downloading fresh drivers newer than your distribution (ala debian's
apt-get), that's tangled up in binary compatability issues between module
versions. Installing modules for just about every single supported driver
takes up... ("du /lib/modules/2.4.2-2"...) 22 megabytes. I have PDF files
larger than that. (If you want to start a binary module compatability
flamewar, feel free, but it's an ooooooooold issue steeped in politics.)

As for replacing the entire kernel without the user prompting... That's just
plain dangerous. (Especially aimed at users who dunno what to do when things
go wrong. And I'm not just talking about 2.4.11...)

> I expect that there will be many technical or other objections to such a
> system.

Such as the fact it's pretty much already been implemented by distribution
vendors, and is not really a kernel issue at all but a user space issue?

I also expect to get ripped apart by at least a few hackers out
> there. However, that's great! I want input. I think this or a similar
> mechanism could really increase the ease of use for the "average user" and
> his nephew's godmother's granddaughter's roommate's dog, etc., etc.

Have you tried Red Hat 7.2, with the KDE desktop? My cat HAS tried to use
it. (Sphynx sent an email I wasn't finished typing. Sat right in my lap,
reached out and pressed the mouse button. Kind of impolite, I thought. Then
again she's a lap cat, which means my laptop and her body compete for the
same ecological niche...)

> Thank you!
> - Josh Hansen

There's an old saying on usenet. If you want answers, don't ask questions.
Post errors. It works for me.

Rob

2001-10-30 09:14:27

by Alan

[permalink] [raw]
Subject: Re: Ease of hardware configuration

> stuff. You can't hotplug PCI. (Well, you can, but not if you expect it to
> WORK. Or if you don't want to replace burned out pieces of hardware.)

You can hotplug PCI. It's called cardbus. There is also full hotplug PCI
in the -ac kernel tree for people with expensive motherboards. The kernel
handles a fair bit of it ok. Hotplugging the video console isnt a good
idea right now, and the disk drivers need work, but for basic stuff like
network cards it works out.

Alan