Skip to content

Update yocto_build.md #2081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@ Poky is a reference distribution of the Yocto Project. It is a great starting po

The first step is to install the packages required to build and run Yocto:

**older systems**
```bash
sudo apt update
sudo apt-get install -y gawk wget git-core diffstat unzip texinfo build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev lz4
```
**Ubuntu LTS Current**
**older systems**
```bash
sudo apt update
sudo apt-get install -y gawk wget git-core diffstat unzip texinfo build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libgl1 libglx-mesa0 libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev lz4
```
Now download the Poky reference distribution and checkout the branch/tag you wish to build. You will build `yocto-4.0.6` in this example.

```bash
git clone git://git.yoctoproject.org/poky
cd poky
git checkout tags/yocto-4.0.6 -b yocto-4.0.6-local
git checkout tags/yocto-5.0.10 -b yocto-5.0.10-local
```
Next source the script as shown below to initialize your build environment for your 64-bit Arm example machine QEMU target:

Expand Down Expand Up @@ -80,6 +87,12 @@ You will now be in the `build-qemu-arm64` directory which is your build director
```bash { cwd="poky" }
sed -i '/qemuarm64/s/^#//g' conf/local.conf
```

**NOTE** On Ubuntu systems with apparmor you will need to allow unprivilaged users for bitbake
```bash
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
```

With the right machine now selected, proceed to building the minimal core image for your target.

```bash { cwd="poky",env_source="poky/oe-init-build-env build-qemu-arm64" }
Expand Down