摘要
本文概要介紹於Ubuntu作業系統跨平台編譯基於Tomato64專案之樹莓派單板電腦的Linux作業系統核心、以及映像檔寫入SD卡後的測試步驟。
本文
Tomato是一系列由社群開發的客製化韌體,適用於採用Broadcom晶片組的消費性電腦網路路由器和閘道器,支援ARM和MIPS;Tomato64專案為Tomato專案的現代移植版本,支援ARM64和x86_64,並且使用buildroot作為建構工具。隨後將依循這裡的說明,搭配Ubuntu 24.04作業系統,來跨平台編譯Tomato64的當前版本;搭配docker的建構步驟分述如下。
docker pull ubuntu:noble
docker run --name ubuntu-inst -it --cpuset-cpus="10,11,12,13,14,15" --memory="24g" -v ~/Downloads:/experiment ubuntu:noble bash
apt-get update
apt-get install sudo
USER=`id -nu 1000`
PASSWORD="password"
usermod -a -G sudo $USER
echo "$USER:$PASSWORD" | chpasswd
echo "root:$PASSWORD" | chpasswd
sudo -i -u $USER
cd /experiment
sudo apt install bc build-essential cpio file git libncurses-dev rsync unzip wget
git clone https://github.com/tomato64/tomato64.git
cd tomato64
make rpi4
exit
exit
docker rm -f ubuntu-inst
docker rmi ubuntu:noble
透過rpi-imager工具程式將編譯完成的映象檔寫入SD卡、將SD卡插入樹莓派4代單板電腦、開機,便可以透過serial console鍵入一系統的指令來檢查運行結果,其中,預設的賬號為root而密碼為admin,此外,也可以透過瀏覽器來察看Tomato64的相關狀態。相關執行結果截圖如下。
附帶一提,當前版本需要手動將eth0介面添加至br0橋接器,才能讓透過DHCP動態取得位址或設置靜態位址的客戶透過瀏覽器存取Tomato64的web伺服器(http://192.168.1.1)。
完成。
參考文獻
https://github.com/tomato64/tomato64/tree/master/
https://en.wikipedia.org/wiki/Tomato_(firmware)



沒有留言:
不接受新意見。