RaspberryPiMouse icon indicating copy to clipboard operation
RaspberryPiMouse copied to clipboard

スクリプトによるRaspberry Pi設定の自動化

Open KuraZuzu opened this issue 1 year ago • 3 comments
trafficstars

What does this implement/fix?

デバイスドライバをビルドする前に必要な設定(ソースファイルのダウンロードとインストール)を自動で行うスクリプトを追加します。

従来の/boot/firmware/config.txtを手動で修正していた手順を、本PRで追加するスクリプトで行うため、カーネルヘッダーのインストール以外はRaspberry Pi OSUbuntu 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)

手順

  1. 各種OSのimageが書き込まれたSDカードをRaspberry Pi 3B/4Bに挿し込み、Raspberry Pi Mouse V3を組み立てます。
  2. ディスプレイとキーボード、マウスを接続して起動します。
  3. ターミナルを開いて以下のコマンドを実行し、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 
  1. Raspberyr Pi 3B/4Bを再起動します
  2. ターミナルでカーネルヘッダーをインストールします(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 
  1. 以下のコマンドを実行してデバイスドライバをビルドします
$ cd RaspberryPiMouse/utils
$ ./build_install.bash
  1. サンプルプログラムを実行して動作を確認します(動作内容
$ cd ../SampleProgram
$ bash step1.sh
// ...
$ bash step6.sh

Any other comments?

今回の変更に合わせ、Raspberry Pi Mouseのチュートリアル内のソースファイルのダウンロードとインストールを修正する必要があります。

Checklists

  • [x] I have read the CONTRIBUTING guidelines.
  • [x] I have checked to ensure there aren't other open Pull Requests for the same change.

KuraZuzu avatar Sep 13 '24 05:09 KuraZuzu