Skip to content

Commit d5bc576

Browse files
authored
インストール方法を更新してRaspberry Pi 4について追記 (#43)
* インストール方法を更新してRaspberry Pi 4について追記 * 関連リンクを追加 * よくある質問へダイレクトでリンク
1 parent 07e8293 commit d5bc576

File tree

1 file changed

+35
-15
lines changed

1 file changed

+35
-15
lines changed

README.md

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,32 @@ for the Raspberry Pi Mouse.
77

88
## インストール
99

10-
./utilディレクトリのシェルスクリプトを実行します
10+
インストール用のシェルスクリプト([`./utils/build_install.bash`](https://github.com/rt-net/RaspberryPiMouse/blob/master/utils/build_install.bash))を実行します
1111

12-
```
12+
### Raspbianの場合
13+
14+
```sh
1315
$ git clone https://github.com/rt-net/RaspberryPiMouse.git
14-
$ cd utils
15-
###Raspbianの場合###
16+
$ cd RaspberryPiMouse/utils
1617
$ sudo apt install raspberrypi-kernel-headers
1718
$ ./build_install.bash
18-
###Ubuntuの場合###
19+
```
20+
21+
### Ubuntuの場合
22+
23+
```sh
24+
$ git clone https://github.com/rt-net/RaspberryPiMouse.git
25+
$ cd RaspberryPiMouse/utils
1926
$ sudo apt install linux-headers-$(uname -r)
2027
$ ./build_install.bash
2128
```
2229

30+
## マニュアルインストール
2331

24-
## How to install the device driver(マニュアルインストール)
25-
26-
```
32+
```sh
2733
$ git clone https://github.com/rt-net/RaspberryPiMouse.git
28-
### check the kernel version
29-
$ uname -r
30-
4.1.6-v7+
31-
###choose a directory based on your RPi and the kernel version
32-
$ cd RaspberryPiMouse/lib/Pi2B+/4.1.6-v7+/
33-
###install the kernel object
34+
$ cd RaspberryPiMouse/src/drivers
35+
$ make
3436
$ sudo insmod rtmouse.ko
3537
```
3638

@@ -59,6 +61,24 @@ I2Cのbaudrateをデフォルト値より下げる必要があります([issue
5961
dtparam=i2c_baudrate=62500
6062
```
6163

64+
### Raspberry Pi 4
65+
66+
Raspberry Pi 4ではCPUのレジスタがそれまでのRaspberry Piとは異なります([issues#21](https://github.com/rt-net/RaspberryPiMouse/issues/21))。
67+
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`に書き換えて手動でビルドする必要があります。
68+
69+
```c
70+
// define the Raspberry Pi version here
71+
// Raspberry Pi 1 B/A/B+/A+: 1
72+
// Raspberry Pi 2 B : 2
73+
// Raspberry Pi 3 B/A+/B+ : 2
74+
// Raspberry Pi 4 B : 4
75+
#define RASPBERRYPI 2
76+
```
77+
78+
### その他
79+
80+
その他のよくある質問については[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)にまとめています。
81+
6282
## 日経Linux連載
6383
6484
連載(Raspberry Piで始めるかんたんロボット製作)で上田氏が書いた
@@ -84,4 +104,4 @@ This repository contains the code of the repository shown below.
84104
* [mcp3204.c in Raspberry Piで学ぶARMデバイスドライバープログラミング](http://www.socym.co.jp/support/s-940#ttlDownload)
85105
* GPL v2 License
86106
* [RPi-Distro/raspi-gpio](https://github.com/RPi-Distro/raspi-gpio)
87-
* The 3-Clause BSD License
107+
* The 3-Clause BSD License

0 commit comments

Comments
 (0)