File tree Expand file tree Collapse file tree 10 files changed +80
-45
lines changed Expand file tree Collapse file tree 10 files changed +80
-45
lines changed Original file line number Diff line number Diff line change 1- Makefile.ubuntu14
1+ Makefile.header_from_apt
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -4,14 +4,26 @@ set -eu
44SRC_DIR=$( cd $( dirname ${BASH_SOURCE:- $0 } ) /../; pwd)
55
66if [ -e /usr/src/linux ]; then
7- # Raspbian/Raspberry Pi OS
8- $SRC_DIR /utils/build_install.raspbian.bash && exit 0
7+ # build with linux headers installed from source
8+ if grep -q " Raspberry Pi 4" /proc/cpuinfo; then
9+ echo build_install_header_from_source_raspi4.bash
10+ $SRC_DIR /utils/build_install_header_from_source_raspi4.bash
11+ exit 0
12+ else
13+ echo build_install_header_from_source_raspi2.bash
14+ $SRC_DIR /utils/build_install_header_from_source_raspi2.bash
15+ exit 0
16+ fi
917elif [ " $( ls /usr/src/linux-* 2> /dev/null) " != ' ' ]; then
10- # Ubuntu
18+ # build with linux headers installed with apt
1119 if grep -q " Raspberry Pi 4" /proc/cpuinfo; then
12- $SRC_DIR /utils/build_install.raspi4ubuntu.bash && exit 0
20+ echo build_install_header_from_apt_raspi4.bash
21+ $SRC_DIR /utils/build_install_header_from_apt_raspi4.bash
22+ exit 0
1323 else
14- $SRC_DIR /utils/build_install.ubuntu14.bash && exit 0
24+ echo build_install_header_from_apt_raspi2.bash
25+ $SRC_DIR /utils/build_install_header_from_apt_raspi2.bash
26+ exit 0
1527 fi
1628else
1729 # Error
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ build_install_header_from_source_raspi2.bash
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ build_install_header_from_apt_raspi2.bash
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+
3+ SRC_DIR=$( cd $( dirname ${BASH_SOURCE:- $0 } ) /../; pwd)
4+
5+ # check kernel headers
6+ [ ! -e /usr/src/linux-headers-$( uname -r) ] && { bash -e $SRC_DIR /utils/print_env.bash " No kernel header files found." ; exit 1; }
7+
8+ # build and install the driver
9+ cd $SRC_DIR /src/drivers/
10+ rm Makefile
11+ ln -s Makefile.header_from_apt Makefile
12+ make clean
13+ make
14+ sudo insmod rtmouse.ko
15+
16+ # initialize the driver
17+ sleep 1
18+ sudo chmod 666 /dev/rt*
19+ echo 0 > /dev/rtmotoren0
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ SRC_DIR=$(cd $(dirname ${BASH_SOURCE:-$0})/../; pwd)
88# build and install the driver
99cd $SRC_DIR /src/drivers/
1010rm Makefile
11- ln -s Makefile.ubuntu14 Makefile
11+ ln -s Makefile.header_from_apt Makefile
1212make clean
1313# Update for Raspberry Pi 4
1414sed -i -e " s/#define RASPBERRYPI 2/#define RASPBERRYPI 4/g" rtmouse.c
You can’t perform that action at this time.
0 commit comments