07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$ ls ../*.deb<br />

../linux-image-2.6.32-falcot_1_i386.deb<br />

../qc-usb-modules-2.6.32-falcot_0.6.6-7+1_i386.deb<br />

TIP<br />

Automating the process<br />

The whole process can be automated with module-assistant. This package was<br />

specifically designed to install the required tools and packages, compile an<br />

external module, and install it. Thus, the m-a a-i qc-usb-source command<br />

compiles the driver for the current kernel and installs it on the fly.<br />

The next step in automation is dkms, which automates the process from the<br />

time it is installed; the modules that use it (the *.dkms packages) are automatically<br />

compiled at the time of installation, for any kernel(s) currently installed;<br />

DKMS also takes into account the installation of new kernels, their<br />

updates, and removal of obsolete modules upon deletion of a kernel package.<br />

This system is more recent (it didn't exist in Lenny), and it has not yet been<br />

generalized, but some modules already use it. For instance, simply installing<br />

the virtualbox-ose-dkms package ensures that the modules necessary for the<br />

VirtualBox virtualization system are available for all installed kernels, with no<br />

manual intervention required. It is necessary, however, to install the linuxheaders-*<br />

package that matches to the installed kernel. The easiest way to<br />

do so is to install the corresponding meta-package; for instance, if you use<br />

linux-images-2.6-686, you would install linux-headers-2.6-686.<br />

8.10.6. Applying a Kernel Patch<br />

Some features are not included in the standard kernel due to a lack of maturity or to some<br />

disagreement between the maintainer of the source code and the kernel maintainers. Such<br />

features may be distributed as patches that anyone is free to apply to the kernel sources.<br />

Debian distributes some of these patches in linux-patch-* or kernel-patch-* packages (for instance,<br />

linux-patch-grsecurity2, which tightens some of the kernel's security policies). These packages<br />

install files in the /usr/src/kernel-patches/ directory.<br />

To apply one or more of these installed patches, use the patch command in the sources directory<br />

then start compilation of the kernel as described above.<br />

$ cd ~/kernel/linux-source-2.6.32<br />

$ fakeroot make-kpkg clean<br />

$ zcat /usr/src/kernel-patches/diffs/grsecurity2/grsecurity<br />

➥ -2.1.14-2.6.32.13-201005151340.patch.gz | patch -p1<br />

$ fakeroot make-kpkg --append-to-version -grsec --revision 1 --initrd kernel-<br />

➥ image<br />

$ ls ../*.deb<br />

../linux-image-2.6.32-falcot_1_i386.deb<br />

../qc-usb-modules-2.6.32-falcot_0.6.6-7+1_i386.deb<br />

../linux-image-2.6.32-grsec_1_i386.deb<br />

178 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!