Check out the new MinnowBoard.org website for the most up-to-date information on the MinnowBoard Turbot and the MinnowBoard.org Community.
Yocto Project
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 MAX.
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.
If you are new to the Yocto Project, you should first familiarize yourself with the build environment and tools by working through the Yocto Project Quick Start Guide. This guide will let you know what system requirements are needed and what software packages should be installed before a build can begin.
The Yocto Project incorporates a build system and meta data for cross-compiling embedded Linux OS images for a variety of architectures and boards. Additional software packages and hardware support are added through layers. You interact with the build system primarily through the bitbake command.
The MinnowBoard MAX is supported by the Yocto Project and the meta-intel intel-corei7-64 and intel-core2-32 Board Support Packages (BSP) as of the 1.6 (daisy) release, and later versions. The MinnowBoard MAX ships with 64-bit firmware and supports a 64-bit OS; if you wish to use a 32-bit OS image, you will need to download and install 32-bit firmware as explained in the MinnowBoard MAX HW Setup page before installing an image.
Contents
What You Need and How You Get It
You need these things to develop projects in the Yocto Project environment:
- A host system with a minimum of 50 Gbytes 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.
Build Steps
Once you have the build environment prerequisites set up on your build system (including proxy settings if needed) you can checkout the latest sources of the poky build tools and meta-intel source repositories:
$ cd $ mkdir source $ cd source $ git clone -b fido http://git.yoctoproject.org/git/poky $ cd poky $ git clone -b fido http://git.yoctoproject.org/git/meta-intel
Note: You can replace fido with dizzy or daisy if you want to use the older 1.7 or 1.6 release of Yocto project. If you don't specify a branch (i.e., you leave off the -b branch-name option) you'll get the latest release.
Initialize the build environment:
$ source oe-init-build-env
Configure the build environment for the MinnowBoard-MAX. First, add the meta-intel which 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:
tmp/deploy/images/intel-corei7-64/core-image-minimal-intel-corei7-64.hddimg
You can write this image to a USB key, SATA drive, or SD card using the mkefidisk.sh script included with poky (scripts/contrib/mkefidisk.sh):
$ sudo $HOME/source/poky/scripts/contrib/mkefidisk.sh HOST_DEVICE tmp/deploy/images/intel-corei7-64/core-image-minimal-intel-corei7-64.hddimg TARGET_DEVICE
Where HOST_DEVICE is the device node on the build system, like /dev/sdc or /dev/mmcblk0 and TARGET_DEVICE is the name of the device as the MinnowBoard-MAX will see it, likely /dev/sda or /dev/mmcblk0. You may want to copy mkefidisk.sh somewhere in your PATH to save on typing.
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, similar in scope, to the change made to GPIO numbering causes unexpected disruptions to interfaces that the kernel does not guarantee to be stable.
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9aaf3437aa72ed5370bf32c99580a3fa2c330e3d has the details of the commit.
- If you are on a 4.6 or newer kernel you'll want to use mmcblk2
- Anything older than 4.6 kernel you should use mmcblk0
With the boot device provisioned, you can insert the media into the MinnowBoard-MAX 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 Shell> fs0: Shell> bootx64
Or for a 32-bit image:
Shell> bootia32
Next Steps
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.
Making a Custom MinnowBoard MAX distro with Yocto Project
We're writing up the instructions, recipe, and demonstration code for creating a Yocto project build of linux that's tailored to working with python and the mraa library and can easily access GPIO and other capabilities of the board. Stay tuned...