-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.module
executable file
·29 lines (26 loc) · 981 Bytes
/
README.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh -ex
# Recompile the usbsevseg kernel module to use all 8 digits of 8 digit displays.
# Stuart Pook, 30 January 2011
# Tested on Debian unstable Linux
# http://forums.debian.net/viewtopic.php?f=17&t=58496&sid=afaafaeea59d94b30e76209918499f08
# http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage
r=`uname -r`
s=`echo $r | sed -e 's/-.*//'`
sudo apt-get install kernel-package
#dist="-t experimental"
sudo apt-get install $dist "$@" linux-source-$s linux-headers-$r
cd /usr/src
src=linux-source-$s
[ -d $src ] || tar -jxf linux-source-$s.tar.bz2
cd linux-source-$s
sed -i '/^#define.*MAXLEN/s/6$/8/' drivers/usb/misc/usbsevseg.c
ln -fs /boot/config-$r .config
ln -fs /usr/src/linux-headers-$r/Module.symvers .
make modules_prepare
make M=drivers/usb/misc/
dest=/lib/modules/$r/updates
[ -d $dest ] || sudo mkdir --mode=755 $dest
sudo cp drivers/usb/misc/usbsevseg.ko $dest/.
sudo sh -c 'umask 22; depmod -a'
sudo rmmod usbsevseg
sudo modprobe -v usbsevseg