This post will show you how to setup environment(Linux) for NXP i.MX 8 and build a image fot i.MX8 Mini EVK. If you trying to build a Android image, close this post.
Check your host environment:
- Fedora, openSUSE, CentOS, Debian, or Ubuntu(newer then 14.04, I test with 18.04)
- 120G disk space if graphical support is need
- Git is already setup on your machine
There are some packages you might haven’t installed but required by Yocto:
use apt install install all of them.
Also for repo:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo
You can choose your own repo install path, but make sure this path was added into PATH.
We will use i.MX official repo to init.
$ mkdir imx-yocto-bsp
Use -b <branch-name> to switch to use other branch if you want. Check on https://source.codeaurora.org/external/imx/imx-manifest to find all available branches.
For i.MX8, only fsl-imx-wayland and fsl-imx-xwayland are supported.
Then run:Set MACHINE to other variable if you are not using i.MX8 Mini EVK. Use -b in fsl-setup-release to specify build dir.
$ DISTRO=fsl-imx-xwayland MACHINE=imx8mmevk source fsl-setup-release.sh -b build-xwayland
$ bitbake fsl-image-qt5-validation-imx
Summaries of my build details:
$ source setup-environment <build-dir>
Using mfgtools provided by nxp to flash.
Flash to emmc:
sudo uuu -b emmc_all imx-boot-imx8mmevk-sd.bin-flash_evk fsl-image-validation-imx-imx8mmevk.sdcard.bz2/*
In develop stage, suggest to use TFTP and NFS for a longer flash life span. See i.MX setup TFTP and NFS for more details.