摘要
本文概要介紹於Ubuntu 24.04作業系統跨平台編譯基於Buildroot專案之樹莓派3代單板電腦的Linux作業系統核心、並將映像檔寫入SD卡的步驟。
本文
Buildroot的特徵可以參照這裡的描述。隨後將搭配Docker容器(noble)進行建構,Docker容器和宿主將透過掛載一個volume來共享空間,接著於複製的buildroot目錄,指定組態設置為raspberrypi3_qt5we_defconfig後進行建構。緊接著將於宿主透過rpi-imager工具把建構完畢的映象檔寫入SD卡,寫入完畢的SD卡便可以插入樹莓派3代單板電腦、開機。
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
sudo apt-get install -y git build-essential bison flex libncurses5-dev gcc g++ xz-utils unzip bc
sudo apt-get install file
sudo apt-get install wget
sudo apt-get install cpio
sudo apt-get install rsync
sudo apt-get install gcc-multilib
sudo apt-get install g++-multilib
cd /experiment
git clone https://git.buildroot.net/buildroot
cd buildroot
git checkout 2025.05.1
make raspberrypi3_qt5we_defconfig
make
exit
exit
docker rm -f ubuntu-inst
docker rmi ubuntu:noble
於shell喚起RasterWindow圖形介面程式的執行畫面如下所示。
完成。
參考文獻
https://engineer-leo.blogspot.com/2019/08/vmware15-ub1804-buildroot-rpi3.html
沒有留言:
不接受新意見。