The Yocto Project provides open source, high-quality infrastructure and tools to help developers create their own custom Linux distributions and is a helpful starting point for embedded Linux developers. The Yocto Project is not a Linux distribution—it is a set of tools and components together with a build system that lets you define your own custom Linux distribution targeted for your specific embedded device, such as a MinnowBoard development board.
NOTE: The Yocto Project is not a Linux distribution—it enables you to build your own distribution. For that reason, Intel BSPs (from the meta-intel layer) ship with a time-limited kernel for evaluation purposes—after 10 days, the kernel will reboot. This kernel is not intended to be used for production systems; you will need to build your own distribution with the Yocto Project tools. For more information, please see the Quick Start Guide as well as the rest of the Yocto Project documentation set.
Host Computer or Laptop
A host system with a minimum of 50 GB of free disk space that is running a supported Linux distribution (i.e., recent releases of Fedora, openSUSE, CentOS, Debian, or Ubuntu). If the host system supports multiple cores and threads, you can configure the Yocto Project build system to decrease the time needed to build images significantly.
1 What you need and how to get it
You need these things to develop projects in the Yocto Project environment:
- A host system with a minimum of 50 GB of free disk space that is running a supported Linux distribution (i.e., recent releases of Fedora, openSUSE, CentOS, Debian, or Ubuntu). If the host system supports multiple cores and threads, you can configure the Yocto Project build system to significantly decrease the time needed to build images.
- Appropriate packages installed on the system you are using for builds
- A release of the Yocto Project
These items and how to get them installed are explained in the Yocto Project Quick Start Guide.
2 Build steps
Once you have the build environment prerequisites set up on your build system (including proxy settings if needed), you can check out the latest sources of the poky build tools and meta-intel source repositories:
$ mkdir source
$ cd source
$ git clone -b rocko http://git.yoctoproject.org/git/poky
$ cd poky
$ git clone -b rocko http://git.yoctoproject.org/git/meta-intel
NOTE: You can replace rocko with pyro or morty if you want to use the older 2.3 or 2.2 release of Yocto Project. If you do not specify a branch (i.e., you leave off the -b branch-name option) you will get the latest release.
Initialize the build environment:
$ source oe-init-build-env
Configure the build environment for the MinnowBoard Turbot. First, add the meta-intel that contains the intel-core* BSPs with a text editor or use this command to append to the bblayers.conf file:
$ echo "BBLAYERS += \"$HOME/source/poky/meta-intel\"" >> conf/bblayers.conf
Second, select the BSP by setting the MACHINE variable in the local.conf file with a text editor or with this command line. If you want a 64-bit build use:
$ echo "MACHINE = \"intel-corei7-64\"" >> conf/local.conf
Or, if you want a 32-bit image instead use:
$ echo "MACHINE = \"intel-core2-32\"" >> conf/local.conf
Now kick off a basic build:
$ bitbake core-image-minimal
Depending on your host computer’s capabilities, this build may take a while, possibly a couple of hours or more. The result will be a basic console image located within your working directory here:
You can write this image to a USB key, SATA drive, or SD card using the
$ sudo dd if=tmp/deploy/images/intel-corei7-64/core-image-base-intel-corei7-64.wic of=TARGET_DEVICE
In the previous command, the
TARGET_DEVICEis the device node in the host machine (e.g.
/dev/sdc, which is most likely a USB stick, or
/dev/mmcblk0, which is most likely an SD card).
CAUTION: Changes to MMC Block devices causes issues with booting from SD cards. A change in the Linux kernel in April 2016 causes mmcblk devices to enumerate differently. This change is similar in scope to the change made to GPIO numbering that causes unexpected disruptions to interfaces that the kernel does not guarantee to be stable. Use the mmc host device index as the mmcblk device index has the details of the commit. If you are on a 4.6 or newer kernel, you will want to use mmcblk2. Anything older than 4.6 kernel, use mmcblk0.
With the boot device provisioned, you can insert the media into the MinnowBoard development board and boot. It should detect the media and boot to the bootloader and subsequently the OS automatically, if not, you can do so manually from the EFI shell as follows:
Shell> connect -r
Shell> map -r
Or for a 32-bit image:
3 Custom images
Now that you can build a basic image, you can experiment with some of the other example images:
$ bitbake core-image-sato
$ bitbake core-image-sato-sdk
Or create your own image recipes, adding packages to suit your needs. For details on developing with the Yocto Project, please see the Yocto Project Documentation.