Closed KuraZuzu closed 1 month ago
Ubuntu Server 24.04上でデバイスドライバをビルドして動作するように修正しました。
Ubuntu Server 24.04
https://github.com/rt-net/RaspberryPiMouse/issues/81 をクローズします。
以下の手順にしたがってビルドとサンプルプログラムの動作確認をしました。
6.8.0-1008-raspi
5.15.0-1061-raspi
6.6.31+rpt-rpi-v8
以下の手順で動作確認まで行います。環境により、操作が違います。
sudo apt update && sudo apt upgradeを実行します
sudo apt update && sudo apt upgrade
/boot/firmware/config.txtを編集し、ファイル末尾に以下の記述を追加します
/boot/firmware/config.txt
dtoverlay=anyspi:spi0-0,dev="microchip,mcp3204",speed=1000000 dtparam=i2c_baudrate=62500
Raspberry Pi を再起動します
以下のコマンドを実行し、出力が62500になっていることを確認します
62500
$ printf "%d\n" 0x$(xxd -ps /sys/class/i2c-adapter/i2c-1/of_node/clock-frequency) 62500
$ git clone -b spi-overlay https://github.com/rt-net/RaspberryPiMouse.git $ cd RaspberryPiMouse/utils $ sudo apt install linux-headers-$(uname -r) build-essential $ ./build_install.bash
step1.sh
step6.sh
$ cd ../SampleProgram $ bash step1.sh $ bash step2.sh . . . $ bash step6.sh
Ubuntu`dtparam=i2c_baudrate=62500`
ラズパイマウスのデバイスドライバのコードをcloneし、本開発リポジトリにチェックアウトした後にインストールします
step1.shからstep6.shのサンプルプログラムの動作を確認します(この手順は、ラズパイマウスのマニュアルの通りです)
モニタとマウスをRaspberry Piに接続し、GUI上で操作します。
画像の通り、[画面左上のロゴマーク] -> [Preferences] -> [Raspberry Pi Configuration] とクリックしたら出てくるウィジェットから、SPIとI2CのトグルをONにします。
SPI
I2C
これ以降は、ターミナルを開いて操作します。
sudo apt updateを実行します
sudo apt update
arm_64bit=0の記述は、64-bit版では不要です。
arm_64bit=0
arm_64bit=0 # 64-bit版では不要です dtoverlay=anyspi:spi0-0,dev="microchip,mcp3204",speed=1000000 dtparam=i2c_baudrate=62500
以下のコマンドを実行し、出力が62500になっていることを確認します(同時にxxdのインストールも行います)
同時にxxd
$ sudo apt install xxd $ printf "%d\n" 0x$(xxd -ps /sys/class/i2c-adapter/i2c-1/of_node/clock-frequency) 62500
LGTMです
What does this implement/fix?
Ubuntu Server 24.04
上でデバイスドライバをビルドして動作するように修正しました。Does this close any currently open issues?
https://github.com/rt-net/RaspberryPiMouse/issues/81 をクローズします。
How has this been tested?
以下の手順にしたがってビルドとサンプルプログラムの動作確認をしました。
環境
6.8.0-1008-raspi
)5.15.0-1061-raspi
)6.6.31+rpt-rpi-v8
)6.6.31+rpt-rpi-v8
)6.8.0-1008-raspi
)5.15.0-1061-raspi
)6.6.31+rpt-rpi-v8
)6.6.31+rpt-rpi-v8
)手順
以下の手順で動作確認まで行います。環境により、操作が違います。
Ubuntu Server 24.04
sudo apt update && sudo apt upgrade
を実行します/boot/firmware/config.txt
を編集し、ファイル末尾に以下の記述を追加しますRaspberry Pi を再起動します
以下のコマンドを実行し、出力が
62500
になっていることを確認しますstep1.sh
からstep6.sh
のサンプルプログラムの動作を確認します(この手順は、ラズパイマウスのマニュアルの通りです)Ubuntu Server 22.04
sudo apt update && sudo apt upgrade
を実行します/boot/firmware/config.txt
を編集し、ファイル末尾に以下の記述を追加しますRaspberry Pi を再起動します
ラズパイマウスのデバイスドライバのコードをcloneし、本開発リポジトリにチェックアウトした後にインストールします
step1.sh
からstep6.sh
のサンプルプログラムの動作を確認します(この手順は、ラズパイマウスのマニュアルの通りです)Raspberry Pi OS(32-bit, 64-bitで共通)
モニタとマウスをRaspberry Piに接続し、GUI上で操作します。
画像の通り、[画面左上のロゴマーク] -> [Preferences] -> [Raspberry Pi Configuration] とクリックしたら出てくるウィジェットから、
SPI
とI2C
のトグルをONにします。これ以降は、ターミナルを開いて操作します。
sudo apt update
を実行します/boot/firmware/config.txt
を編集し、ファイル末尾に以下の記述を追加しますarm_64bit=0
の記述は、64-bit版では不要です。Raspberry Pi を再起動します
以下のコマンドを実行し、出力が
62500
になっていることを確認します(同時にxxd
のインストールも行います)step1.sh
からstep6.sh
のサンプルプログラムの動作を確認します(この手順は、ラズパイマウスのマニュアルの通りです)Any other comments?
Checklists