~~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 ファミリー =====
  
$ 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)
$ 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!
#!/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"
$ pinout
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
$ cat /etc/redhat-release
Pidora release 2014 (Raspberry Pi Fedora Remix)
$ 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
$ free
             total       used       free     shared    buffers     cached
Mem:        445964     386552      59412       7016      31224     162508
-/+ buffers/cache:     192820     253144
Swap:       524284          4     524280
$ runlevel
N 3
GUI Login の場合\\
N 5
$ systemctl get-default
graphical.target
Console Login の場合 (multi-user.target)\\
multi-user.target
$ sudo raspi-config
**3 Boot Options** -> **B1 Desktop / CLI** -> **B1 Console** or **B2 Console Autologin** or **B3 Desktop** or **B4 Desktop Autologin** を選択して **
$ 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
$ uname -a
Linux raspberrypi 5.4.51+ #1333 Mon Aug 10 16:38:02 BST 2020 armv6l GNU/Linux
$ 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+' から出ます
$ sudo raspi-config
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.
$ sudo reboot
  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
$ 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
              total        used        free      shared  buff/cache   available
Mem:         378116       40540      284528         992       53048      286968
Swap:        102396       72424       29972
CONF_SWAPSIZE=100
$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=1024
$ sudo systemctl restart dphys-swapfile
$ free
              total        used        free      shared  buff/cache   available
Mem:         378116       40540      284528         992       53048      286968
Swap:       1048572           0     1048572
$ free
              total        used        free      shared  buff/cache   available
Mem:         378116       71628      192564        2780      113924      253420
Swap:        658428           0      658428
$ sudo systemctl restart dphys-swapfile