Raspberry Pi OS 64-bit 版本正式推出

Twitter 上看到前同事貼了 Raspberry Pi 官方放出 Raspberry Pi OS 64-bit 版本的公告:「Raspberry Pi OS (64-bit)」。

我是在 beta 時就已經跑一陣子了,依照官方的說明可以看到 Raspberry Pi 3 或是 Raspberry Pi Zero 2 以上的版本才支援 64-bit OS。

我是在 Raspberry Pi 3 上面跑,主要是現在大多數支援 ARM 指令集的 package 都是包 arm64,換到 64-bit OS 能裝的東西會比較多。

另外有提到目前 64-bit 版本的 Chromium 還沒有 Widevine 支援,無法看 Netflix 或是 Disney+,需要裝 32-bit 版本才能看:

The 64-bit version of Chromium, installed by default, has no version of the WidevineCDM library and therefore, it is not possible to play streaming media such as Netflix or Disney+.

不過應該過一陣子就會有了...

把 Whoogle 改跑在 Raspberry Pi 上面

本來是把 Whoogle 跑在固定 IP 的機器上面,後來發現一下就被擋了,改用 Tor 跑也沒用 (exit node 的 IP reputation 應該更差),花了些時間搬到 Raspberry Pi 上面跑,改用浮動 IP 來跑。

首先是 Docker 跑不起來的問題,這主要是 Raspberry Pi 第一代的 CPU 指令集似乎跟主流的 armhf 不同?不確定... 但最後是直接上 pipx 解決。

跑起來以後發現 IPv6 的 reputation 也很差,幾乎是一定會被擋 (在『繞過 Web 上「防機器人」機制的資料』這篇有提到),所以乾脆把整台機器的 IPv6 network 都關掉,強迫讓他走 IPv4 network,然後再定時重新撥 PPPoE 去換 IP...

不過目前是跑在 Raspberry Pi 第一代上面,速度真的好慢... 看之後有沒有機會換另外的板子 :o

Raspberry Pi 4 2GB 版本「暫時」漲價,另外 1GB 版本回歸

Raspberry Pi 宣佈 Raspberry Pi 4 的 2GB 版本將從 US$35 漲到 US$45,另外本來淘汰掉的 1GB 版本回歸,賣 US$35:「Supply chain, shortages, and our first-ever price increase」。

In February last year, we announced that we were discontinuing the 1GB variant of Raspberry Pi 4, and moving the 2GB product to our signature price of $35. We’re still glad we did this, as countless young people made use of this device as they studied from home during the pandemic.

Unfortunately, cost increases caused by the current shortage mean that this product is not currently economically viable at this reduced price point. We are therefore moving it back to $45 on a temporary basis.

To support the many industrial customers who have designed the 2GB variant of Raspberry Pi 4 into their products, we are reintroducing the 1GB variant at the $35 price point. This provides a degree of choice: less memory at the same price; or the same memory at a higher price.

然後共用 40nm 製程的 3B+ 會暫時先被降低優先權,產能會優先提供給 CM3CM3+3B

In allocating our limited stocks of 40nm silicon, we will prioritise Compute Module 3, Compute Module 3+, and Raspberry Pi 3B, and deprioritise Raspberry Pi 3B+.

整個供應鏈的情況被炸的亂七八糟...

雙 Gigabit Ethernet 的 RPi CM 4 擴充卡

看到「Dual Gigabit Ethernet Carrier Board for Raspberry Pi Compute Module 4」這個東西,一張可以接 Raspberry Pi Compute Module 4 擴充的母卡。

這張卡有兩個 Gigabit Ethernet (1Gbps),以及兩個 USB 3.0 接口:

然後大家都想到類似的用途了,可以拿來當 router,還可以走 USB 拉出來,接個硬碟當個簡單的 NAS 用用:

The Dual Gigabit Carrier Board powered by Raspberry Pi Compute Module 4 is equipped with Dual Gigabit Ethernet ports and dual USB 3.0 ports, making it suitable for soft router applications, while keeping the hardware to minimal.

不過無線網路的部份得自己搞,在買 RPi CM 4 的時候得選擇有無線網路的版本,母卡 (擴充卡) 本身不負責這塊業務。

