Last active
January 29, 2025 14:39
-
-
Save mongonta0716/dd388128cbdb84de9876a24f6c80e6c5 to your computer and use it in GitHub Desktop.
M5Stack ModuleLLMの設定ファイルをバックアップとリストアするスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 設定ファイルをバックアップする。 | |
# microSDカードのマウント先を指定 | |
cd /mnt/mmcblk1p1 | |
mkdir -p backup | |
cd backup | |
# 固定IP用の設定ファイル | |
cp --parents /etc/network/interfaces . | |
# WiFi設定 | |
cp --parents /etc/wpa_supplicant.conf . | |
# realtekの有線LAN+USBHUB用 | |
cp --parents /etc/udev/rules.d/50-usb-realtek-net.rules . | |
# WiFiサービス(不要) | |
cp --parents /usr/lib/systemd/system/wpa_supplicant.service . | |
# wpa_supplicantの起動用シェルを追加したもの | |
cp --parents /etc/rc.local . | |
# 8812au.ko関連 | |
cp --parents /lib/modules/4.19.125/8812au.ko . | |
cp --parents /etc/udev/rules.d/50-usb-realtek-net.rules . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# microSDのマウント先を指定 | |
cd /mnt/mmcblk1p1/backup | |
# 各種操作を行う | |
apt update | |
# カスタムカーネルをインストール | |
# dpkg -i ../kernel_deb/*.deb | |
# 必要なパッケージをインストール | |
# wpasupplicant WiFi接続用 | |
# tree あると便利 | |
# avahi-daemon mDNS m5stack-llm.localで接続できる。 | |
# usbutils lsusbコマンドを入れる。 | |
apt install -y wpasupplicant tree avahi-daemon usbutils | |
# 設定ファイルやドライバをまるごと上書き | |
cp --parents -r ./* / | |
# wpa_supplicantの起動はrc.localに任せる | |
systemctl disable wpa_supplicant.service | |
echo "パスワードを変更しましょう。" | |
passwd | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment