こんにちは
前回は、Raspberry Pi(B)にArchlinuxのimgをインストールするも、sshが起動できず、Linuxを使ってインストールし直す羽目になりました。
さてこの新しいファームウェアを使って、「もどきラジオ」を作ることになるのですが、ハードウェアとしてLCDやロータリエンコーダ、スイッチなどを動かす必要があります。
そのために「WiningPi]など幾つかのソフトをインストールしなければなりません。
これらをインストール(別の記事で紹介します。)した後に、Python2.7でimportしてみるとエラーになったりと全く動く気配がありませんでした。
エラー
さてエラーとして多分重要であろうと思われるのは
「Unable to determine hardware version. I see : hardware :BCM2835」
です。
これを解決すべくこのエラーで検索してみると同様のことが起きていることがわかりました。 結論としては、現在使用中のファームウェアをダウングレードすることが必要だとわかりました。
ダウングレード
現在のファームウェアは
Arch linux 4.9.36-1-ARCH 8tty
となっていました。
ダウングレードは
$ sudo rpi-update[対象バージョンのハッシュ値]
で出来るようなのですが、悲しいかなArchlinuxでは使えませんでした。
そこで検索して調べてみることに
rpi-update
https://github.com/Hexxeh/rpi-update
この中の
Installing under other OSes
で
$ sudo curl -L –output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update
それ意外にも以下のコマンドで入手できるようです。
$ sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
——————————————–
$ sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
–2017-07-23 18:42:55– https://raw.github.com/Hexxeh/rpi-update/master/rpi-update
CA証明書 ‘/etc/ssl/certs/ca-certificates.crt’ をロードしました
raw.github.com をDNSに問いあわせています… 151.101.72.133
raw.github.com|151.101.72.133|:443 に接続しています… 接続しました。
HTTP による接続要求を送信しました、応答を待っています… 301 Moved Permanently
場所: https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update [続く]
–2017-07-23 18:42:59– https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update
raw.githubusercontent.com をDNSに問いあわせています… 151.101.72.133
raw.githubusercontent.com|151.101.72.133|:443 に接続しています… 接続しました。
HTTP による接続要求を送信しました、応答を待っています… 200 OK
長さ: 13403 (13K) [text/plain]
`/usr/bin/rpi-update’ に保存中
/usr/bin/rpi-update 100%[===================>] 13.09K –.-KB/s 時間 0.006s
2017-07-23 18:42:59 (2.27 MB/s) – `/usr/bin/rpi-update’ へ保存完了
ということでこれも使えます。
$ ls /usr/bin/rpi-update
/usr/bin/rpi-update
——————————————–
を試しにArchlinuxで実行して見ました。
——————————————–
$ sudo curl -L –output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13403 100 13403 0 0 3069 0 0:00:04 0:00:04 –:–:– 3070
となりエラーは起きませんでした。
/usr/bin/rpi-updateができている筈ですが、
$ ls /usr/bin/rpi-update
/usr/bin/rpi-update
ということでArchlinuxにインストールできました。
ダウングレードの仕方
ダウングレードは以下のコマンドでできるようなのですが、対象バージョンのハッシュ値なるものがわかりません。
仕方ないのでサイトで公開されている方のハッシュ値を使わせていただきました。
感謝します。
https://dbpro.xyz/3275
Raspberry Pi ファームウェアをダウングレードする
$ sudo rpi-update[対象バージョンのハッシュ値]
$ sudo rpi-update 00a7eac6efc6ba29d94a7460f68215a1dbbdef0b
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** We’re running for the first time
*** Backing up files (this will take a few minutes)
*** Backing up firmware
*** Backing up modules 4.9.36-1-ARCH
This update bumps to rpi-4.4.y linux tree
Be aware there could be compatibility issues with some drivers
Discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=144087
##############################################################
*** Downloading specific firmware revision (this will take a few minutes)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 168 0 168 0 0 137 0 –:–:– 0:00:01 –:–:– 137
100 52.3M 0 52.3M 0 0 385k 0 –:–:– 0:02:18 –:–:– 443k
*** Updating firmware
*** Updating kernel modules
*** depmod 4.4.47+
*** depmod 4.4.47-v7+
*** Updating VideoCore libraries
*** Using HardFP libraries
*** Updating SDK
*** Running ldconfig
*** Storing current firmware revision
*** Deleting downloaded files
*** Syncing changes to disk
*** If no errors appeared, your firmware was successfully updated to 00a7eac6efc6ba29d94a7460f68215a1dbbdef0b
*** A reboot is needed to activate the new firmware
$ uname -a
Linux alarm-pi 4.4.47+ #961 Sun Feb 5 20:11:30 GMT 2017 armv6l GNU/Linux
になりました。
ハッシュ値
なお別なサイトに
https://github.com/Hexxeh/rpi-firmware/commits/master?after=8320f0955987c3a573014fbb48d3dc60daa8009e+34
これからハッシュ値を取得できるそうです。
試しに
kernel: Bump to 4.4.50 のハッシュ値は
52241088c1da59a359110d39c1875cda56496764
です。
コメント