翻了一下資料,以前 CM3 (不是 CM3+) 也有廠商推出兩個網路孔的板子,不過當時是兩個 Fast Ethernet (100Mbps):「Compulab IOT-GATE-RPi Industrial IoT Computer is Powered by Raspberry Pi CM3 Module」。

這次推出的板子跑起 software router 效能不知道怎麼樣,單純就可玩性來看似乎是頗有趣東西?

Raspberry Pi 4 官方的殼 + 官方的風扇

在「Raspberry Pi heatsink and case fan continued」這邊看到 Raspberry Pi 官方有出 RPi4 的殼 + 風扇,看起來是兩個月前的消息了,雖然我自己還是比較喜歡維護上比較方便的被動散熱... (在「Raspberry Pi 4 的散熱問題」這邊有提到過兩個方案)

官方的測試是編 Linux kernel,大概會跑快一個小時,首先是跑在預設上限 1.5Ghz 的情況下:

在超頻到 1.8Ghz 但沒有風扇的情況下,除了溫度比較高,反而還會變慢:

讓人迷惑的是,加上風扇後速度其實跟沒有超頻差不多,只是整體的溫度比較低... 這樣就看不太懂了,超頻的效能跑去哪了:

所以是編譯過程卡 i/o 嗎?暫時想不到其他原因...

Raspberry Pi 推出 MCU 產品 Pico

Raspberry Pi 推出了新的產品線 Raspberry Pi Pico,基於 ARM 架構的 MCU (microcontroller unit),Hacker News 上也有不少討論:「Raspberry Pi Pico and RP2040 Microcontroller (raspberrypi.org)」。

與 Raspberry Pi 的 Zero 系列比起來,Zero 上面有 512MB RAM,不算大但還是可以跑一個完整的 OS。而 Pico 的定位就直接是 MCU 了,基本上就是特製的系統。

再來是看 Pico 的規格,比隔壁棚的 ESP32 低一些,但可以看出來 Pico 主要的定位還是教學:高速雙核心 CPU、多腳位、大的記憶體以及 flash (對於一般量產的 MCU 來說),支援透過 Micro-USB 的 5V 供電界面方便開發與使用。

官方支援 CMicroPython 兩種開發使用的模式,其中在 Hacker News 上有人抱怨 MicroPython 哭爸慢,不過這點應該還好,要在上面跑比較複雜的人會自己跳到 C 上面開發。

最後來講價位,目前定價是每顆 USD$4,當然跟一般商用量產的 MCU 差不少 (會盡可能壓低到「剛好夠用」的等級,價錢就有可能低到 USD$0.x),但相比於現在在教學上很紅的 ESP32 (大約在 USD$10 附近) 來說,等於是殺出另外一條產品線,加上挾帶著 Raspberry Pi 的知名度來說,等於是讓更多人熟悉 MCU...

在 Hacker News 上看到 Raspberry Pi 400 使用心得

Hacker News 看到 Raspberry Pi 400 的使用心得:「I've now played with a Raspberry Pi 400 for a week and here are my conclusions」,先前在「Raspberry Pi 400」這邊有提到 Raspberry Pi 400,主要就是一台 Raspberry Pi 4 Model B 的主機,但跟鍵盤整合在一起。

在文章裡提到了 Raspberry Pi 4 可以 USB Boot 後帶來的改變 (參考之前寫的「Raspberry Pi 4 可以透過 USB 開機了」這篇),主要是透過 USB3 外接硬碟可以讓讀寫速度大幅提昇 (尤其是 SSD),這一直都是 Raspberry Pi 上面用 SD card 的問題,看起來唯一的問題還是 CPU 的速度還是沒有像目前常見的 x86-64 強。

If you give it fast enough "disk" storage it really moves. I plugged in a Kingston brand 120GB SSD on a USB3 adapter. hdparm -t gave 292MB/s read speed and the default LXDE environment was really crisply responsive, with even a first launch of Chromium taking less than two seconds. With such good storage, the only real limitation is that heavy Javascript stuff is too slow - 5+ seconds to switch between folders in Chrome, or for the thumbnail gallery to appear in Youtube. Also, video calling is marginal. Aside from that the CPU is fast enough.

