|
|
| Next: Unsubscription |
| Author |
Message |
Petter Reinholdtsen External

Since: Nov 10, 2004 Posts: 907
|
Posted: Sat Apr 21, 2007 1:20 pm Post subject: Some ideas regarding hardware detection and the installation system Archived from groups: linux>debian>maint>boot (more info?) |
|
|
During installation, and afterwards, there are a few things that could
be improved regarding hardware detection. Here are some ideas I have
on the topic.
At the moment, we have a system in place to load kernel modules
depending on the PCI (and USB) hardware detected during installation
and boot. I've also written a draft system to install debian packages
based on detected PCI and USB hardware. This system have a few flaws.
First of all, some hardware needing kernel modules are not acted on.
For example, to get CPU frequency scaling working, one need to detect
the CPU type and load a few kernel modules. Similar, to enable IPMI,
one need to detect if and which type of IPMI system is present.
Second, there is a maintenence problem as the mapping from PCI device
to debian package sometimes is the wrong one. Most packages support
devices (aka kernel modules), and not PCI devices. For instance RAID
administration tools support one or more kernel module, and the kernel
module support one or more PCI devices.
Third, some hardware is supported by kernel modules which are for
various reasons only distributed as source packages. When such
hardware is detected, the source package should be automatically
installed and the kernel module built and installed. For this to keep
working when the kernel is upgraded, some system to rebuild the source
when required need to be in place.
Last, one do not only want to detect and act on hardwrae during
installation and boot. If I connect a USB scanner, I would like the
Debian system to detect it and suggest to install the drivers required
to get the scanner working.
In short:
Hardware (PCI, DMI, CPU, USB, etc) mapped do one or more of
- Kernel module name
- X driver name
- Debian package
- Plain package driving the hardware
- Kernel module source package
- mapped to kernel module
Kernel modules mapped to
- Plain Debian package talking to the kernel module
Suggested Debian package should be installed automatically during
installation, and trigger some user/admin dialog asking if the
driver should be installed after installation.
I suspect the discover v2 package might be a good base to implement
this, as it already support mapping from various hardware types to
kernel module, X driver and Debian package. The missing parts are
- Mapping from kernel module to Debian package.
- User space dialog asking if a debian package should be installed.
- System to handle kernel source module packages (aka
module-assistant prepare/build/install).
What are your view on this? I plan to give a talk during DebConf
about these ideas, and wanted to run them past you all to get
feedback.
Friendly,
--
Petter Reinholdtsen
--
To UNSUBSCRIBE, email to debian-boot-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org |
|
| Back to top |
|
 |
Otavio Salvador External

