Here are the steps on how to get started with the Yocto Project based on the Freescale Community BSP for Wandboard. html
Here are the steps to building an image for Wandboard with Yocto for the first time: android
Install the required packages for your host development system. The Yocto Project documentation has a listing of install commands for many different hosts (Ubuntu, CentOS, etc.). git
Required Packages for the Host Development System github
The BSP is based on the Yocto Project, which consists of a number of applicable metadata 'layers'. These are managed by the repo utility.shell
$: mkdir ~/bin $: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $: chmod a+x ~/bin/repo
$: PATH=${PATH}:~/bin $: mkdir fsl-community-bsp $: cd fsl-community-bsp
The next step is to initialize the repositories. This establishes which branch of the repository will be used for your development. In general, you have two options. The master branch is the current development branch, and the current stable branch is "dizzy". Both include support for all three variants of Wandboard (Solo, Dual, and Quad), and are based on Freescale's 3.10.17_1.0.0 SDK, using the 3.10.17 kernel. api
$: repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b dizzy
$: repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b master
$: repo sync
Once this has completed, you should have all of the metadata source in fsl-community-bsp. app
Note: The master branch is a development branch, not a stable branch. It is constantly changing with code updates, the adding of new features, and so forth. curl
Additionally, Wandboard Quad support was not in the Poky 1.4 'dylan' branch, as Wandboard Quad was not available at the time Dylan was released. If you are using Wandboard Quad, you will need to use at least the dora branch (Poky 1.5) or later. ide
To start a build, first set the MACHINE shell environment variable to set the machine. These are: ui
Wandboard Machines in Yocto
Board Type
MACHINE=
Wandboard Solowandboard-solo
Wandboard Dualwandboard-dual
Wandboard Quadwandboard-quad
For example, if you have a Wandboard Dual, then set MACHINE to "wandboard-dual".
$: export MACHINE=wandboard-dual
Run the setup-environment
script. This is a helper script which sets up the environment and creates a build directory for you. The first time you run this, you will be asked to accept the Freescale end user license agreement (EULA).
$: . ./setup-environment build
Run bitbake with core-image-minimal
as its argument. This will create a small image and should have the shortest possible build time. Note: all of the sources are downloaded from the internet and built from scratch. This includes the toolchain (gcc) and all of the native utilities, so building an image for the first time could take a few hours, depending on the performance of your host machine.
$: bitbake core-image-minimal
Once the image is built successfully, there are several target images that are built by default. One of these is an image suitable for loading directly into an SD card. It contains all of the required binaries (bootloader, kernel, filesystem) in a preformatted binary image.
You can find the image at:
build/tmp/deploy/images/<MACHINE>/core-image-minimal-<MACHINE>.sdcard
The .sdcard
image can be directly copied to an SD card with the dd
command:
$ sudo dd if=tmp/deploy/images/<MACHINE>/core-image-minimal-<MACHINE>.sdcard of=/dev/sd<N> bs=1M
NOTE: <MACHINE> in the above corresponds to the MACHINE name provided to bitbake (e.g. wandboard-solo, wandboard-dual, wandboard-quad). "N" in the above command is the letter assigned to the SD card. This will vary depending on your host machine configuration.
As this is just a console image, you will need a serial terminal program such as minicom in order to interact with the board and run commands. Simply plug the microSD card into the slot on the Wandboard module [MDS1] and either apply power, or reset using the pushbutton switch [RESET1] on the baseboard. You should immediately see log messages in the serial terminal. When complete, you should get a login prompt:
Poky Next (Yocto Project Reference Distro) 1.4+snapshot-20130809 wandboard-dual
wandboard-dual login:
The default login username is 'root' and there is no password.
The image core-image-minimal
builds relatively quickly due to its small size. It is a good image to test to see if your board works. There are other images that you can also try, but can take a good deal longer to build.
Image
Description
core-image-base
Basic image with kernel modules and other features
core-image-x11
Basic image with X11 support
fsl-image-test
Image containing test utilities and graphics libraries
Building Qt5 using yocto on Wandboard has instructions for building Qt5 on the Wandboard and a cross Qt5 version in your host machine to develop Qt5 applications and deploy them directly to your Wandboard using QtCreator.