RaspberryPiMouse
RaspberryPiMouse copied to clipboard
スクリプトによるRaspberry Pi設定の自動化
trafficstars
What does this implement/fix?
デバイスドライバをビルドする前に必要な設定(ソースファイルのダウンロードとインストール)を自動で行うスクリプトを追加します。
従来の/boot/firmware/config.txtを手動で修正していた手順を、本PRで追加するスクリプトで行うため、カーネルヘッダーのインストール以外はRaspberry Pi OSとUbuntu Serverの両方で手順が統一されます。
Does this close any currently open issues?
しません。
How has this been tested?
環境
Raspberry Pi 3Bと4Bに対してそれぞれ以下の環境全てを用意しテストし、サンプルプログラム全ての動作を確認しました。
- Ubuntu Server 22.04 (32-bit)
- Ubuntu Server 22.04 (64-bit)
- Ubuntu Server 24.04 (64-bit)
- Raspberry Pi OS (32-bit)
- Raspberry Pi OS (64-bit)
手順
- 各種OSのimageが書き込まれたSDカードをRaspberry Pi 3B/4Bに挿し込み、Raspberry Pi Mouse V3を組み立てます。
- ディスプレイとキーボード、マウスを接続して起動します。
- ターミナルを開いて以下のコマンドを実行し、Raspberry Pi 3B/4Bの設定をします。
$ sudo apt update
$ sudo apt upgrade
$ git clone -b feature/setting-configs https://github.com/rt-net/RaspberryPiMouse.git
$ cd RaspberryPiMouse/utils
$ ./set_configs.bash
- Raspberyr Pi 3B/4Bを再起動します
- ターミナルでカーネルヘッダーをインストールします(Ubuntu ServerとRaspberry Pi OSによってコマンドが違います)
# Ubuntu Server の場合
$ sudo apt install linux-headers-$(uname -r) build-essential
# Raspberry Pi OSの場合
$ sudo apt install raspberrypi-kernel-headers build-essential
- 以下のコマンドを実行してデバイスドライバをビルドします
$ cd RaspberryPiMouse/utils
$ ./build_install.bash
- サンプルプログラムを実行して動作を確認します(動作内容)
$ cd ../SampleProgram
$ bash step1.sh
// ...
$ bash step6.sh
Any other comments?
今回の変更に合わせ、Raspberry Pi Mouseのチュートリアル内のソースファイルのダウンロードとインストールを修正する必要があります。
Checklists
- [x] I have read the CONTRIBUTING guidelines.
- If there is no guideline in the repository, rt-net organization's guideline applies.
- [x] I have checked to ensure there aren't other open Pull Requests for the same change.