摘要
本文概要介紹於Ubuntu作業系統跨平台編譯基於Buildroot專案之BeagleBone Black單板電腦的Linux作業系統核心的步驟。
本文
Buildroot的特徵可以參照這裡的描述。隨後將於Ubuntu 24.04作業系統搭配Docker容器(noble)進行建構,Docker容器和宿主將透過掛載一個volume來共享空間,接著於複製的buildroot目錄,指定組態設置為beaglebone_qt5_defconfig後進行建構。緊接著將於宿主透過BeagleBoard Imaging Utility工具把建構完畢的映象檔寫入SD卡,寫入完畢的SD卡便可以插入BeagleBone Black單板電腦、開機。
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 kmod
cd /experiment
git clone https://git.buildroot.net/buildroot
cd buildroot
git checkout 2025.02.3
make beaglebone_qt5_defconfig
make
exit
exit
docker rm -f ubuntu-inst
docker rmi ubuntu:noble
接著將寫入完畢的SD卡插入BeagleBone Black單板電腦、開機。
於shell (serial console)喚起HellowWindow圖形介面程式的指令、和執行畫面如下所示。
export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs_kms_cfg.json
export QT_QPA_PLATFORM=eglfs
export QT_QPA_EGLFS_INTEGRATION=none
/usr/lib/qt/examples/opengl/hellowindow/hellowindow
於shell (serial console)喚起RasterWindow圖形介面程式的指令、和執行畫面如下所示。
export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs_kms_cfg.json
export QT_QPA_PLATFORM=eglfs
export QT_QPA_EGLFS_INTEGRATION=none
/usr/lib/qt/examples/gui/rasterwindow/rasterwindow
完成。
參考文獻
https://github.com/buildroot/buildroot/tree/2025.02.3
https://lists.buildroot.org/pipermail/buildroot/2020-December/286393.html
https://forum.digikey.com/t/how-to-enable-the-hdmi-of-beaglebone-black-for-buildroot2/58147



沒有留言:
張貼留言