摘要
本文記錄於Ubuntu作業系統跨平台建構適用於樹莓派單板電腦的webOS OSE作業系統。
本文
本文於Ubuntu 24.04作業系統上,參考這裡來安裝Docker引擎,隨後便執行一個Docker容器(focal),於該容器上安裝跨平台建構適用於樹莓派4代單板電腦的webOS OSE作業系統的相依套件,並且建構跨平台工具鏈以及webOS OSE作業系統,接著把建構成果透過rpi-imager工具程式寫入SD卡,最後再將該SD卡插入樹莓派4代單板電腦進行測試與確認。主要參考了這裡、和這裡。
建構指令如下。
docker pull ubuntu:focal
docker run --name ubuntu-inst -it --cpuset-cpus="10,11,12,13,14,15" --memory="24g" -v ~/Downloads:/experiment ubuntu:focal bash
apt-get update
apt-get install sudo
USER=user
PASSWORD="password"
_UID=1000
useradd -r -m -d /home/$USER -s /bin/bash -g root -g sudo -u $_UID $USER
echo "$USER:$PASSWORD" | chpasswd
echo "root:$PASSWORD" | chpasswd
sudo -i -u $USER
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
sudo apt-get install git
git config --global user.email "hsinshengliu@gmail.com"
git config --global user.name "Leo Liu"
cd /experiment
git clone https://github.com/webosose/build-webos.git
cd build-webos
git checkout v2.28.0
sudo scripts/prerequisites.sh
./mcf raspberrypi4-64
source oe-init-build-env
bitbake webos-image
exit
exit
docker rm -f ubuntu-inst
docker rmi ubuntu:focal
過程中可能會遭遇套件建構失敗,這時候把該套件清除再建構,通常可以通過。幾個例子如下。
bitbake -c cleanall rust-llvm
bitbake -c cleanall rust
bitbake -c cleanall edgeai-vision
bitbake -c cleanall com.webos.app.enactbrowser
bitbake webos-image
附帶一提,Docker容器在建構過程中資源耗用的暫態如下。
解壓縮webos-image-raspberrypi4-64.wic.bz2後的內容即為接下來要寫入SD卡的映象檔(也就是webos-image-raspberrypi4-64.wic)。
寫入完畢的SD卡插入樹莓派4代單板電腦後的開機執行畫面如下所示。
完成。
參考文獻
https://www.webosose.org/docs/guides/setup/building-webos-ose/
https://coldnew.github.io/9df34338/
https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890
沒有留言:
張貼留言