~~CLOSETOC~~ ====== Raspberry Pi (ラズベリー パイ) はうまい🤤 ====== {{hardware:siami-tan-cmhazqjfe2w-unsplash.jpg?470|Raspberry Pi}}\\ Photo by Siami Tan on Unsplash \\ 本家: [[https://www.raspberrypi.org/|Teach, Learn, and Make with Raspberry Pi – Raspberry Pi]]\\ 公式ドキュメント: [[https://www.raspberrypi.org/documentation/|Raspberry Pi Documentation]]\\ **Raspberry Pi** (ラズベリー パイ) は、ARMプロセッサを搭載したシングルボードコンピュータ。イギリスのラズベリーパイ財団によって開発されている。日本語では略称としてラズパイとも呼ばれる。\\ [[wpjp>Raspberry_Pi|Raspberry Pi - Wikipedia]] より\\ {{INLINETOC wide 2-2}} ===== Raspberry Pi ファミリー ===== ^ 名称 ^ モデル ^ フォーム\\ ファクタ ^ SoC ^ CPU ^ メモリ ^ ネットワーク\\ インタフェース ^ GPIO ^ リリース ^ | Raspberry Pi\\ (初代) | B | 標準 | BCM2835 | ARM1176JZF-S\\ シングルコア\\ 700 MHz\\ ARMv6\\ ARM11 | 512 MB | 10/100 Mbps\\ SMSC LAN9512 | 26-pin | 2012 | | ::: | A | ::: | ::: | ::: | 256 MB | なし | ::: | 2013 | | ::: | B+ | ::: | ::: | ::: | 512 MB | 10/100 Mbps\\ SMSC LAN9514 | 40-pin | 2014 | | ::: | A+ | コンパクト | ::: | ::: | ::: | なし | ::: | ::: | | Raspberry Pi 2 | B | 標準 | BCM2836 | ARM\\ Cortex-A7\\ クアッドコア\\ 900 MHz\\ ARMv7\\ ARM Cortex-A | 1 GB | 10/100 Mbps\\ SMSC LAN9514 | ::: | 2015 | | ::: | B (v1.2) | ::: | BCM2837 | ARM\\ Cortex-A53\\ クアッドコア\\ 900 MHz\\ ARMv8 (64bit)\\ ARM Cortex-A | ::: | ::: | ::: | 2016 | | Raspberry Pi Zero | Zero | ゼロ | BCM2835 | ARM1176JZF-S\\ シングルコア\\ 1 GHz\\ ARMv6\\ ARM11 | 512 MB | なし | ::: | ::: | | ::: | W/WH | ::: | ::: | ::: | ::: | 2.4 GHz (b/g/n) WiFi\\ Bluetooth 4.1\\ Bluetooth Low Energy (BLE) | ::: | 2017 | | Raspberry Pi 3 | B | 標準 | BCM2837 | ARM\\ Cortex-A53\\ クアッドコア\\ 1.2 GHz\\ ARMv8 (64bit)\\ ARM Cortex-A | 1 GB | 10/100 Mbps\\ SMSC LAN9514\\ 2.4 GHz (b/g/n) WiFi | ::: | 2016 | | ::: | A+ | コンパクト | BCM2837B0 | ARM\\ Cortex-A53\\ クアッドコア\\ 1.4 GHz\\ ARMv8 (64bit)\\ ARM Cortex-A | 512 MB | なし | ::: | 2018 | | ::: | B+ | 標準 | ::: | ::: | 1 GB | Gigabit イーサネット\\ (Max 300Mbps)\\ 2.4 GHz / 5 GHz\\ (b/g/n/ac) WiFi | ::: | ::: | | Raspberry Pi 4 | B (1 GiB) | 標準 | BCM2711 | ARM\\ Cortex-A53\\ クアッドコア\\ 1.5 GHz\\ ARMv8 (32/64bit)\\ ARM Cortex-A | 1 GB | Gigabit イーサネット\\ 2.4 GHz / 5 GHz\\ (b/g/n/ac) WiFi | ::: | 2019 | | ::: | B (2 GiB) | ::: | ::: | ::: | 2 GB | ::: | ::: | ::: | | ::: | B (4 GiB) | ::: | ::: | ::: | 4 GB | ::: | ::: | ::: | | ::: | B (8 GiB) | ::: | ::: | ::: | 8 GB | ::: | ::: | 2020 | | Raspberry Pi Zero 2 W | Zero 2 W | ゼロ | BCM2710A1 | ARM\\ Cortex-A53\\ クアッドコア\\ 1.5 GHz\\ ARMv8 (32/64bit)\\ ARM Cortex-A | 512 MB | 2.4 GHz (b/g/n) WiFi\\ Bluetooth 4.2\\ Bluetooth Low Energy (BLE) | ::: | 2021 | ※ ネットワーク インターフェース\\   [[https://datasheetspdf.com/pdf-file/679165/SMSC/LAN9512/1|SMSC LAN9512]] - USB 2.0 Hub and 10/100 Ethernet Controller\\   [[https://datasheetspdf.com/pdf-file/679167/SMSC/LAN9514/1|SMSC LAN9514]] - USB 2.0 Hub and 10/100 Ethernet Controller\\ ※ フォームファクタ\\   標準: 85.6 mm × 56.5 mm (3.37 インチ × 2.22 インチ)\\   コンパクト: 65 mm × 56.5 mm (2.56 インチ × 2.22 インチ)\\   ゼロ: 65 mm × 30 mm (2.6 インチ × 1.2 インチ)\\ [[wp>Raspberry_Pi|Raspberry Pi - Wikipedia]] および [[wpjp>Raspberry_Pi|Raspberry Pi - Wikipedia(ja)]]より\\ ===== SoC アーキテクチャ ===== ^ [[wpjp>ARMアーキテクチャ|ARM アーキテクチャ]] ^ [[wpjp>命令セット|命令セット]] ^ Linux\\ アーキテクチャ ^ SBC ^ SoC ^ |ARM1176JZ(F)-S\\ (32 bit) |ARMv6KZ |armhf |Raspberry Pi(初代)\\ Raspberry Pi Zero |Broadcom BCM2835 シングルコア 700 MHz,1.0 GHz | |Cortex™-A7\\ (32 bit) |ARMv7-A |::: |Raspberry Pi 2 |Broadcom BCM2836 クアッドコア 900 MHz | |Cortex™-A17\\ (32 bit) |::: |::: |[[https://www.asus.com/jp/Single-Board-Computer/Tinker-Board/|Tinker Board | シングルボードコンピュータ | ASUS 日本]] |Rockchip RK3288 クアッドコア 1.8GHz | |Cortex™-A53\\ (64 bit) |ARMv8-A |arm64 | |Broadcom BCM2837 クアッドコア 900 MHz,1.2 GHz,1.4 GHz\\ Broadcom BCM2710A1 クアッドコア 1 GHz\\ Rockchip RK3368\\ Qualcomm Snapdragon 410-935 | |Cortex™-A55\\ (64 bit) |ARMv8.2-A |::: |Banana Pi |Amlogic S905X3(Quad-Core Cortex-A55) | |Cortex™-A72\\ Cortex™-A53\\ (64 bit) |::: |::: |ROCK Pi\\ [[https://gadgetrip.jp/2019/09/friendlyelec_nanopi_m4v2/|NanoPi M4V2]]\\ [[https://gadgetrip.jp/2020/12/friendlyelec_nanopi_r4s/|NanoPi R4S]] |Rockchip RK3399(Dual-Core Cortex-A72 2.0 GHz and Quad-Core Cortex-A53 1.5GHz) | | | | | |Rockchip [[https://www.96rocks.com/blog/2020/11/28/introduce-rockchip-rk3568/|RK3568]]\\ [[https://www.96rocks.com/tags/rk3588/|RK3588]] | [[wpjp>ARMアーキテクチャ|ARMアーキテクチャ - Wikipedia]] より\\ 参考: [[https://gadgetrip.jp/category/sbc/|シングルボードコンピューター | がじぇっとりっぷ]]\\ [[https://www.96rocks.com/blog/2019/11/25/rockchip-2020-roadmap-update/|Rockchip 2020 Processor Roadmap Update]]\\ {{:hardware:rockchip_roadmap_2020-1.png?800|Rockchip Processor Roadmap}}\\ ===== 本体写真 ===== |{{hardware:raspberry_pi_1_model_a.png?280|Raspberry Pi Model A}}| |[[https://commons.wikimedia.org/wiki/File:Raspberry_Pi_Model_B_Rev._2.jpg|Raspberry_Pi_Model_B_Rev.2]]\\ - Wikimedia Commons| |{{hardware:raspberry-pi-2-bare-br.jpg?280|Raspberry Pi 2 Model B V1.1}}| |[[https://commons.wikimedia.org/wiki/File:Raspberry-Pi-2-Bare-BR.jpg|Raspberry-Pi-2-Bare-BR]]\\ - Wikimedia Commons| |{{hardware:raspberry_pi_zero_wh.jpg?280|Raspberry Pi Zero WH}}| |[[https://commons.wikimedia.org/wiki/File:Raspberry_Pi_Zero_WH.jpg|Raspberry_Pi_Zero_WH]]\\ - Wikimedia Commons| ===== SD カード ===== [[hardware:sd_memory_card|SD メモリーカード]]\\ [[.raspberry_pi:sdcard_overclock|Raspberry Pi で SD カードを 125 MHz にオーバークロック🔥💥する方法🤤]]\\ SD カードのオーバークロックのアイデアは Raspberry Pi Dramble が元になっています。\\ Raspberry Pi Dramble は Raspberry Pi クラスター上で Drupal 9 を動作させているプロジェクトです。\\ **Raspberry Pi Dramble**\\ [[git>geerlingguy/raspberry-pi-dramble|geerlingguy/raspberry-pi-dramble: Raspberry Pi Kubernetes cluster that runs HA/HP Drupal 8]]\\ [[http://www.pidramble.com/wiki|Wiki | Raspberry Pi Dramble]]\\ [[https://www.pidramble.com/wiki/benchmarks/microsd-cards|microSD Card Benchmarks | Raspberry Pi Dramble]]\\ Raspberry Pi の SD メモリーカードスロットでは SD カードをオーバークロックできる。\\ 通常は microSD clock: 50.000 MHz である。\\ Linux カーネルのデバッグ情報から SD カードのクロックが得られます。\\ $ sudo cat /sys/kernel/debug/mmc0/ios clock: 50000000 Hz actual clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B) 注意!! UHS 認定されていないカードの場合、データが破損する可能性があるので、バックアップは必須です😊\\ microSD リーダーを 100MHz にオーバークロックする場合。\\ $ sudo bash -c 'printf "dtparam=sd_overclock=100\n" >> /boot/config.txt' $ sudo reboot 参考: [[https://www.raspberrypi.org/forums/viewtopic.php?t=195895|SD-Card-Overclock - Raspberry Pi Forums]]\\  [[https://www.jeffgeerling.com/blog/2016/how-overclock-microsd-card-reader-on-raspberry-pi-3|How to overclock the microSD card reader on a Raspberry Pi 3 | Jeff Geerling]]\\ ==== ベンチマーク ==== $ curl https://raw.githubusercontent.com/geerlingguy/raspberry-pi-dramble/master/setup/benchmarks/microsd-benchmarks.sh | sudo bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2247 100 2247 0 0 3323 0 --:--:-- --:--:-- --:--:-- 3348 Raspberry Pi Dramble microSD benchmarks microSD clock: 50.000 MHz Running hdparm test... /dev/mmcblk0: HDIO_DRIVE_CMD(identify) failed: Invalid argument Timing buffered disk reads: 68 MB in 3.09 seconds = 22.04 MB/sec Running dd test... 51200+0 レコード入力 51200+0 レコード出力 419430400 bytes (419 MB, 400 MiB) copied, 24.498 s, 17.1 MB/s Running iozone test... Iozone: Performance Test of File I/O Version $Revision: 3.488 $ Compiled for 32 bit mode. Build: linux-arm Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins Al Slater, Scott Rhine, Mike Wisner, Ken Goss Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR, Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner, Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone, Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root, Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer, Vangel Bojaxhi, Ben England, Vikentsi Lapa, Alexey Skidanov, Sudhir Kumar. Run began: Tue Mar 2 06:25:06 2021 Include fsync in write timing O_DIRECT feature enabled Auto Mode File size set to 102400 kB Record Size 4 kB Command line used: ./iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2 Output is in kBytes/sec Time Resolution = 0.000001 seconds. Processor cache size set to 1024 kBytes. Processor cache line size set to 32 bytes. File stride size set to 17 * record size. random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 102400 4 2305 2550 5095 5086 4366 2534 iozone test complete. microSD card benchmark complete! 参考: [[https://github.com/geerlingguy/raspberry-pi-dramble/blob/master/setup/benchmarks/microsd-benchmarks.sh|]] より\\ #!/bin/bash # Raspberry Pi microSD card benchmark script. # # A script I use to automate the running and reporting of benchmarks I compile # for: http://www.pidramble.com/wiki/benchmarks/microsd-cards # # Usage: # # Run it locally. # $ sudo ./microsd-benchmarks.sh # # # Run it straight from GitHub. # $ curl https://raw.githubusercontent.com/geerlingguy/raspberry-pi-dramble/master/setup/benchmarks/microsd-benchmarks.sh | sudo bash # # Another good benchmark: # $ curl http://www.nmacleod.com/public/sdbench.sh | sudo bash # # Author: Jeff Geerling, 2016 (last updated 2020) printf "\n" printf "Raspberry Pi Dramble microSD benchmarks\n" CLOCK="$(grep "actual clock" /sys/kernel/debug/mmc0/ios 2>/dev/null | awk '{printf("%0.3f MHz", $3/1000000)}')" if [ -n "$CLOCK" ]; then echo "microSD clock: $CLOCK" fi printf "\n" # Fail if $SUDO_USER is empty. if [ -z "$SUDO_USER" ]; then printf "This script must be run with sudo.\n" exit 1; fi # Variables. USER_HOME_PATH=$(getent passwd $SUDO_USER | cut -d: -f6) IOZONE_INSTALL_PATH=$USER_HOME_PATH IOZONE_VERSION=iozone3_489 cd $IOZONE_INSTALL_PATH # Install dependencies. if [ ! `which hdparm` ]; then printf "Installing hdparm...\n" apt-get install -y hdparm printf "Install complete!\n\n" fi if [ ! `which curl` ]; then printf "Installing curl...\n" apt-get install -y curl printf "Install complete!\n\n" fi if [ ! `which make` ]; then printf "Installing build tools...\n" apt-get install -y build-essential printf "Install complete!\n\n" fi # Download and build iozone. if [ ! -f $IOZONE_INSTALL_PATH/$IOZONE_VERSION/src/current/iozone ]; then printf "Installing iozone...\n" curl "http://www.iozone.org/src/current/$IOZONE_VERSION.tar" | tar -x cd $IOZONE_VERSION/src/current make --quiet linux-arm printf "Install complete!\n\n" else cd $IOZONE_VERSION/src/current fi # Run benchmarks. printf "Running hdparm test...\n" hdparm -t /dev/mmcblk0 printf "\n" printf "Running dd test...\n\n" dd if=/dev/zero of=${USER_HOME_PATH}/test bs=8k count=50k conv=fsync; rm -f ${USER_HOME_PATH}/test printf "\n" printf "Running iozone test...\n" ./iozone -e -I -a -s 100M -r 4k -i 0 -i 1 -i 2 printf "\n" printf "microSD card benchmark complete!\n\n" [[linux:iozone|iozone - ファイルシステム ベンチマーク]]\\ [[https://www.raspberrypi.org/documentation/installation/sd-cards.md|SD cards - Raspberry Pi Documentation]]\\ [[https://elinux.org/RPi_SD_cards|RPi SD cards - eLinux.org]]\\ ===== ハードウェア情報 ===== [[.:raspberry_pi:revision_code|リビジョン コード]]\\ ==== 付録 ==== [[.raspberry_pi:raspberry_pi_1_hwinfo|Raspberry Pi (初代) HWInfo]]\\ ==== GPIO (General-purpose input/output - 汎用入出力) ==== **GPIO**は、集積回路やコンピュータボード上の一般的なピンであり、その動作(入力ピンであるか出力ピンであるかを含む)は、実行時にユーザによって制御可能である。GPIOは"General-purpose input/output"の略で、「汎用入出力」を意味する。\\ マイクロプロセッサ、マイクロコントローラ、インタフェースデバイスは、外界と接続するための一つまたは複数のGPIOインタフェースを持っている。\\ GPIOピンにはあらかじめ定義された目的がなく、デフォルトでは使用されない。\\ すでに構築済みのシステムにシステムインテグレータがデジタル制御線を追加したい場合に、あらかじめチップにGPIOをつけておけば、そのための回路を追加する必要がなくなる。例えば、RealtekのALC260チップ(音声コーデック用)には8つのGPIOピンがあり、デフォルトでは使用されない。エイサーのラップトップでは、ALC260のGPIOの1つ目のピン(GPIO0)を使用して、ラップトップの内蔵スピーカと外付けヘッドフォンジャックのためのアンプをオンにしている。\\ [[wpjp>GPIO|GPIO - Wikipedia]] より\\ [[https://gpiozero.readthedocs.io/en/stable/index.html|gpiozero — Gpiozero 1.5.1 Documentation]]\\ === pinout コマンド ===
$ pinout
.-------------------------. | oooooooooooooooooooo J8 | | 1ooooooooooooooooooo |c ---+ +---+ PiZero W|s sd| |SoC| V1.1 |i ---+|hdmi| +---+ usb pwr | `---| |--------| |-| |-' Revision : 9000c1 SoC : BCM2835 RAM : 512MB Storage : MicroSD USB ports : 1 (of which 0 USB3) Ethernet ports : 0 (0Mbps max. speed) Wi-fi : True Bluetooth : True Camera ports (CSI) : 1 Display ports (DSI): 0 J8: 3V3 (1) (2) 5V GPIO2 (3) (4) 5V GPIO3 (5) (6) GND GPIO4 (7) (8) GPIO14 GND (9) (10) GPIO15 GPIO17 (11) (12) GPIO18 GPIO27 (13) (14) GND GPIO22 (15) (16) GPIO23 3V3 (17) (18) GPIO24 GPIO10 (19) (20) GND GPIO9 (21) (22) GPIO25 GPIO11 (23) (24) GPIO8 GND (25) (26) GPIO7 GPIO0 (27) (28) GPIO1 GPIO5 (29) (30) GND GPIO6 (31) (32) GPIO12 GPIO13 (33) (34) GND GPIO19 (35) (36) GPIO16 GPIO26 (37) (38) GPIO20 GND (39) (40) GPIO21 For further information, please refer to https://pinout.xyz/
===== 応用事例 ===== \\ ==== クラスター ==== **コンピュータ・クラスター** (英語: computer cluster) とは、複数のコンピュータを結合し、クラスター(葡萄の房)のようにひとまとまりとしたシステムのこと。単に「クラスター」または「クラスタリング」とも呼ばれる。1 台のコンピュータでは得られないような、強力な計算性能や可用性を得ることができる。コンピュータ・クラスターは、クラスタリングを実現するためのハードウェアやソフトウェアなどにより構成される。但し、ネットワークを介してデータを入力して処理を開始するため、処理開始までの遅延が大きくなる欠点がある。\\ [[wpjp>コンピュータ・クラスター|コンピュータ・クラスター - Wikipedia]] より\\
Large scale raspberry Pi zero cluster v3, 216 Pi's now
\\ ふつうの方はこんな応用事例は期待してませんよね〜😅💦💦💦\\ もっと身近なものを期待して応用事例を探す訳で…😅\\ 寒い北海道にはこのくらいぢゃなきゃ🥰\\ パイ🥧が丸焦げになりそうな勢いです🤤\\ ===== Raspberry Pi 起動用 SD カードのバックアップ/復元 ===== [[windows:usb_image_tool|USB Image Tool - USB フラッシュ、SD カードのバックアップ/復元]]\\ ===== Raspberry Pi Zero WH ===== **電子部品・半導体パーツの通販 販売 | マルツオンライン**\\ [[https://www.marutsu.co.jp/pc/i/1320453/|Raspberry Pi Zero WH RASPIZWHSC0065|電子部品・半導体通販のマルツ]]\\ 価格: 2,200 円(税込)\\ 3,000 円(税込)以上で送料無料。\\ ネコポス385円(税込)、全国一律550円(税込)。\\ **【共立エレショップ】eleshop.jp:電子部品,半導体,キットの通販**\\ [[https://eleshop.jp/shop/g/gI5L312/|Raspberry Pi Zero WH ヘッダーピン実装仕様 / Raspberry Pi Zero WH]]\\ 価格: 2,200 円(税込)\\ 7,500 円(税込)以上で送料無料。\\ ネコポス310円(税込)、本州/四国/九州550円(税込)、北海道/沖縄1300円(税込)。\\ ===== Raspberry Pi Zero 2 W 😍 ===== **Raspberry Pi Shop by KSY**\\ [[https://raspberry-pi.ksyic.com/main/index/pdp.id/849,850,851|Raspberry Pi Zero 2 W [RASPIZ2SC0510]]](2022/06/24~)\\ 価格: 2,475円(税込)\\ 11,000円(税込)以上で送料無料。\\ 配送料金全国一律550円(税込)。\\ **スイッチサイエンス**\\ [[https://www.switch-science.com/catalog/7600/|Raspberry Pi Zero 2 W - スイッチサイエンス]](2022/06/21~)\\ 価格: 2,508(税込)\\ ネコポス200円 3,000円(税込)以上、宅急便650円 8,000円(税込)以上で送料無料。\\ **共立エレショップ**\\ [[https://eleshop.jp/shop/g/gNCS311/|Raspberry Pi Zero 2 W SC0510]]\\ 価格: 3,113(税込)\\ ==== Raspberry Pi Zero で Arduino IDE ==== [[.raspberry_pi:arduino_ide_on_raspberry_pi_zero|Raspberry Pi Zero で Arduino IDE]]\\ ==== KIT_40W_AMP_HAT_ZW ==== [[.:raspberry_pi:infineon_kit_40w_amp_hat_zw|Infineon KIT_40W_AMP_HAT_ZW - Raspberry Pi Zero W 用クラスD 窒化ガリウムオーディオアンプ]]\\ ===== Google AIY Voice Kit V2.0 ===== [[:hardware:raspberry_pi:google_aiy_voice_kit|Google AIY Voice Kit V2.0]]\\ \\ **電子部品・半導体パーツの通販 販売 | マルツオンライン**\\ [[https://www.marutsu.co.jp/pc/i/1353633/|Google AIY Voice Kit V2(Aiスピーカー自作キット) RASCPAIVOICE2B|電子部品・半導体通販のマルツ]]\\ [[https://www.marutsu.co.jp/pc/i/1353633/|【在庫処分セール】[応用キット]Google AIY Voice Kit V2(Aiスピーカー自作キット) RASCPAIVOICE2B Google製|電子部品・半導体通販のマルツ]]\\ 価格: ¥6.930円(税込) (2020/08/31 現在)\\ 3,000 円(税込)以上で送料無料。\\ 参考価格: \\ [[https://akizukidenshi.com/catalog/g/gK-13734/|Google AIY Voice Kit V2 - 秋月]] ¥7,600 (2020/09/02 現在)\\ [[https://www.switch-science.com/catalog/3955/|Google AIY Voice Kit V2 - スイッチサイエンス]] ¥8,250 (2020/09/02 現在)\\ [[https://amzn.to/34IY0oV|【国内代理店版】Google AIY Voice Kit V2 (B07GBNH5NN) - Amazon]] ¥8,800 (2020/08/31 現在)\\ ===== Diet Pi ===== [[.raspberry_pi:dietpi|Diet Pi]]\\ ===== Raspberry Pi (初代) ===== ==== インストール ==== SD カードを作る。\\ Pidora 2014 R3 をインストールする。\\ ※もう少し詳しく書き直します。\\ ==== Pidpra の初期設定 ==== 日本語フォントをインストールする。\\ $ sudo yum install vlgothic-fonts vlgothic-p-fonts Loaded plugins: langpacks, refresh-packagekit Resolving Dependencies --> Running transaction check ---> Package vlgothic-fonts.noarch 0:20130607-2.fc20 will be installed ---> Package vlgothic-p-fonts.noarch 0:20130607-2.fc20 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: vlgothic-fonts noarch 20130607-2.fc20 pidora 2.2 M vlgothic-p-fonts noarch 20130607-2.fc20 pidora 2.2 M Transaction Summary ================================================================================ Install 2 Packages Total download size: 4.4 M Installed size: 7.9 M Is this ok [y/d/N]: y Downloading packages: (1/2): vlgothic-fonts-20130607-2.fc20.noarch.rpm | 2.2 MB 00:06 (2/2): vlgothic-p-fonts-20130607-2.fc20.noarch.rpm | 2.2 MB 00:07 -------------------------------------------------------------------------------- Total 534 kB/s | 4.4 MB 00:08 Running transaction check Running transaction test Transaction test succeeded Running transaction (shutdown inhibited) Installing : vlgothic-p-fonts-20130607-2.fc20.noarch 1/2 Installing : vlgothic-fonts-20130607-2.fc20.noarch 2/2 Verifying : vlgothic-fonts-20130607-2.fc20.noarch 1/2 Verifying : vlgothic-p-fonts-20130607-2.fc20.noarch 2/2 Installed: vlgothic-fonts.noarch 0:20130607-2.fc20 vlgothic-p-fonts.noarch 0:20130607-2.fc20 Complete! システムを最新に更新する。\\ $ sudo yum update Loaded plugins: langpacks, refresh-packagekit Resolving Dependencies --> Running transaction check ---> Package bash.armv6hl 0:4.2.47-2.fc20 will be updated ---> Package bash.armv6hl 0:4.2.48-2.fc20 will be an update ---> Package libtool-ltdl.armv6hl 0:2.4.2-24.fc20 will be updated ---> Package libtool-ltdl.armv6hl 0:2.4.2-26.fc20 will be an update ---> Package raspberrypi-kernel.armv6hl 0:3.12.26-1.20140808git4ab8abb.rpfr20 will be installed ---> Package raspberrypi-kernel-devel.armv6hl 0:3.12.23-2.20140626git25673c3.rpfr20 will be updated ---> Package raspberrypi-kernel-devel.armv6hl 0:3.12.26-1.20140808git4ab8abb.rpfr20 will be an update ---> Package raspberrypi-kernel-headers.armv6hl 0:3.12.23-2.20140626git25673c3.rpfr20 will be updated ---> Package raspberrypi-kernel-headers.armv6hl 0:3.12.26-1.20140808git4ab8abb.rpfr20 will be an update ---> Package raspberrypi-vc-demo-source.armv6hl 0:20140630git1682505-19.rpfr20 will be updated ---> Package raspberrypi-vc-demo-source.armv6hl 0:20140808gitdf36e8d-2.rpfr20 will be an update ---> Package raspberrypi-vc-firmware.armv6hl 0:20140630git1682505-19.rpfr20 will be updated ---> Package raspberrypi-vc-firmware.armv6hl 0:20140808gitdf36e8d-2.rpfr20 will be an update ---> Package raspberrypi-vc-libs.armv6hl 0:20140630git1682505-19.rpfr20 will be updated ---> Package raspberrypi-vc-libs.armv6hl 0:20140808gitdf36e8d-2.rpfr20 will be an update ---> Package raspberrypi-vc-libs-devel.armv6hl 0:20140630git1682505-19.rpfr20 will be updated ---> Package raspberrypi-vc-libs-devel.armv6hl 0:20140808gitdf36e8d-2.rpfr20 will be an update ---> Package raspberrypi-vc-static.armv6hl 0:20140630git1682505-19.rpfr20 will be updated ---> Package raspberrypi-vc-static.armv6hl 0:20140808gitdf36e8d-2.rpfr20 will be an update ---> Package raspberrypi-vc-utils.armv6hl 0:20140630git1682505-19.rpfr20 will be updated ---> Package raspberrypi-vc-utils.armv6hl 0:20140808gitdf36e8d-2.rpfr20 will be an update --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: raspberrypi-kernel armv6hl 3.12.26-1.20140808git4ab8abb.rpfr20 pidora-rpfr-updates 11 M Updating: bash armv6hl 4.2.48-2.fc20 pidora-updates 921 k libtool-ltdl armv6hl 2.4.2-26.fc20 pidora-updates 45 k raspberrypi-kernel-devel armv6hl 3.12.26-1.20140808git4ab8abb.rpfr20 pidora-rpfr-updates 7.9 M raspberrypi-kernel-headers armv6hl 3.12.26-1.20140808git4ab8abb.rpfr20 pidora-rpfr-updates 830 k raspberrypi-vc-demo-source armv6hl 20140808gitdf36e8d-2.rpfr20 pidora-rpfr-updates 30 M raspberrypi-vc-firmware armv6hl 20140808gitdf36e8d-2.rpfr20 pidora-rpfr-updates 3.0 M raspberrypi-vc-libs armv6hl 20140808gitdf36e8d-2.rpfr20 pidora-rpfr-updates 397 k raspberrypi-vc-libs-devel armv6hl 20140808gitdf36e8d-2.rpfr20 pidora-rpfr-updates 290 k raspberrypi-vc-static armv6hl 20140808gitdf36e8d-2.rpfr20 pidora-rpfr-updates 8.4 k raspberrypi-vc-utils armv6hl 20140808gitdf36e8d-2.rpfr20 pidora-rpfr-updates 143 k Transaction Summary ================================================================================ Install 1 Package Upgrade 10 Packages Total size: 55 M Total download size: 55 M Is this ok [y/d/N]: y Downloading packages: No Presto metadata available for pidora-rpfr-updates No Presto metadata available for pidora-updates (1/10): bash-4.2.48-2.fc20.armv6hl.rpm | 921 kB 00:05 (2/10): raspberrypi-kernel-3.12.26-1.20140808git4ab8abb.rpf | 11 MB 00:16 (3/10): raspberrypi-kernel-devel-3.12.26-1.20140808git4ab8a | 7.9 MB 00:17 (4/10): raspberrypi-kernel-headers-3.12.26-1.20140808git4ab | 830 kB 00:02 (5/10): raspberrypi-vc-firmware-20140808gitdf36e8d-2.rpfr20 | 3.0 MB 00:03 (6/10): raspberrypi-vc-libs-20140808gitdf36e8d-2.rpfr20.arm | 397 kB 00:01 (7/10): raspberrypi-vc-libs-devel-20140808gitdf36e8d-2.rpfr | 290 kB 00:02 (8/10): raspberrypi-vc-static-20140808gitdf36e8d-2.rpfr20.a | 8.4 kB 00:00 (9/10): raspberrypi-vc-utils-20140808gitdf36e8d-2.rpfr20.ar | 143 kB 00:01 (10/10): raspberrypi-vc-demo-source-20140808gitdf36e8d-2.rp | 30 MB 00:42 -------------------------------------------------------------------------------- Total 914 kB/s | 55 MB 01:01 Running transaction check Running transaction test Transaction test succeeded Running transaction (shutdown inhibited) Updating : raspberrypi-vc-firmware-20140808gitdf36e8d-2.rpfr20.armv 1/21 Updating : raspberrypi-vc-libs-20140808gitdf36e8d-2.rpfr20.armv6hl 2/21 Updating : raspberrypi-vc-demo-source-20140808gitdf36e8d-2.rpfr20.a 3/21 Updating : raspberrypi-vc-libs-devel-20140808gitdf36e8d-2.rpfr20.ar 4/21 Updating : raspberrypi-vc-static-20140808gitdf36e8d-2.rpfr20.armv6h 5/21 Updating : raspberrypi-kernel-devel-3.12.26-1.20140808git4ab8abb.rp 6/21 Updating : raspberrypi-kernel-headers-3.12.26-1.20140808git4ab8abb. 7/21 Updating : bash-4.2.48-2.fc20.armv6hl 8/21 Installing : raspberrypi-kernel-3.12.26-1.20140808git4ab8abb.rpfr20.a 9/21 Updating : raspberrypi-vc-utils-20140808gitdf36e8d-2.rpfr20.armv6hl 10/21 Updating : libtool-ltdl-2.4.2-26.fc20.armv6hl 11/21 Cleanup : raspberrypi-vc-utils-20140630git1682505-19.rpfr20.armv6h 12/21 Cleanup : raspberrypi-vc-static-20140630git1682505-19.rpfr20.armv6 13/21 Cleanup : raspberrypi-vc-libs-devel-20140630git1682505-19.rpfr20.a 14/21 Cleanup : raspberrypi-vc-demo-source-20140630git1682505-19.rpfr20. 15/21 Cleanup : raspberrypi-vc-libs-20140630git1682505-19.rpfr20.armv6hl 16/21 Cleanup : raspberrypi-vc-firmware-20140630git1682505-19.rpfr20.arm 17/21 Cleanup : bash-4.2.47-2.fc20.armv6hl 18/21 Cleanup : raspberrypi-kernel-devel-3.12.23-2.20140626git25673c3.rp 19/21 Cleanup : raspberrypi-kernel-headers-3.12.23-2.20140626git25673c3. 20/21 Cleanup : libtool-ltdl-2.4.2-24.fc20.armv6hl 21/21 Verifying : raspberrypi-vc-demo-source-20140808gitdf36e8d-2.rpfr20.a 1/21 Verifying : raspberrypi-vc-libs-devel-20140808gitdf36e8d-2.rpfr20.ar 2/21 Verifying : libtool-ltdl-2.4.2-26.fc20.armv6hl 3/21 Verifying : raspberrypi-vc-static-20140808gitdf36e8d-2.rpfr20.armv6h 4/21 Verifying : raspberrypi-kernel-3.12.26-1.20140808git4ab8abb.rpfr20.a 5/21 Verifying : raspberrypi-kernel-headers-3.12.26-1.20140808git4ab8abb. 6/21 Verifying : raspberrypi-vc-utils-20140808gitdf36e8d-2.rpfr20.armv6hl 7/21 Verifying : raspberrypi-vc-libs-20140808gitdf36e8d-2.rpfr20.armv6hl 8/21 Verifying : raspberrypi-vc-firmware-20140808gitdf36e8d-2.rpfr20.armv 9/21 Verifying : raspberrypi-kernel-devel-3.12.26-1.20140808git4ab8abb.rp 10/21 Verifying : bash-4.2.48-2.fc20.armv6hl 11/21 Verifying : libtool-ltdl-2.4.2-24.fc20.armv6hl 12/21 Verifying : raspberrypi-kernel-headers-3.12.23-2.20140626git25673c3. 13/21 Verifying : raspberrypi-vc-libs-20140630git1682505-19.rpfr20.armv6hl 14/21 Verifying : raspberrypi-vc-demo-source-20140630git1682505-19.rpfr20. 15/21 Verifying : raspberrypi-vc-libs-devel-20140630git1682505-19.rpfr20.a 16/21 Verifying : raspberrypi-kernel-devel-3.12.23-2.20140626git25673c3.rp 17/21 Verifying : raspberrypi-vc-static-20140630git1682505-19.rpfr20.armv6 18/21 Verifying : raspberrypi-vc-firmware-20140630git1682505-19.rpfr20.arm 19/21 Verifying : raspberrypi-vc-utils-20140630git1682505-19.rpfr20.armv6h 20/21 Verifying : bash-4.2.47-2.fc20.armv6hl 21/21 Installed: raspberrypi-kernel.armv6hl 0:3.12.26-1.20140808git4ab8abb.rpfr20 Updated: bash.armv6hl 0:4.2.48-2.fc20 libtool-ltdl.armv6hl 0:2.4.2-26.fc20 raspberrypi-kernel-devel.armv6hl 0:3.12.26-1.20140808git4ab8abb.rpfr20 raspberrypi-kernel-headers.armv6hl 0:3.12.26-1.20140808git4ab8abb.rpfr20 raspberrypi-vc-demo-source.armv6hl 0:20140808gitdf36e8d-2.rpfr20 raspberrypi-vc-firmware.armv6hl 0:20140808gitdf36e8d-2.rpfr20 raspberrypi-vc-libs.armv6hl 0:20140808gitdf36e8d-2.rpfr20 raspberrypi-vc-libs-devel.armv6hl 0:20140808gitdf36e8d-2.rpfr20 raspberrypi-vc-static.armv6hl 0:20140808gitdf36e8d-2.rpfr20 raspberrypi-vc-utils.armv6hl 0:20140808gitdf36e8d-2.rpfr20 Complete! 更新を反映するために再起動する。\\ $ reboot ==== リビジョン情報 ==== $ cat /proc/cpuinfo processor : 0 model name : ARMv6-compatible processor rev 7 (v6l) Features : swp half thumb fastmult vfp edsp java tls CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xb76 CPU revision : 7 Hardware : BCM2708 Revision : 000d Serial : 00000000fa1c68ad ==== OS 情報 ==== Pidora Info\\ $ cat /etc/redhat-release Pidora release 2014 (Raspberry Pi Fedora Remix) Kernel Version\\ $ uname -a Linux pidora.monsters-g.local 3.12.26-1.20140808git4ab8abb.rpfr20.armv6hl.bcm2708 #1 PREEMPT Fri Aug 8 17:13:15 EDT 2014 armv6l armv6l armv6l GNU/Linux Memory Info\\ $ free total used free shared buffers cached Mem: 445964 386552 59412 7016 31224 162508 -/+ buffers/cache: 192820 253144 Swap: 524284 4 524280 ===== Raspbian GNU/Linux 9 (stretch) ===== ==== GUI / Console ログインの切り替え ==== 現在のログインオプションを調べるには、以下のいずれかの方法で行う。\\ **runlevel** を調べる\\ $ runlevel Console Login の場合\\ N 3 GUI Login の場合\\ N 5 **systemd** のデフォルトターゲットを調べる\\ $ systemctl get-default GUI Login の場合 (graphical.target) - **※標準**\\ graphical.target Console Login の場合 (multi-user.target)\\ multi-user.target **GUI / Console ログイン** の切り替え\\ Raspberry Pi は **raspi-config** を利用できる。\\ $ sudo raspi-config **3 Boot Options** -> **B1 Desktop / CLI** -> **B1 Console** or **B2 Console Autologin** or **B3 Desktop** or **B4 Desktop Autologin** を選択して ****。\\ しかし、**systemd** なので以下の方法でも良い。(raspi-config も内部的に以下を実行している)\\ $ sudo systemctl set-default multi-user.target Removed /etc/systemd/system/default.target. Created symlink /etc/systemd/system/default.target → /lib/systemd/system/multi-user.target. $ sudo systemctl set-default graphical.target Removed /etc/systemd/system/default.target. Created symlink /etc/systemd/system/default.target → /lib/systemd/system/graphical.target. 再起動を行う。\\ $ sudo reboot メモリーの使用量\\ $ runlevel N 3 $ free total used free shared buff/cache available Mem: 379568 42276 241364 2736 95928 285616 Swap: 102396 0 102396 $ runlevel N 5 $ free total used free shared buff/cache available Mem: 379568 81216 150636 4108 147716 244832 Swap: 102396 0 102396 ===== Raspbian GNU/Linux 10 (buster) ===== ==== Kernel バージョン ==== $ uname -a Linux raspberrypi 5.4.51+ #1333 Mon Aug 10 16:38:02 BST 2020 armv6l GNU/Linux ==== Voice Bonnet のサウンドドライバがロードされない ==== そもそも、ドライバーのインストールに失敗する。\\ $ sudo apt-get reinstall aiy-voicebonnet-soundcard-dkms パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 以下のパッケージが自動でインストールされましたが、もう必要とされていません: alsa-base gstreamer0.10-alsa gstreamer0.10-plugins-base libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libllvm8 libmicrodns0 libva-wayland2 libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-2 pimixer point-rpi rpi-eeprom-images xfconf これを削除するには 'sudo apt autoremove' を利用してください。 アップグレード: 0 個、新規インストール: 0 個、再インストール: 1 個、削除: 0 個、保留: 2 個。 32.7 kB のアーカイブを取得する必要があります。 この操作後に追加で 0 B のディスク容量が消費されます。 取得:1 https://packages.cloud.google.com/apt aiyprojects-stable/main armhf aiy-voicebonnet-soundcard-dkms all 2.0-1 [32.7 kB] 32.7 kB を 1秒 で取得しました (41.0 kB/s) (データベースを読み込んでいます ... 現在 151671 個のファイルとディレクトリがインストールされています。) .../aiy-voicebonnet-soundcard-dkms_2.0-1_all.deb を展開する準備をしています ... ------------------------------ Deleting module version: 2.0 completely from the DKMS tree. ------------------------------ Done. aiy-voicebonnet-soundcard-dkms (2.0-1) で (2.0-1 に) 上書き展開しています ... aiy-voicebonnet-soundcard-dkms (2.0-1) を設定しています ... Loading new aiy-voicebonnet-soundcard-2.0 DKMS files... It is likely that 5.4.51+ belongs to a chroot's host Building for 5.4.51+, 5.4.51-v7+, 5.4.51-v7l+ and 5.4.51-v8+ Building initial module for 5.4.51+ Error! Bad return status for module build on kernel: 5.4.51+ (armv6l) Consult /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/make.log for more information. dpkg: パッケージ aiy-voicebonnet-soundcard-dkms の処理中にエラーが発生しました (--configure): installed aiy-voicebonnet-soundcard-dkms package post-installation script subprocess returned error exit status 10 処理中にエラーが発生しました: aiy-voicebonnet-soundcard-dkms E: Sub-process /usr/bin/dpkg returned an error code (1) pi@raspberrypi:~ $ modinfo rl6231 rt5645 snd_aiy_voicebonnet modinfo: ERROR: Module rl6231 not found. modinfo: ERROR: Module rt5645 not found. modinfo: ERROR: Module snd_aiy_voicebonnet not found. $ cat /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/make.log DKMS make.log for aiy-voicebonnet-soundcard-2.0 for kernel 5.4.51+ (armv6l) 2020年 9月 8日 火曜日 06:47:50 JST make: ディレクトリ '/usr/src/linux-headers-5.4.51+' に入ります AR /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/built-in.a CC [M] /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.o /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:105:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’; did you mean ‘stream_name’? .codec_dai_name = "rt5645-aif1", ^~~~~~~~~~~~~~ stream_name /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:105:21: error: initialization of ‘struct snd_soc_dai_link_component *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types] .codec_dai_name = "rt5645-aif1", ^~~~~~~~~~~~~ /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:105:21: note: (near initialization for ‘snd_rpi_aiy_voicebonnet_dai[0].cpus’) /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c: In function ‘snd_rpi_aiy_voicebonnet_probe’: /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:161:8: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’; did you mean ‘stream_name’? dai->codec_name = NULL; ^~~~~~~~~~ stream_name /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:162:6: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_of_node’ dai->codec_of_node = of_parse_phandle(dev->of_node, ^~ /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:164:11: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_of_node’ if (!dai->codec_of_node) { ^~ /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:171:9: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’; did you mean ‘stream_name’? dai->cpu_dai_name = NULL; ^~~~~~~~~~~~ stream_name /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:172:7: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_of_node’ dai->cpu_of_node = i2s_node; ^~ /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:173:9: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’? dai->platform_name = NULL; ^~~~~~~~~~~~~ platforms /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.c:174:9: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_of_node’; did you mean ‘platforms’? dai->platform_of_node = i2s_node; ^~~~~~~~~~~~~~~~ platforms cc1: some warnings being treated as errors make[1]: *** [scripts/Makefile.build:266: /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build/snd-aiy-voicebonnet.o] エラー 1 make: *** [Makefile:1709: /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/build] エラー 2 make: ディレクトリ '/usr/src/linux-headers-5.4.51+' から出ます Kernel 5.3 からインストールに失敗する。\\ 参考: [[https://github.com/google/aiyprojects-raspbian/issues/697|Cannot install aiy-voicebonnet-soundcard-dkms on latest Raspbian · Issue #697 · google/aiyprojects-raspbian]]\\ ==== SD メモリーカードを大容量のものに乗り換える場合 ==== [[windows:usb_image_tool|USB Image Tool - USB フラッシュ、SD カードのバックアップ/復元]] で SD メモリーカードをバックアップして、新しい大容量の SD メモリーカードにリストアする。\\ Raspberry Pi を起動して **Raspberry Pi Software Configuration Tool** を実行する。\\ $ sudo raspi-config **[7 Advanced Options] -> [A1 Expand Filesystem] -> **\\ Welcome to fdisk (util-linux 2.33.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): Disk /dev/mmcblk0: 116.2 GiB, 124721823744 bytes, 243597312 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x3d843ba3 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 532479 524288 256M c W95 FAT32 (LBA) /dev/mmcblk0p2 532480 243597311 243064832 115.9G 83 Linux Command (m for help): Partition number (1,2, default 2): Partition 2 has been deleted. Command (m for help): Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): Partition number (2-4, default 2): First sector (2048-243597311, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (532480-243597311, default 243597311): Created a new partition 2 of type 'Linux' and of size 115.9 GiB. Partition #2 contains a ext4 signature. Command (m for help): Disk /dev/mmcblk0: 116.2 GiB, 124721823744 bytes, 243597312 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x3d843ba3 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 8192 532479 524288 256M c W95 FAT32 (LBA) /dev/mmcblk0p2 532480 243597311 243064832 115.9G 83 Linux Command (m for help): The partition table has been altered. Syncing disks. Raspberry Pi を再起動する。\\ $ sudo reboot ==== Raspberry Pi Zero WH でビルドするとメモリー不足になる ==== virtual memory exhausted: Cannot allocate memory CC lang/vid_gb_ap/libttsmimic_lang_vid_gb_ap_la-vid_gb_ap.lo CC lang/vid_gb_ap/libttsmimic_lang_vid_gb_ap_la-vid_gb_ap_cg_01_mcep_trees.lo CC lang/vid_gb_ap/libttsmimic_lang_vid_gb_ap_la-vid_gb_ap_cg_01_params.lo virtual memory exhausted: Cannot allocate memory make[1]: *** [Makefile:4069: lang/vid_gb_ap/libttsmimic_lang_vid_gb_ap_la-vid_gb_ap_cg_01_params.lo] Error 1 make[1]: Leaving directory '/home/pi/mycroft-core/mimic' make: *** [Makefile:4320: all-recursive] Error 1 標準の **Swap Size** は **CONF_SWAPSIZE=100** である。\\ $ cat /etc/dphys-swapfile # /etc/dphys-swapfile - user settings for dphys-swapfile package # author Neil Franklin, last modification 2010.05.05 # copyright ETH Zuerich Physics Departement # use under either modified/non-advertising BSD or GPL license # this file is sourced with . so full normal sh syntax applies # the default settings are added as commented out CONF_*=* lines # where we want the swapfile to be, this is the default #CONF_SWAPFILE=/var/swap # set size to absolute value, leaving empty (default) then uses computed value # you most likely don't want this, unless you have an special disk situation CONF_SWAPSIZE=100 # set size to computed value, this times RAM size, dynamically adapts, # guarantees that there is enough swap without wasting disk space on excess #CONF_SWAPFACTOR=2 # restrict size (computed and absolute!) to maximally this limit # can be set to empty for no limit, but beware of filled partitions! # this is/was a (outdated?) 32bit kernel limit (in MBytes), do not overrun it # but is also sensible on 64bit to prevent filling /var or even / partition #CONF_MAXSWAP=2048 **free** コマンドによる Swap サイズの確認。\\ $ free total used free shared buff/cache available Mem: 378116 40540 284528 992 53048 286968 Swap: 102396 72424 29972 以下の設定値は Raspberry Pi Zero の物理メモリー **512MB** に対して少なすぎる。\\ CONF_SWAPSIZE=100 **512MB x 2 = 1024** に変更する。\\ $ sudo nano /etc/dphys-swapfile CONF_SWAPSIZE=1024 **dphys-swapfile** サービスを再起動して設定を反映させる。\\ $ sudo systemctl restart dphys-swapfile **free** コマンドによる Swap サイズの確認。\\ $ free total used free shared buff/cache available Mem: 378116 40540 284528 992 53048 286968 Swap: 1048572 0 1048572 === CONF_SWAPSIZE=1024 に設定しても Swap サイズがきちんと増えない...orz === **dphys-swapfile** は SD メモリーカードに空き容量がないと指定した容量を確保しない。\\ $ free total used free shared buff/cache available Mem: 378116 71628 192564 2780 113924 253420 Swap: 658428 0 658428 SD メモリーカードを大容量のものに変更してから **dphys-swapfile** サービスを再起動して設定を反映させる。\\ $ sudo systemctl restart dphys-swapfile [[.:raspberry_pi#SD メモリーカードを大容量のものに乗り換える場合]] を参照。\\ ===== Windows 10 上で Raspberry Pi をエミュレート ===== [[windows:qemu|QEMU for Windows - オープンソースのプロセッサエミュレータ]]\\ ===== 情報源 ===== [[https://magpi.raspberrypi.org/|The MagPi magazine]]\\ [[tw>tomoyan596/status/1396901133390532614|「The MagPi という Raspberry Pi オフィシャルのマガジンがありまして、最新からバックナンバーまで無料で読めるので、時間を作って読んでみよう😊 オフィシャルが発行しているだけに、公式な情報が書かれていてとても役立ちそうです🤔」 / Twitter]]\\ ===== 参考文献 ===== [[https://www.raspberrypi.org/forums/viewtopic.php?t=93553|Personal Installation Notes for Pidora-2014 - Raspberry Pi Forums]]\\ [[http://86.88.74.224/domoticx/diskimages/raspberry_pi_pidora/|Pidora Images - DomoticX Repository]]\\ [[http://domoticx.com/raspberry-pi-sd-image-pidora-linux-os/|Raspberry Pi SD image - Pidora (Linux OS)]]\\ [[https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/|How to change Raspberry Pi's Swapfile Size on Raspbian · BitPi.co]]\\ [[https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a|Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!]]\\ [[https://www.hackerspacetech.com/|Hacker Space Tech – Be a hacker not a slacker]]\\ [[qita>Dimeiza/items/aa5243c468e3487ad6e2|Nano Pi M4でファンレスシングルボードSATA NASを作る - Qiita]]\\ [[https://gadgetrip.jp/2018/08/friendlyelec_nanopi_m4/|これは気になる。FriendlyELEC「NanoPi M4」はRK3399搭載でラズパイ互換インターフェース]]\\ [[https://kakurasan.tk/raspberrypi/rpiboot-can-boot-pizero-without-microsd/|Raspberry Pi ZeroなどをUSB接続したマシンからmicroSDなしでOS起動::kakurasanのLinux書庫]]\\ [[https://deviceplus.jp/hobby/raspberrypi-gpio/|ラズパイ(Raspberry Pi)のGPIOを再確認! まずは汎用入出力からマスターしよう | Device Plus - デバプラ]]\\ [[https://misoji-engineer.com/archives/raspberrypi-gpio.html|ラズベリーパイのGPIOの使い方!5V/12Vを制御してみた]]\\ [[http://www.neko.ne.jp/~freewing/raspberry_pi/raspberry_pi_3_oled_0_96inch_spi_ssd1306/|Raspberry Pi 3で SPI接続の SSD1306 0.96インチ OLEDディスプレイを使用する方法 (ラズパイ3に 128x64 SSD1306 0.96インチ 有機 LEDモジュールを Pythonで制御する方法。)]]\\ [[https://ht-deko.com/arduino/oled_spi.html|[SPI] 0.96 inch OLED ディスプレイ (ER-OLED0.96-3W / SSD1306)]]\\ [[https://www.denshi.club/pc/raspi/5raspberry-pi-zeroiot1.html|5ドル!ラズパイ・ゼロ(Raspberry pi Zero)でIoT (1) ラズパイとは (Rev.C) | 電子工作の環境向上]]\\ [[https://www.denshi.club/pc/raspi/5raspberry-pi-zeroiot4a-d1.html|5ドル!ラズパイ・ゼロ(Raspberry pi Zero)でIoT (4) A-Dコンバータの利用1 MCP3424 | 電子工作の環境向上]]\\ [[https://forum.arduino.cc/t/dsi-video-on-mipi-port/653605|DIY SmartPhone Oscilloscope using Raspberry Pi Pico]]\\ ==== 付録 ==== [[tw>tomoyan596/status/1455340152616751108|Raspberry Pi Zero 2 WはARM Cortex-A53でARMv8アーキテクチャになったので、arm64なLinuxが実行可能になりますよねぇ🤔FedoraのARM版がやっと使えます🤤🥰]]\\