Since: Dec 01, 2004 Posts: 622
|
Posted: Sat Apr 21, 2007 5:20 pm Post subject: Re: Some ideas regarding hardware detection and the installation system [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Petter Reinholdtsen <pere.DeleteThis@hungry.com> writes:
[...]
> Hardware (PCI, DMI, CPU, USB, etc) mapped do one or more of
> - Kernel module name
> - X driver name
About X driver would be nice to have fallback options. For example, if
the user has the non-free driver for nvidia this should be choosen
instead of nv but if it's not available, nv should be used.
> I suspect the discover v2 package might be a good base to implement
> this, as it already support mapping from various hardware types to
> kernel module, X driver and Debian package. The missing parts are
>
> - Mapping from kernel module to Debian package.
> - User space dialog asking if a debian package should be installed.
> - System to handle kernel source module packages (aka
> module-assistant prepare/build/install).
>
> What are your view on this? I plan to give a talk during DebConf
> about these ideas, and wanted to run them past you all to get
> feedback.
I'd love to have it in place and I'll probably be able to help on it
from by side.
I also think that before starting work on discover2 more closely we'd
remove discover1 completely from the system and drop their packages
from the archive. This would free us from support more then one
database (even being automaticaly produced using the v2 as origin).
--
O T A V I O S A L V A D O R
---------------------------------------------
E-mail: otavio.DeleteThis@debian.org UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
--
To UNSUBSCRIBE, email to debian-boot-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org |
|
| Back to top |
|
 |
Geert Stappers External

Since: Feb 20, 2005 Posts: 57
|
Posted: Sun Apr 22, 2007 12:20 pm Post subject: Re: Some ideas regarding hardware detection and the installation system [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Op 21-04-2007 om 12:56 schreef Petter Reinholdtsen:
>
> During installation, and afterwards, there are a few things that could
> be improved regarding hardware detection. Here are some ideas I have
> on the topic.
This comment is only on one idea.
> Third, some hardware is supported by kernel modules which are for
> various reasons only distributed as source packages. When such
> hardware is detected, the source package should be automatically
> installed and the kernel module built and installed. For this to keep
> working when the kernel is upgraded, some system to rebuild the source
> when required need to be in place.
<snip/>
> In short:
<snip/>
> Suggested Debian package should be installed automatically during
> installation, and trigger some user/admin dialog asking if the
> driver should be installed after installation.
>
> I suspect the discover v2 package might be a good base to implement
> this, as it already support mapping from various hardware types to
> kernel module, X driver and Debian package. The missing parts are
>
> - Mapping from kernel module to Debian package.
> - User space dialog asking if a debian package should be installed.
> - System to handle kernel source module packages (aka
> module-assistant prepare/build/install).
>
> What are your view on this? I plan to give a talk during DebConf
> about these ideas, and wanted to run them past you all to get
> feedback.
That automatic build of driver source into kernel module,
how automatic will that be?
What will the effect on the boot time?
Cheers
Geert Stappers
--
To UNSUBSCRIBE, email to debian-boot-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org |
|
| Back to top |
|
 |
Petter Reinholdtsen External

Since: Nov 10, 2004 Posts: 907
|
Posted: Sun Apr 22, 2007 10:00 pm Post subject: Re: Some ideas regarding hardware detection and the installation system [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
[Geert Stappers]
> That automatic build of driver source into kernel module,
> how automatic will that be?
>
> What will the effect on the boot time?
Not sure. I see two options, to make sure the kernel modules are
still available:
- compile the source with the new kernel when the new kernel is
installed. Not sure how to hook this into debian.
- compile the source when the system boot. This might be too late if
the kernel module is needed to access the disk or other hardware
required to boot.
There might be other options as well. I believe I read something
about some people working on a system to rebuild kernel modules at
boot time when the kernel change. I have not tracked down this
solution, so I do not know anything more.
Friendly,
--
Petter Reinholdtsen
--
To UNSUBSCRIBE, email to debian-boot-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org |
|
| Back to top |
|
 |
Petter Reinholdtsen External

Since: Nov 10, 2004 Posts: 907
|
Posted: Mon Aug 06, 2007 6:40 pm Post subject: Re: Some ideas regarding hardware detection and the installation system [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Today I made a small step further on my plan for better hardware
support in Debian. I added support in discover version 2.1.2-1 for
calling module-assistant in discover-pkginstall, and fixed a few
long-standing bugs in the debconf handling in that script.
With this change in place, calling discover-pkginstall will
- detect hardware and extract the list of packages supported by this
hardware
- install the packages
- if any of the packages were kernel module source packages, it will
call module-assistant {prepare,build,install} for the package, to
compile the kernel module and make it available in the installed
system.
Not very many kernel module source packages are recognized by the
discover-data package at the moment. Two devices using the
qla2x00-source package is all there is at the moment. The problem
with maintaining the mapping from hardware to debian package still
remain. At the moment it depend on manual updates based on user
feedback. If you know some hardware that is supported by a given
kernel module source package, please report them as wishlist bugs
against discover-data. If you want to test this feature you can add
entries to the /lib/discover/pci-device.xml file yourself.
I believe the next step is to call the discover-pkginstall script from
d-i during installation, to get the required packages installed.
Happy hacking,
--
Petter Reinholdtsen
--
To UNSUBSCRIBE, email to debian-boot-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org |
|
| Back to top |
|
 |
Otavio Salvador External

Since: Dec 01, 2004 Posts: 622
|
Posted: Mon Aug 06, 2007 8:00 pm Post subject: Re: Some ideas regarding hardware detection and the installation system [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Petter Reinholdtsen <pere.DeleteThis@hungry.com> writes:
> Not very many kernel module source packages are recognized by the
> discover-data package at the moment. Two devices using the
> qla2x00-source package is all there is at the moment. The problem
> with maintaining the mapping from hardware to debian package still
> remain. At the moment it depend on manual updates based on user
> feedback. If you know some hardware that is supported by a given
> kernel module source package, please report them as wishlist bugs
> against discover-data. If you want to test this feature you can add
> entries to the /lib/discover/pci-device.xml file yourself.
I think it can be improved. Let me explain my idea:
If we build the module that we want to add on the database and write a
small script that uses modules.alias file updated with it we can write
the database will full module knownledge available. This would all
make possible to write a small script that does make this
automatically.
grep ata_piix /lib/modules/2.6.22-1-686/modules.alias \
| sed 's,pci:v0000\(.*\)d0000\(.*\)sv.*,\1:\2,g' \
| sort -u
> I believe the next step is to call the discover-pkginstall script from
> d-i during installation, to get the required packages installed.
Can you please elaborate a little more how do you intend to do that? I
personally wouldn't like to have my system with gcc and like, needed
to build the module, so would be nice if we might purge those packages
after building it. I also don't know where do you think it might fit
better?
TIA,
--
O T A V I O S A L V A D O R
---------------------------------------------
E-mail: otavio.DeleteThis@debian.org UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
--
To UNSUBSCRIBE, email to debian-boot-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org |
|
| Back to top |
|
 |
Petter Reinholdtsen External

Since: Nov 10, 2004 Posts: 907
|
Posted: Mon Aug 06, 2007 9:10 pm Post subject: Re: Some ideas regarding hardware detection and the installation system [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
[Otavio Salvador]
> I think it can be improved. Let me explain my idea:
>
> If we build the module that we want to add on the database and write a
> small script that uses modules.alias file updated with it we can write
> the database will full module knownledge available. This would all
> make possible to write a small script that does make this
> automatically.
>
> grep ata_piix /lib/modules/2.6.22-1-686/modules.alias \
> | sed 's,pci:v0000\(.*\)d0000\(.*\)sv.*,\1:\2,g' \
> | sort -u
I am unable to understand the idea. It might be because I do not know
the use of the modules.alias file.
> Can you please elaborate a little more how do you intend to do that?
> I personally wouldn't like to have my system with gcc and like,
> needed to build the module, so would be nice if we might purge those
> packages after building it. I also don't know where do you think it
> might fit better?
Well, my idea is to just install everything needed to build the kernel
module if the hardware need such kernel module and then build and
install it. After all, the kernel module need to be built again when
the kernel is upgraded, and thus the compiler need to be present then.
And I am not quite sure where in d-i it fits, but suspect some time
after tasksel is done as a script included in the hw-detect udeb .
Happy hacking,
--
Petter Reinholdtsen
--
To UNSUBSCRIBE, email to debian-boot-REQUEST RemoveThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster RemoveThis @lists.debian.org |
|
| Back to top |
|
 |
Otavio Salvador External

Since: Dec 01, 2004 Posts: 622
|
Posted: Mon Aug 06, 2007 9:30 pm Post subject: Alternative to make a module support database (was Re: Some ideas regarding hardware detection and the installation system) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Petter Reinholdtsen <pere DeleteThis @hungry.com> writes:
> [Otavio Salvador]
>> I think it can be improved. Let me explain my idea:
>>
>> If we build the module that we want to add on the database and write a
>> small script that uses modules.alias file updated with it we can write
>> the database will full module knownledge available. This would all
>> make possible to write a small script that does make this
>> automatically.
>>
>> grep ata_piix /lib/modules/2.6.22-1-686/modules.alias \
>> | sed 's,pci:v0000\(.*\)d0000\(.*\)sv.*,\1:\2,g' \
>> | sort -u
>
> I am unable to understand the idea. It might be because I do not know
> the use of the modules.alias file.
It has a list of pciids that a module has support to. Basically is
what udev uses for probing them. So we might use it to build the
database of external modules.
--
O T A V I O S A L V A D O R
---------------------------------------------
E-mail: otavio DeleteThis @debian.org UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
--
To UNSUBSCRIBE, email to debian-boot-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org |
|
| Back to top |
|
 |
Otavio Salvador External

Since: Dec 01, 2004 Posts: 622
|
Posted: Mon Aug 06, 2007 9:30 pm Post subject: Add support for installing packages for hardware support on d-i (was Re: Some ideas regarding hardware detection and the installation system) [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Petter Reinholdtsen <pere.DeleteThis@hungry.com> writes:
> [Otavio Salvador]
>> Can you please elaborate a little more how do you intend to do that?
>> I personally wouldn't like to have my system with gcc and like,
>> needed to build the module, so would be nice if we might purge those
>> packages after building it. I also don't know where do you think it
>> might fit better?
>
> Well, my idea is to just install everything needed to build the kernel
> module if the hardware need such kernel module and then build and
> install it. After all, the kernel module need to be built again when
> the kernel is upgraded, and thus the compiler need to be present then.
Right.
> And I am not quite sure where in d-i it fits, but suspect some time
> after tasksel is done as a script included in the hw-detect udeb .
Yes. I personally agree that it might be done after tasksel since it
could have installed alternative packages or something before and
hence avoiding duplication.
So it might be done at beggining of finish-install. It can be a script
present on hw-detect but putting it at finish-install.d.
What others thing about it?
--
O T A V I O S A L V A D O R
---------------------------------------------
E-mail: otavio.DeleteThis@debian.org UIN: 5906116
GNU/Linux User: 239058 GPG ID: 49A5F855
Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
you the whole house."
--
To UNSUBSCRIBE, email to debian-boot-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org |
|
| Back to top |
|
 |
Petter Reinholdtsen External

Since: Nov 10, 2004 Posts: 907
|
Posted: Tue Aug 07, 2007 1:00 pm Post subject: Re: Alternative to make a module support database [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
[Otavio Salvador]
> It has a list of pciids that a module has support to. Basically is
> what udev uses for probing them. So we might use it to build the
> database of external modules.
Right. then I understand what you mean. And yes, that can be done.
I have earlier used the modules.pcimap file for this, and was not
aware that udev didn't use it directly.
I used a similar methot to update (manually) some entries in
discover-data, by installing and building serveral -source packages,
looking in pcimap to find their supported PCI ids, and then used this
information to add the package name to pci-device.xml. But it should
be done automatically to make sure it stay up-to-date.
Happy hacking,
--
Petter Reinholdtsen
--
To UNSUBSCRIBE, email to debian-boot-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|