KernelAbiPackageHandling

Differences between revisions 4 and 5
Revision 4 as of 2008-06-05 06:34:46
Size: 3759
Editor: p579DEEB0
Comment: some small updates
Revision 5 as of 2008-06-05 06:38:56
Size: 4023
Editor: p579DEEB0
Comment: one more silly use case, pointing out the split
Deletions are marked like this. Additions are marked like this.
Line 39: Line 39:

 * Lynn needs a piece of restricted firmware for her Wifi card. But she does not need to install any proprietary graphics driver for her laptop with an Intel chipset. On a kernel update she has a lot less to download than her friends who use the nvidia driver.

Summary

We propose a generalized replacement of linux-meta by improving the package manager and using dependency fields. This makes the upgrade to a new kernel ABI automatically apply to installed third-party drivers as well, and ensures that apt itself ensures consistency of the packages. This provides a way to provide third-party driver packages and eases kernel maintenance.

Rationale

Currently, linux-meta provides a rather manual way to upgrade kernel driver packages (such as l-u-m) to a new kernel ABI. However, this is problematic in several ways:

  • It needs to be maintained manually and even with it, people often install de-sync linux and driver packages.
  • It forces/encourages us to throw all third-party drivers into a single monolithic package which is hard to maintain (e. g. l-r-m).
  • It does not apply to anything that is not covered by l-meta itself (linux-{ubuntu,restricted,backports}-modules), such as virtualbox-ose-modules, a lot of other already packaged drivers, and most importantly, packages from third-party driver repositories.

Use Cases

  • Jon uses VirtualBox on Intrepid. After Intrepid gets a new kernel ABI 2.6.26-07, update-manager automatically installs the matching virtualbox-ose-modules-2.6.26-07-generic package, too.

  • James buys a new Dell server which needs a backported SCSI driver which is not yet available in the Hardy kernel. Dell maintains a repository with this driver for Hardy, and updates it when Hardy gets a new kernel ABI. James just runs a normal dist-upgrade, which installs a new kernel ABI, but the Dell update is not yet available. His machine continues to boot with the old kernel. On the next day, the upgraded Dell driver is available, and James' daily upgrade automatically pulls in the SCSI driver for the new kernel ABI. James reboots the machine, which starts the new kernel.
  • Lynn needs a piece of restricted firmware for her Wifi card. But she does not need to install any proprietary graphics driver for her laptop with an Intel chipset. On a kernel update she has a lot less to download than her friends who use the nvidia driver.

Design

This problem has two major parts:

  1. Automatically install new packages which provide a driver (or the kernel itself) for a new kernel ABI, if the package was installed for the older ABI.
  2. Decide when enough drivers have been installed for the new ABI to switch the boot default to the new kernel.
    • Driver packages which are essential for booting declare a package field X-Boot-Essential: Yes.

    • A new script /etc/kernel/postinst.d/zz_default_kernel looks at the currently installed packages and flips the boot default to the new kernel once all X-Boot-Essential: Yes packages are available for the new ABI which were available for the currently running ABI.

Implementation

New package installation

Default kernel selection

  • Move the kernel symlink handling in linux-image-*.postinst into separate script /etc/kernel/postinst.d/zz_default_kernel. This should be shipped in an already existing "kernel infrastructure" package which can be maintained more easily than updating the kernel itself, or possibly a new package linux-common.

  • Create a new debhelper script dh_linux which automatically generates the code for running /etc/kernel/postinst.d/, using dpkg-triggers for efficiency. In 8.04 this is hardcoded in linux-image-*.postinst.

  • The linux-image-* and all kernel driver packages use dh_linux in their debian/rules. This should be done by the autopackaging in dkms as well.


CategorySpec

DesktopTeam/Specs/KernelAbiPackageHandling (last edited 2008-08-06 17:01:31 by localhost)