First follow the steps in [0] for setting up a proper DKMS package.
After you've built the module successfully, you can use the following bash script to extract the .deb installer from the driverdisk. This way you can copy the deb file to the target machine and install. You must ensure that $(uname -rm) on the target machine matches the build machine.
The Script
NAME=hello VERSION=0.1 # Build in a temp dir TMPDIR=$(mktemp -d) cd $TMPDIR sudo dkms mkdriverdisk $NAME/$VERSION -d ubuntu --media tar | tee build.log TARBALL_PATH=$(grep "Disk image location" build.log | cut -d':' -f2) echo $TARBALL_PATH tar -xf $TARBALL_PATH cd - # Extract the build mv $TMPDIR/ubuntu-drivers/*/*.deb .
No comments:
Post a Comment