Tool: VMware Workstation Player
Linux Distribution : Ubuntu 16.04
1. Create the VM in VMware Workstation.

2. Select the .iso file to install the Ubuntu 16.04 in the VM.

3. In "Specify Disk Capacity", I recommend the disk size is 200GB.

4. Then click "Finish" to create the VM.

5. If you have local mirror sources, change the source in /etc/apt/source.list. This will speed up a lot when you download the Linux packages and software.

6. Type these two commands to update the Ubuntu system.
- sudo apt-get update
- sudo apt-get upgrade
7. Install Yocto Project host packages
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev
$ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc u-boot-tools
8.Install the repo
a. Create a bin folder in the home directory.
$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
b. Add the following line to the .bashrc file to ensure that the ~/bin folder is in your PATH variable.
export PATH=~/bin:$PATH
If you cannot download the repo from google, please try this one:
Git Repo | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
9. Yocto project setup
$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-sumo -m imx-4.14.98-2.0.0_ga.xml
$ repo sync
10. Building an image
The syntax for the fsl-setup-release.sh script is shown below.
$ DISTRO=<distro name> MACHINE=<machine name> source fsl-setup-release.sh -b <build dir>
$ DISTRO=fsl-imx-xwayland MACHINE=imx8qxpmek source fsl-setup-release.sh -b build-xwayland
$ bitbake fsl-image-qt5-validation-imx
or
$ bitbake core-image-full-cmdline (smaller size of rootfs)
(for more examples, please refer to the i.MX_Yocto_Project_User's_Guide.pdf)
11. U-boot and Kernel Source code in Yocto
u-boot : imx-yocto-bsp/build-xwayland/tmp/work/<board_name>/u-boot-imx
kernel : imx-yocto-bsp/build-xwayland/tmp/work/<board_name>/linux-imx
12. Deploy folder of the images
imx-yocto-bsp/build-xwayland/tmp/deploy/images/<board_name>
Some useful commands for your information:
1. Kernel Menuconfig
$ bitbake linux-imx -c menuconfig
2. Rebuild the u-boot and kernel source code
$ bitbake u-boot-imx -c compile -f
$ bitbake linux-imx -c compile -f
3. Rebuild the whole project to generate the images to deploy folder again
for example, if you build the fsl-image-qt5-validation-imx before , then type this:
$ bitbake fsl-image-qt5-validation-imx -f
Reference:
(1) Download the BSP and the Documentation : i.MX Software | NXP