From 8896c3e1a98a5cd948028f6c5cf54514db1ecfc3 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Mon, 13 Apr 2020 15:55:53 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E6=96=B9=E6=B3=95=E3=82=92=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E3=81=97=E3=81=A6Raspberry=20Pi=204=E3=81=AB=E3=81=A4=E3=81=84?= =?UTF-8?q?=E3=81=A6=E8=BF=BD=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 25b8fba..291aa1c 100644 --- a/README.md +++ b/README.md @@ -7,30 +7,32 @@ for the Raspberry Pi Mouse. ## インストール -./utilディレクトリのシェルスクリプトを実行します。 +インストール用のシェルスクリプト([`./utils/build_install.bash`](https://github.com/rt-net/RaspberryPiMouse/blob/master/utils/build_install.bash))を実行します。 -``` +### Raspbianの場合 + +```sh $ git clone https://github.com/rt-net/RaspberryPiMouse.git -$ cd utils -###Raspbianの場合### +$ cd RaspberryPiMouse/utils $ sudo apt install raspberrypi-kernel-headers $ ./build_install.bash -###Ubuntuの場合### +``` + +### Ubuntuの場合 + +```sh +$ git clone https://github.com/rt-net/RaspberryPiMouse.git +$ cd RaspberryPiMouse/utils $ sudo apt install linux-headers-$(uname -r) $ ./build_install.bash ``` +## マニュアルインストール -## How to install the device driver(マニュアルインストール) - -``` +```sh $ git clone https://github.com/rt-net/RaspberryPiMouse.git -### check the kernel version -$ uname -r -4.1.6-v7+ -###choose a directory based on your RPi and the kernel version -$ cd RaspberryPiMouse/lib/Pi2B+/4.1.6-v7+/ -###install the kernel object +$ cd RaspberryPiMouse/src/drivers +$ make $ sudo insmod rtmouse.ko ``` @@ -59,6 +61,24 @@ I2Cのbaudrateをデフォルト値より下げる必要があります([issue dtparam=i2c_baudrate=62500 ``` +### Raspberry Pi 4 + +Raspberry Pi 4ではCPUのレジスタがそれまでのRaspberry Piとは異なります。 +Raspberry Pi 4で本ドライバを使用する際には`rtmouse.c`の以下の行(2020年4月13日現在の最新版のv2.1.0では[54行目](https://github.com/rt-net/RaspberryPiMouse/blob/dd0343449951a99b067e24aef3c03ae5ed9ab936/src/drivers/rtmouse.c#L54))を`RASPBERRYPI 4`に書き換えて手動でビルドする必要があります。 + +```c +// define the Raspberry Pi version here +// Raspberry Pi 1 B/A/B+/A+: 1 +// Raspberry Pi 2 B : 2 +// Raspberry Pi 3 B/A+/B+ : 2 +// Raspberry Pi 4 B : 4 +#define RASPBERRYPI 2 +``` + +### その他 + +その他のよくある質問については[wiki](https://github.com/rt-net/RaspberryPiMouse/wiki)にまとめています。 + ## 日経Linux連載 連載(Raspberry Piで始めるかんたんロボット製作)で上田氏が書いた @@ -84,4 +104,4 @@ This repository contains the code of the repository shown below. * [mcp3204.c in Raspberry Piで学ぶARMデバイスドライバープログラミング](http://www.socym.co.jp/support/s-940#ttlDownload) * GPL v2 License * [RPi-Distro/raspi-gpio](https://github.com/RPi-Distro/raspi-gpio) - * The 3-Clause BSD License \ No newline at end of file + * The 3-Clause BSD License From d02756dab124f7c99c1c825b71a894f1eafe7b44 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Mon, 13 Apr 2020 16:03:00 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=E9=96=A2=E9=80=A3=E3=83=AA=E3=83=B3?= =?UTF-8?q?=E3=82=AF=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 291aa1c..31abd94 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ dtparam=i2c_baudrate=62500 ### Raspberry Pi 4 -Raspberry Pi 4ではCPUのレジスタがそれまでのRaspberry Piとは異なります。 +Raspberry Pi 4ではCPUのレジスタがそれまでのRaspberry Piとは異なります([issues#21](https://github.com/rt-net/RaspberryPiMouse/issues/21))。 Raspberry Pi 4で本ドライバを使用する際には`rtmouse.c`の以下の行(2020年4月13日現在の最新版のv2.1.0では[54行目](https://github.com/rt-net/RaspberryPiMouse/blob/dd0343449951a99b067e24aef3c03ae5ed9ab936/src/drivers/rtmouse.c#L54))を`RASPBERRYPI 4`に書き換えて手動でビルドする必要があります。 ```c From fbed394862e6608377b68c0b0a38721fe797f64a Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Mon, 13 Apr 2020 16:04:58 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E3=82=88=E3=81=8F=E3=81=82=E3=82=8B?= =?UTF-8?q?=E8=B3=AA=E5=95=8F=E3=81=B8=E3=83=80=E3=82=A4=E3=83=AC=E3=82=AF?= =?UTF-8?q?=E3=83=88=E3=81=A7=E3=83=AA=E3=83=B3=E3=82=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 31abd94..7766703 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Raspberry Pi 4で本ドライバを使用する際には`rtmouse.c`の以下の ### その他 -その他のよくある質問については[wiki](https://github.com/rt-net/RaspberryPiMouse/wiki)にまとめています。 +その他のよくある質問については[wiki](https://github.com/rt-net/RaspberryPiMouse/wiki#%E3%82%88%E3%81%8F%E3%81%82%E3%82%8B%E8%B3%AA%E5%95%8F)にまとめています。 ## 日経Linux連載