# ①ビルド依存パッケージのインストール
# Ubuntuホストシェル：
$ sudo apt update

$ sudo apt -y install gawk wget git diffstat unzip \
 texinfo gcc build-essential chrpath socat cpio \
 python3 python3-pip python3-pexpect xz-utils \
 debianutils iputils-ping python3-git \
 python3-jinja2 libegl1-mesa libsdl1.2-dev \
 python3-subunit mesa-common-dev zstd liblz4-tool \
 file locales

$ sudo apt install -y libstdc++-12-dev libstdc++-11-dev g++-multilib

# ②グーグルrepoツールのセットアップ
$ mkdir -p ~/.bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
$ chmod a+rx ~/.bin/repo
$ export PATH=~/.bin:$PATH

# ③Yocto Scarthgapマニフェストの取得
$ mkdir ~/Yocto_Scarthgap && cd ~/Yocto_Scarthgap
$ repo init -u https://gitlab.com/qnx/hypervisor/yocto/manifest.git -b main -m yocto-scarthgap-qnx.xml
$ repo sync -j32

# ④-1 エラーの回避
$ cd ~/Yocto_Scarthgap/poky/meta-qnx/meta-qvm
$ mv recipes-qt recipes-qt.disabled
# ④-2 ビルドを実行する
$ cd ~/Yocto_Scarthgap
$ ./poky/build/build.sh

