本文在2021年11月5日首發(fā)于個人網(wǎng)站【鴿子的小窩】进胯。
前言
近期有了個攢一臺Voron 2.4的想法像鸡,由于官方推薦使用Klipper固件,自然少不了一臺上位機了漏策。而因眾所周知的原因派哲,樹莓派價格居高不下,囊中羞澀的我在某寶閑逛時偶然發(fā)現(xiàn)一家店鋪以150塊的超低價格售賣2GB內(nèi)存版本的Firefly ROC-RK3328-CC開發(fā)板哟玷,且這塊板子的孔位基本與樹莓派兼容狮辽,意味著只要安裝上合適版本的Linux與Python環(huán)境一也,我們就可以讓他運行Klipper的上位機啦~
刷入系統(tǒng)
首先當然是準備一張用于刷入系統(tǒng)的至少16G大小的內(nèi)存卡了~
然后去Firefly官方下載用于刷入固件的SD Firmware Tool軟件和固件文件。
近期官方更新了Ubuntu 20.04的鏡像喉脖,可以省去本文末尾的更新流程椰苟。因本文撰寫完成時,官方僅提供了Ubuntu 16.04和Ubuntu 18.04的鏡像树叽,故本文以刷入Ubuntu 18.04系統(tǒng)為例舆蝴。
2023.5.15更新:又刪掉了……
下載并解壓好固件后,打開SD Firmware Tool题诵,按下圖操作即可洁仗。
刷入完畢后會出現(xiàn)提示:
連接電腦
此時將內(nèi)存卡插入開發(fā)板,使用USB轉(zhuǎn)串口線將開發(fā)板連接到電腦性锭。(板子上已經(jīng)標注好了TXD赠潦、RXD等引腳,交叉連接到USB轉(zhuǎn)串口線上即可草冈。)
PuTTY連接
打開PuTTY軟件她奥,設(shè)置好串口和波特率后即可點擊Open
連接。
MobaXTerm連接
首先點擊軟件左上角的Session按鈕:
進入界面后哩俭,按下圖設(shè)置好串口號(可以不設(shè)置,這樣就是每次聯(lián)機時手動選擇)拳恋、波特率后點擊OK保存凡资。
初步設(shè)置
上電后稍等片刻,等待系統(tǒng)啟動完畢后谬运,即可進行初步的設(shè)置隙赁。
啟動完畢后的終端如下所示:
系統(tǒng)為我們創(chuàng)建了一個默認的賬戶
firefly
(密碼也為firefly
),可以輸入su firefly
來進入吩谦。
root@firefly:~# su firefly
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
firefly@firefly:/root$ cd
firefly@firefly:~$
連接Wi-Fi(使用有線的小伙伴可以跳過這步)
由于這個開發(fā)板并沒有Wi-Fi功能鸳谜,所以需要準備一個支持Linux的USB無線網(wǎng)卡才能連接到Wi-Fi。
連接好無線網(wǎng)卡后式廷,輸入ip addr show來查看無線網(wǎng)卡是否被正常驅(qū)動咐扭。正常情況應該會出現(xiàn)一個以wl開頭的設(shè)備,如下所示:
firefly@firefly:~$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 5e:9a:6b:**:**:** brd ff:ff:ff:ff:ff:ff
3: rename3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 5c:f3:70:**:**:** brd ff:ff:ff:ff:ff:ff
4: wlx5cf370******: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 5c:f3:70:**:**:** brd ff:ff:ff:ff:ff:ff
其中wlx5cf370******
為插入的USB無線網(wǎng)卡滑废。
這時輸入sudo nmcli d wifi connect "wifi名字" password "密碼"
即可連接Wi-Fi網(wǎng)絡(luò):
firefly@firefly:~$ sudo nmcli d wifi connect "HUAWEI-162-2" password "xiaoyao123456"
Device 'wlx5cf370******' successfully activated with '9586f28f-4d7c-49ba-8ded-b87c6277464a'.
更換docker-ce軟件源
該版本系統(tǒng)已經(jīng)配置阿里云源蝗肪,一般情況下無需換源。但由于配置了官方docker-ce源蠕趁,可能會導致更新極其緩慢薛闪。
打開/etc/apt/sources.list.d/docker.list
后,將https://download.docker.com/linux/ubuntu
更換為http://mirrors.aliyun.com/docker-ce/linux/ubuntu
即可俺陋。
升級軟件
升級軟件前需要刪除gstreamer1.0-rockchip1
軟件包豁延,它會導致升級時出現(xiàn)如下錯誤:
dpkg: error processing archive /var/cache/apt/archives/gstreamer1.0-rockchip1_1.14.2firefly3_arm64.deb (--unpack):
trying to overwrite '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstrkximage.la', which is also in package gstreamer1.0-rockchip1-extra 20191113-1firefly1
Errors were encountered while processing:
/var/cache/apt/archives/gstreamer1.0-rockchip1_1.14.2firefly3_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
卸載后昙篙,運行sudo apt upgrade
即可升級軟件。
在升級系統(tǒng)的過程中诱咏,可能會出現(xiàn)如下替換文件的提示苔可,按Y鍵確認替換即可(使用默認的不替換會導致部分功能出現(xiàn)問題)。
Configuration file '文件名'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** 文件名 (Y/I/N/O/D/Z) [default=N]
升級系統(tǒng)到最新版本
雖然Ubuntu18.04依舊被官方支持袋狞,但如果需要一些新版本的軟件(如Python)焚辅,最簡單的方式就是升級到最新的LTS版本。
使用sudo apt install ubuntu-release-upgrader-core
命令安裝升級工具苟鸯。
升級系統(tǒng)到最新版本
使用do-release-upgrade
命令升級系統(tǒng)同蜻。
因最新版本的Chromium瀏覽器僅通過Snap源提供,為了防止因無法連接到snap導致的翻車早处,可以使用sudo apt remove chromium-browser
命令先將Chromium瀏覽器卸載湾蔓。
若顯示如下提示信息,則需要重啟系統(tǒng):
firefly@firefly:~$ do-release-upgrade
Checking for a new Ubuntu release
You have not rebooted after updating a package which requires a reboot. Please reboot before upgrading.
如果在國內(nèi)陕赃,可能會出現(xiàn)無法連接到Snap軟件源的情況卵蛉。如出現(xiàn)以下提示,直接按Y繼續(xù)即可么库。
Connection to Snap Store failed
Your system does not have a connection to the Snap Store. For the
best upgrade experience make sure that your system can connect to
api.snapcraft.io.
Do you still want to continue with the upgrade?
Continue [yN]
此時還會出現(xiàn)找不到鏡像的提示,這是由于已經(jīng)更換第三方鏡像源所導致甘有,按Y繼續(xù)即可诉儒。
Updating repository information
No valid mirror found
While scanning your repository information no mirror entry for the
upgrade was found. This can happen if you run an internal mirror or
if the mirror information is out of date.
Do you want to rewrite your 'sources.list' file anyway? If you choose
'Yes' here it will update all 'bionic' to 'focal' entries.
If you select 'No' the upgrade will cancel.
Continue [yN]
RK版系統(tǒng)由于內(nèi)置了一些其它軟件源,升級前會被升級工具自動禁用亏掀,出現(xiàn)提示后按回車繼續(xù)即可:
Third party sources disabled
Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.
To continue please press [ENTER]
最后會進行升級前的確認忱反,確認無誤的話按Y繼續(xù):
Do you want to start the upgrade?
5 installed packages are no longer supported by Canonical. You can
still get support from the community.
17 packages are going to be removed. 933 new packages are going to be
installed. 1206 packages are going to be upgraded.
You have to download a total of 1057 M. This download will take about
5 minutes with your connection.
Installing the upgrade can take several hours. Once the download has
finished, the process cannot be canceled.
Continue [yN] Details [d]
等待一兩個小時即可升級完畢。期間可能有需要確認的替換操作滤愕,只需按Y確認即可温算。