Hardware report, database and popcon(no more pastebin)
DebConf9
Caceres, Extremadura, Spain
Frank lin Piat2009-07-28
Introduction
Hardware support implies two different points :
Providing a driver(Kernel modules and out-of-tree modules/module-assistant, Xorgdrivers, User space tools like libusb)
Configuring the system.(The kernel udev, modules, etc.)
Developers needs...
For each supported distribution:
Which device are used (how many “votes”)
Is it handled by a driver for release X
Is it the standard driver for release X
Is it handled by all systems running that distro? (i.edoes is require manual configuration)
Which device, on which architecture?
Other needs?
Users needs...
Is a given system supported by release X?
Is a given device supported by release X?
What are the configuration step to “it” working?
Which distribution should I use to support “it”?
Other needs?
Vendor needs
Does product $foo works under Debian?
Which version?
What should the users do?
What URL lists the supported device?
How to test product automatically? (regression test,etc.)
Other needs?
Periodical inventory(popcon)
Automatictesting
User feedback
Why a hardware database ?
Debian already collects hardware information inmultiple places (installation-report, Xorg bugreport,IRC's pastebin and mailing list for hardware support,etc).
It's just that that it isn't in a database currently.
Improve hardware support, by reportingincompatibility.
Listing compatibility, through Installation guide.
What we can't do at the moment :
Advise user for (un)supported hardware.
Put the pressure on vendors, to get them to supportFree software.
… and a lots more things.
Situation in Lenny
Supported and unsupported devices are trackedindividually through installation-reporthttp://lists.debian.org/debian-boot/2009/07/msg00583.html
List supported device on the wiki:http://wiki.debian.org/DeviceDatabase/PCIhttp://wiki.debian.org/DeviceDatabase/USBSome usb devices, like smartcardshttp://wiki.debian.org/Smartcards
Configuration HowTo are on the Wiki, see:http://wiki.debian.org/WiFi
Existing tools
Smolt (Redhat, Fedora...)
Graphical user interface, to collect basic informationabout the system, and prompt the status to the user.
Smolt (to collect the status of devices manually)https://hosted.fedoraproject.org/smolt/wiki
Certified Hardware (no obvious relation with smolt)https://hardware.redhat.com/
+ It has both a GUI and cron job.
- It is written in Python (doesn't work in D-I)
Ubuntu
This project provides an extensible interface forsystem testing. The results can then be sent toLaunchpad.
- python based- more like “installation-report” bug reports.
Hardware4Linux
Hardware4linux.info is a web site to lookup and reporthardware compatibility and incompatibility withLinux distributions.
+ mostly shell script based- minimalist (currently)- not meant to be distributed (must fork tocustomize)
Others
Suse/OpenSuse (>= v11) : use Smolt
Yet another tool?
 
Expected features
*** Report Existing System and device identification (DMI ; PCI    ids, etc..). = FirstBoot*** Report Used Systems and devices. Weekly report, like    popularity contest.**  Report if the device has a driver.*   Report if the device is working.*** Compatible with all setups.- don't depends on Python, HAL.- don't be hardware specific- don't depends on network connectivity.- don't depends on persistent storage (?)*** Be useful to improve unsupported hardware.    - Ask the if everything works fine. if not, upload logs)*** Be useful to support users (no more pastebin !)
Collecting supported Devices
Analyse Debian packages to list devicesthat should be supported
Analyze running systemto list devices thatare actually supported
Database
Pull descriptions fromvarious sources(pci.ids, etc)
Analyse Debian packages
The old time time drivers had to probe devices isover.
Recent devices allow device enumeration
So the package (binary or source) contain somedatabase or some logic to know which driver to use
Analyse packages: kernel modules
$ modinfo e1000e
filename:       /lib/modules/2.6.30-1-686/kernel/drivers/net/e1000e/e1000e.ko
version:        0.3.3.4-k4
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
srcversion:     B1336DB1DEA6916DAB37059
alias:          pci:v00008086d000010DFsv*sd*bc*sc*i*
alias:          pci:v00008086d000010DEsv*sd*bc*sc*i*
alias:          pci:v00008086d000010CEsv*sd*bc*sc*i*
alias:          pci:v00008086d000010CDsv*sd*bc*sc*i*
...
vermagic:       2.6.30-1-686 SMP mod_unloadmodversions 686
Analyse packages: libccid (usb)
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//AppleComputer//DTD PLIST 1.0//EN""http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>        <key>CFBundleExecutable</key><string>libccid.so</string>        <key>ifdManufacturerString</key><string>Ludovic Rousseau</string>        <key>ifdProductString</key><string>Generic CCID driver</string>        <key>ifdVendorID</key>        <array> <string>0x08E6</string><string>0x08E6</string>  </array>        <key>ifdProductID</key>        <array> <string>0x2202</string><string>0x3437</string> </array>        <key>ifdFriendlyName</key>        <array> <string>Gemplus Gem e-SealPro</string>                     <string>Gemplus GemPCTwin</string>        </array>
</dict></plist>
Analyse a system: list of devices
The kernel or an appropriate tool can effectivelyenumerate the devices on a given system
Often, it is possible to query which driver handles adevice
PCI bus
lspci  -s 02:00.0 -nnv02:00.0 Ethernet controller [0200]: Intel Corporation 82573L Gigabit Ethernet Controller[8086:109a]Subsystem: Lenovo ThinkPad T60 [17aa:2001]Flags: bus master, fast devsel, latency 0, IRQ 28Memory at ee000000 (32-bit, non-prefetchable) [size=128K]I/O ports at 2000 [size=32]Capabilities: [c8] Power Management version 2Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+Capabilities: [e0] Express Endpoint, MSI 00Capabilities: [100] Advanced Error ReportingCapabilities: [140] Device Serial Number 00-15-58-ff-ff-2b-6f-7eKernel driver in use: e1000e
System: /proc/cpuinfo, DMI...
$ dmidecode -t 1# dmidecode 2.9SMBIOS 2.4 present.Handle 0x0001, DMI type 1, 27 bytesSystem InformationManufacturer: LENOVOProduct Name: 1952W5RVersion: ThinkPad T60Serial Number: BEEEEFUUID: 12345678-901234567-89012345678901234Wake-up Type: Power SwitchSKU Number: Not SpecifiedFamily: ThinkPad T60
The collector
Should be 100% busybox/D-I compatible
Use fall backs (use lspci, or probe devices)
Try to collect the data the way the package woulduse them for device detection.
Output is XML, so it is a single extensible file.
Handle privacy issues.
 
See report.sh and xml report
 
Comments, Questions?
Help is welcome :-)
Improving the collectors for live systems
Implement collectors for package information
Supporting non x86 architectures
Website (expose database)
Website (analyze uploaded data for different distribution)
Integration within D-I
Integration DebianLive
Windows, MacOS... collectors
Implement pastebin replacement
 
Thank you.
Appendix - A
Shared database with other distributions ?
Shared database with other distributions?
Shared database with other distros isn't important.
That's because different distribution have differenttimeline, different kernel versions and differentpatch sets. Therefore, knowing that a given devicesworks on distribution foo doesn't help the user ofdistribution bar.
Also,
we need direct access to the logs !!!
we want to correlate hardware and installedpackages to recommend packages.