[debian-edu-commits] r78702 - trunk/src/hw-support-handler

pere at alioth.debian.org pere at alioth.debian.org
Fri Jan 11 10:37:02 UTC 2013


Author: pere
Date: 2013-01-11 10:37:02 +0000 (Fri, 11 Jan 2013)
New Revision: 78702

Added:
   trunk/src/hw-support-handler/README
Log:
Add notes.

Added: trunk/src/hw-support-handler/README
===================================================================
--- trunk/src/hw-support-handler/README	                        (rev 0)
+++ trunk/src/hw-support-handler/README	2013-01-11 10:37:02 UTC (rev 78702)
@@ -0,0 +1,133 @@
+Make it easier to get pluggable hardware working in Debian
+==========================================================
+
+Imagine you just bought yourself ColorHug[1] or a LEGO Mindstorms
+NXT[2], and you plug it into your trusty old Debian computer to test
+it, but nothing happen.  There is no meny option to use it, and no
+feedback from the system on what is missing.  Despite the fact that
+the software to use these dongles are present in Debian and only a
+short 'apt-get install' away, there is no automatic way to let the
+user know about this.
+
+ 1) <URL: http://www.hughski.com/ >
+ 2) <URL: http://mindstorms.lego.com/en-us/default.aspx >
+
+Ubuntu got Jockey to handle these things, and Mandriva got Harddrake,
+but there is nothing in Debian to implement this yet.  But neither the
+Ubuntu nor Mandriva solution handle many hot-pluggable devices.  They
+mostly focus on video and wireless network cards, required to get the
+machine working, not the vast collection of fun and useful packages in
+Debian for the Arduino, the Mark And Spenser Rocket Launcer, the
+Yubikey or the Simtec entropyKey.  This is an area where Debian can do
+better. :)
+
+To rectify this, I propose to implement a system to let the user know
+what to install and make it easy to install it.  The idea is simple:
+
+ 1) Listen for notifications when new hardware is plugged in (dbus,
+    kernel events, something?)
+
+ 2) For new hardware, look up which packages include drivers/support
+    software.
+
+ 3a)Show dialog to the user proposing to install the packages.
+ or
+ 3b)Show desktop notification suggesting to install package.
+
+ 4) Install requested packages.
+
+The machanism used to install packages can be PackageKit or something
+else.
+
+The discover based implementation
+---------------------------------
+
+The discover package and data format support mapping PCI and USB
+devices to anything, and have been used in the past to map to XFree86
+package, kernel module and debian package.  The last feature is used
+here to figure out what package to install.  The discover-pkginstall
+script is used to figure out what package support the current hardware
+set.  To add a new mapping, an entry like this need to be added in the
+discover-data package.  For an USB device, this block would go into
+the usb-device.xml file:
+
+  <device vendor='1130' model='0202' model_name='Rocket Launcher'>
+    <data class='package'>
+      <data class='debian'>
+        <data class='name'>pymissile</data>
+      </data>
+      <data class='last-updated'>2013-01-09</data>
+      <data class='last-updated-by'>pere at hungry.com</data>
+    </data>
+  </device>
+
+This system have the advantage of working without any help from
+package maintainers or the FTP masters in Debian (which could help
+inject Modaliases headers to the Packages files if the packages
+themselves lack the information).  It is also easier to backport, as
+there is only one or two packages (discover-data and discover) that
+need to change.
+
+But it has a disadvange of being centrally controlled, and thus harder
+for most people in Debian to add mapping for new hardware.
+
+The Ubuntu implementation
+-------------------------
+
+The Ubuntu approach is to add a new header binary package Modaliases
+in debian/control, listing the PCI or USB device IDs (aka modalias)
+handled by a given package.  The design is based on how modprobe and
+the kernel work on Linux.  The entries look like this:
+
+  Modaliases: module(<bus>:<alias-specification>, <bus>:<alias-specification>)
+
+The bus:alias-specification is compared with the content of
+/sys/<bus>/bus/devices/*/modalias using file globbing rules, and the
+matching packages are proposed to the user.  Here is an example from
+Ubuntu Universe:
+
+  Package: virtualbox-guest-dkms
+  Modaliases: vboxguest(pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*)
+
+Users with machines including a device with the PCI vendor ID 08EE and
+model ID CAVE subvendor ID 0 and subdevice 0 will get a suggestion to
+install the virtualbox-guest-dkms package in Ubuntu.  The module part
+is either a kernel module name or a string useful to identify the
+driver.
+
+The lowlevel handling is provided in ubuntu-drivers-common[3] and the
+GUI is implemented in jockey[4].
+
+ 3) <URL: https://launchpad.net/ubuntu/+source/ubuntu-drivers-common >
+ 4) <URL: https://launchpad.net/ubuntu/+source/jockey >
+
+The same mechanism should work for Debian too, and seem to be generic
+enough for any PCI and USB specific package.
+
+Information about the modalias values are available from
+<URL: https://wiki.archlinux.org/index.php/Modalias >
+and blueprints for the Ubuntu implementation can be found at
+<URL: https://blueprints.launchpad.net/ubuntu/+spec/hardware-desktop-n-package-field-modaliases >
+and
+<URL: https://blueprints.launchpad.net/ubuntu/+spec/desktop-q-third-party-driver-installation >.
+
+The Madriva implementation
+--------------------------
+
+I am told that Mandriva will suggest which packages to install when a
+printer is plugged in.  I am not quite sure how this is done, but I
+believe the Harddrake system is involved.
+
+
+Debian DEP-11 proposal
+----------------------
+
+Part of the DEP-11 proposal is a suggestion to add mappings from
+packages to USB and PCI devices in a new file in the Debian archive.
+The details are available from
+<URL: http://wiki.debian.org/AppStreamDebianProposal >.
+
+The current proposal seem to have too few features to beat the Ubuntu
+implementation.  The two fields for USB and PCI IDs will not be able
+to match an entire subclass of packages, nor a range of IDs without
+listing each ID.




More information about the debian-edu-commits mailing list