另外討論裡面也有人希望 Raspberry Pi 考慮引入 eMMC 或是提供 M.2 界面改善讀寫速度,不過我覺得 SD card 的設計算是 Raspberry Pi 當初的方向,本來就有取捨,不太可能什麼都做進去...

回到作者的心得,雖然 USB3 轉 SSD 看起來 i/o 速度快不少,但我好像主要不是遇到 i/o 速度問題,反倒是最近 chromium 的硬體解碼好像有些進度,也許看影片有機會用硬體處理 (至少一部份?),希望至少可以輕鬆看 1080p60 啊...

Raspberry Pi 400

Raspberry Pi 推出的整合性硬體 Raspberry Pi 400:「Raspberry Pi 400: the $70 desktop PC」。

主體是 Raspberry Pi 4 (4GB 版本) 整合鍵盤 (一體成形,順便就有外殼了),另外週邊的配件包括了預載 OS 的 SD 卡、滑鼠、電供,以及 microHDMI 轉 HDMI 線,這樣整包的價錢是 USD$100,但如果只買主體的部份則是 USD$70。

算了一下是不貴 (4GB 版本應該是 USD$55),主要就是方便吧... 不過散熱的部份不知道有沒有另外處理,如果沒有的話可能得自己貼個散熱片。

比起以前更適合當 dashboard 之類的主機了?

Raspberry Pi 4 可以透過 USB 開機了

一樣是在 Hacker News Daily 上看到這篇:「Boot from USB · Issue #28 · raspberrypi/rpi-eeprom」,不過 GitHub 上的討論沒什麼重點,主要是 Hacker News 上的討論:「Raspberry Pi 4 can finally boot directly from USB (github.com)」。

這個功能在以前的 Raspberry Pi 上是可以用的,但大概是因為 RPi4 的 USB 模組整個換掉,所以在 RPi4 推出時是沒這個功能的,直到最近更新韌體才支援。

不過就算以前可以用 USB 2.0 開機,但因為 USB 2.0 的極限值只有 480Mbps,扣掉 USB mass storage 的 protocol overhead 後,跟 SD 卡相比沒有差太多速度,大家就沒有太在意這個項目。但現在 USB 3.0 的速度快不少,讓這邊有不少發揮的空間,之後來找機會來外接個硬碟測一些東西看看好了...

然後順便提一下,以前要弄這種東西都是同事之間一起團購,但後來發現 PChome 24h 上也有賣,而且價位也算是還算可以?(加上又是隔天到?)

用 Monitorix 代替自己搞的 MRTG

先前我家裡的有線電視網路上我放了一顆 Raspberry Pi 跑各種分析,包括用 MRTG 抓流量與溫度,還有用 SmokePing 抓網路狀況。

前幾天系統掛了,本來以為是 SD 卡掛掉,換了一張上去發現還是開不了機,後來才發現是板子掛了,記得這張板子是當年還在 K 社時 zonble 送的,記得是當年一代剛出沒多久很紅,算了一下這台也跑了七八年了...

網路上找了一下找到了便宜的 Raspberry Pi 3,弄了回來後裝一裝,剛好最近接觸 Monitorix 後發現裡面已經有很多現成的設定設好,只要開起來就可以自己抓到...

現在的版本自帶 HTTP server,但我希望透過 nginx 轉進去 (包成 HTTPS),這樣的話需要在 /etc/monitorix/monitorix.conf 裡加上:

url_prefix_proxy = https://rpi.gslin.com/

如果想要抓 Raspberry Pi 的電壓與溫度資訊,只要把檔案裡面的 raspberrypi = n 改成 raspberrypi = y 就可以了。

在 nginx 裡面把 /monitorix/monitorix-cgi 轉進去,像是這樣的設髮:

    location /monitorix {
        proxy_pass http://127.0.0.1:8080/monitorix;
    }

    location /monitorix-cgi {
        proxy_pass http://127.0.0.1:8080/monitorix-cgi;
    }

比起自己搞 MRTG 設定一堆 shell script 簡單多了,cfgmakerindexmaker 用起來還是不順手。

不過 Ubuntu 上要 20.04 才有內建包進來,18.04 看起來沒有:「Ubuntu – Package Search Results -- monitorix」,目前還沒有在 18.04 上跑的需求,之後遇到再看看要怎麼處理...