Getting started with Yocto on Wandboard

Source: Internet
Author: User
Tags yocto

Getting started with Yocto on Wandboard

Here is the steps on what to get started with the Yocto Project based on the Freescale Community BSP for Wandboard. Contents[show] Requirements hardware and software

    • Linux-based host system to use for building Linux
    • Wandboard Solo, Dual, and Quad support
    • Null-modem Serial (RS-232) cable use for the serial console
    • 5V power supply to power the Wandboard
    • MicroSD card to store the bootloader, kernel, and filesystem as Wandboard have no on-board flash
    • Lots of disk space (depending on image to build about GB)
Setup Yocto Build System Steps for a first-time build

Here is the steps to building a image for Wandboard with Yocto for the first time:

    1. Install Required packages for your development system
    2. Download and install Google ' s repo utility
    3. Create The main BSP install directory and, using repo, download all of the metadata for the BSP layers.
    4. Build an image using Bitbake
    5. Locate the built image and write it to SD card
Install Required Host Packages

Install the required packages for your host development system. The Yocto Project documentation have a listing of install commands for many different hosts (Ubuntu, CentOS, etc).

Required Packages for the Host development System Download and Install Google ' s repo utility

The BSP is based on the Yocto Project, which consists of a number of applicable metadata ' layers '. These is managed by the repo utility.

$: mkdir ~/bin$: Curl Http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo$: chmod a+x ~/bin /repo
Create the BSP directory download all of the metadata for the BSP layers
$: path=${path}:~/bin$: mkdir fsl-community-bsp$: cd fsl-community-bsp
Initialize the repositories

The next step is to initialize the repositories. This establishes which branch of the repository would be a used for your development. In general, you have the 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 is based on Freescale ' s 3.10.17_1.0. 0 SDK, using the 3.10.17 kernel. Stable Branch

$: Repo init-u https://github.com/Freescale/fsl-community-bsp-platform-b Dizzy
Development Branch, including latest fixes (and bugs)
$: Repo init-u https://github.com/Freescale/fsl-community-bsp-platform-b Master
Download all of the metadata for the BSP layers
$: Repo Sync

Once this had completed, you should having all of the metadata source in fsl-community-bsp.

note:the Master Branch is a development branch and not a stable branch. It is constantly changing with code updates, the adding of new features, and so forth.

Additionally, Wandboard Quad support is not in the Poky 1.4 ' Dylan ' branch, as Wandboard Quad is not available At the time Dylan was released. If you is using Wandboard Quad, you'll need to use at least the Dora Branch (Poky 1.5) or later. Setup environment and build an image

To start a build, the first set of the machine shell environment variable to set the machine. These is:

Wandboard Machines in Yocto

Board Type
Machine=

Wandboard Solo
wandboard-solo

Wandboard Dual
wandboard-dual

Wandboard Quad
wandboard-quad

For example, if you had a Wandboard Dual, then set machine to "wandboard-dual".

$: Export machine=wandboard-dual

Run the setup-environment script. This was a helper script which sets up the environment and creates a build directory for you. The first time you run this and you'll be asked to accept the Freescale End User License Agreement (EULA).

$: . ./setup-environment Build

Run Bitbake with as its core-image-minimal argument. This would create a small image and should have the shortest possible build time. Note:all of the sources is downloaded from the Internet and built from scratch. This includes the toolchain (GCC) and any of the native utilities, so building an image for the first time could take a FE W hours, depending on the performance of the Your host machine.

$: Bitbake core-image-minimal
Locating the images and installing to a MicroSD card

Once the image is built successfully, there was several target images that was built by default. One of these is a image suitable for loading directly to 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 a 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, wand Board-dual, Wandboard-quad). "N" in the above command was the letter assigned to the SD card. This would vary depending on the your host machine configuration. Running the image on Wandboard

As this is just a console image, you'll need a serial terminal program such as minicom on order to interact with the BOA Rd and run commands. Simply plug the MicroSD card into the slots on the Wandboard module [MDS1] and either apply power, or reset using the PUSHB Utton 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. Other interesting images

The image core-image-minimal builds relatively quickly due to its small size. It is a good the image to test for see if your board works. There is other images so you can also try and 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 Qt5

Building Qt5 using Yocto on Wandboard have instructions for Building Qt5 on the Wandboard and a cross-QT5 version in your H OST machine to develop QT5 applications and deploy them directly to your wandboard using Qtcreator.

Getting started with Yocto on Wandboard

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.