From 4fda63f1a88753b33180954ae5281dadc2e5200f Mon Sep 17 00:00:00 2001 From: Dustin Moore Date: Sun, 22 Jan 2017 11:25:20 -0600 Subject: [PATCH] Added DKMS setup for kernel updates --- Get-Started.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Get-Started.md b/Get-Started.md index 439bac8..1eda123 100644 --- a/Get-Started.md +++ b/Get-Started.md @@ -97,6 +97,29 @@ IF YOU ENCOUNTER ANY ISSUES LOOK AT THE "ADDITIONAL NOTES" SECTION ON THE BOTTOM All the steps are the same as Debian. (The only difference is that the firmware.bin is copied into `/lib/firmware/facetimehd/` instead of `/usr/lib/firmware/facetimehd/`, but the script does that for you.) +## Setting up DKMS (auto-compile on kernal update) + +This assumes you have already followed the Debian/Ubuntu deb package steps. You will need to verify `dkms.conf` that the module name `facetimehd` and version number `0.1` are correct and either update the `dkms.conf` or adjust the instructions where `-m` and `-v` are used. + +- Install needed packages: `# apt install debhelper dkms` +- Remove old package if installed: `# dpkg -r bcwc-pcie ` +- Make a directory to work from: `# mkdir /usr/src/facetimehd-0.1` +- Change into the git repo dir: `$ cd bcwc_pcie` +- Copy files over: `# cp -r * /usr/src/facetimehd-0.1/` +- Change into that dir: `# cd /usr/src/facetimehd-0.1/` +- Remove any previous debs and backups: `# rm backup-*tgz bcwc-pcie_*deb` +- Clear out previous compile: `# make clean` +- Register the new module with DKMS: `# dkms add -m facetimehd -v 0.1` +- Build the module: `# dkms build -m facetimehd -v 0.1` +- Build a Debian source package: `# dkms mkdsc -m facetimehd -v 0.1 --source-only` +- Build a Debian binary package: `# dkms mkdeb -m facetimehd -v 0.1 --source-only` +- Copy deb locally: `# cp /var/lib/dkms/facetimehd/0.1/deb/facetimehd-dkms_0.1_all.deb ~` +- Get rid of the local build files: `# rm -r /var/lib/dkms/facetimehd/` +- Install the new deb package: `# dpkg -i /root/facetimehd-dkms_0.1_all.deb` + +If you have any trouble, please read this guide on making a DKMS package: +http://www.xkyle.com/building-linux-packages-for-kernel-drivers/ + ## Get started on Arch There is [AUR package](https://aur.archlinux.org/packages/bcwc-pcie-git/) available, and [another one](https://aur.archlinux.org/packages/bcwc-pcie-firmware/) for the firmware itself (the separation will make upgrades less painful, and don't force you to keep `firmware.bin` around forever).