How to Set Up Yocto Project on Your Machine Made Easy

Preparation
Install the necessary Linux Operating system packages.
That depends upon the Linux distribution you are using. For simplicity, you should use a Linux distribution recommended in the Yocto Project’s guidelines.
My example for preparation applies to Linux Ubuntu and Debian.
$ sudo apt-get update
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib
$ sudo apt-get install build-essential chrpath socat cpio python python3
$ sudo apt-get install python3-pip python3-pexpect libsdl1.2-dev xterm
Set up Poky
Poky is Yocto Project’s own distribution system.
Step 1. Clone the poky repository
$ git clone git://git.yoctoproject.org/poky.git


It will create a directory called ‘poky’ once the retrieval of files is completed.

Step 2. Change to poky directory
$ cd poky/

Step 3. Check all available tags inside Poky repository
These shows all the version of Yocto Project, available through Poky.
$ git tag

Step 4. Checkout the desired version of Poky
You can pick any version you want, the example goes for ‘dunfell’ (the current version at the time of writing this)
$ git checkout dunfell

Note: Check what version of Poky
If you are here and for some reason you do not know which is the version of Poky you are using, you can make use of reading the content of the following file:
$ more /poky/meta-poky/conf/distro/poky.conf

