Project

General

Profile

Yocto Dora Instructions

If you are interested in building / maintaining your own linux distribution from source for the MitySOM-5CSx, there is a Yocto compatible meta layer for the module provided at support.criticallink.com.

Here are some simple instructions for getting a basic cross-toolchain, kernel, and reference filesystem based on Yocto 1.5.1 (dora) built up that will run on the MitySOM-5CSx development kit.

Hob: Building Yocto from a GUI

Description

Hob is the GUI frontend to using yocto. It allows for more easily selecting which packages to install for your filesystem.

How to Use

  1. First start by checking out the needed layers. For our dev kit this includes the main yocto repo, the openembedded layer, and Critical Link's layer.
    [users@machine:~] git clone -b dora git://git.yoctoproject.org/poky
    [users@machine:~] cd poky
    [users@machine:~/poky] git clone -b dora git://support.criticallink.com/home/git/meta-mitysom-5csx.git
    [users@machine:~/poky] git clone -b dora git://git.openembedded.org/meta-openembedded
    
  2. Next source the environment setup script
    [users@machine:~/poky] . ./oe-init-build-env
    
  3. Now launch hob
    [users@machine:~/poky/build] hob
    
  4. If running Hob for the first time you will need to add two meta layers.
    1. Next you will need to add the openembedded layer to yocto. To do this click Layers then Add Layer
      1. Navigate to the directory where poky was cloned (i.e. /home/user/projects/poky/)
      2. Navigate into the meta-openembedded directory and select the meta-oe directory and click "Open"
    2. Next you will need to add the mitysom layer to yocto. To do this click Add Layer
      1. Navigate to the directory where poky was cloned (i.e. /home/user/projects/poky/)
      2. Select the meta-mitysom-5csx directory and click "Open"
    3. Once both layers have been added press the "OK" button on the Layers dialog
  5. In the --select a machine-- dropdown select the entry for your target MitySOM-5CSx module
    1. mitysom-5cse - 5CSE-L2-3Y8 (SoM included in 80-000708 Dev Kit)
    2. mitysom-5cse-h4-3ya - 5CSE-H4-3YA
    3. mitystom-5csx - 5CSX-H6-42A (SoM included in 80-000639 & 80-000640 Dev Kit)
    4. mitysom-5csx-h6-4ya - 5CSX-H6-4YA
    5. mitysom-5csx-h6-53b - 5CSX-H6-53b
  6. Once hob finishes parsing the recipes, in the --select an image recipe-- select mitysom-5csx-dev-kit to rebuild the file system
  7. Optional: If you would like to change the output type or also create a SDK along with the build click Advanced configuration to do so
  8. Click Build image to start the build process, this will take a while

Troubleshooting Hob

Hob complains about missing libs

Hob requires GTK and PyGTK... install libs using:

sudo apt-get install python-gtk2-dev

Hob "found an error" during initial start

ERROR: Hob found an error: Please install the following missing utilities: makeinfo, gawk, chrpath

Run the following to get the required packages:

sudo apt-get update
sudo apt-get install gawk chrpath texinfo

Package Server

This version of yocto uses the "smart" package manager in conjunction with rpm. The yocto manual has some good information about using packages. You can build many additional packages by running the bitbake recipes for them. You can also serve up the packages via a http server to allow targets to install packages or updates as needed. For development purposes, you can have your build machine serve up the rpms by serving up the poky/build/tmp/deploy/rpm area. Just remember that if you build new packages you will need to update the indexes by running "bitbake package-index".

If you have built additional packages that you would like to install on a target filesystem from the target, you can run the following commands like the ones below to add "package channels":

root@mitysom-5csx:~# smart channel --add all type=rpm-md baseurl=http://10.0.0.114/rpm/all
root@mitysom-5csx:~# smart channel --add cortexa9hf_vfp_neon type=rpm-md baseurl=http://10.0.0.114/rpm/cortexa9hf_vfp_neon
root@mitysom-5csx:~# smart channel --add mitysom_5csx type=rpm-md baseurl=http://10.0.0.114/rpm/mitysom_5csx
root@mitysom-5csx:~# smart update

In the above examples, the 10.0.0.114/rpm portion of the url would be replaced with your server URL pointing to the poky/build/tmp/rpm folder.

At this point, you can perform "smart search" to find packages, and smart install to add them, e.g.:

root@mitysom-5csx:~# smart search iperf
root@mitysom-5csx:~# smart install iperf

If you are working on building up a filesystem for a target on a host build machine, you can create a new filesystem image class recipe and built into your filesystem using bitbake.

If you have a copy of your target filesystem on your host, you can install a package onto that filesystem by following the instructions from this yocto wiki page.

Advanced - Yocto 1.5.1 build steps for building from command line

  1. On a linux system (see Yocto:"http://www.yoctoproject.org" for detailed linux requirements), check out the necessary source data for the main yocto recipes and the mitysom-5csx meta layer:
    [users@machine:~] git clone -b dora git://git.yoctoproject.org/poky
    [users@machine:~] cd poky
    [users@machine:~/poky] git clone -b dora git://support.criticallink.com/home/git/meta-mitysom-5csx.git
    [users@machine:~/poky] git clone -b dora git://git.openembedded.org/meta-openembedded
    [users@machine:~/poky] . ./oe-init-build-env
    
  2. At this point, your current directory will be in the yocto/poky/build folder. You will need to set up your local configuration files prior to kicking off a build.
    1. The first thing you need to do is update your conf/bblayers.conf file to include the meta-mitysom-5csx and the meta-openembedded/meta-oe folders. These paths will need to be added to BBLAYERS environment variable string. When editing the bblayers.conf file you should add a note that the /space/poky/ directory in the example below is based on where your "git clone" was done on your Linux PC. For example:
      # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
      # changes incompatibly
      LCONF_VERSION = "6" 
      
      BBPATH = "${TOPDIR}" 
      BBFILES ?= "" 
      
      BBLAYERS ?= " \
        /space/poky/meta \
        /space/poky/meta-yocto \
        /space/poky/meta-yocto-bsp \
        /space/poky/meta-mitysom-5csx \
        /space/poky/meta-openembedded/meta-oe \
        " 
      BBLAYERS_NON_REMOVABLE ?= " \
        /space/poky/meta \
        /space/poky/meta-yocto \
        " 
      
    2. Now configure the local.conf file to call out the mitysom-5csx configuration and toolchain options. The easiest way to do this is to copy over example file in the meta-mitysom-5csx folder:
      [users@machine:.../build] cp ../meta-mitysom-5csx/conf/machine/local.conf.sample conf/local.conf
      
  3. Edit the conf/local.conf file and change the MACHINE ?= "mitysom-5csx" entry for your target MitySOM-5CSx module. Save the file once completed.
    1. mitysom-5cse - 5CSE-L2-3Y8 (SoM included in 80-000708 Dev Kit)
    2. mitysom-5cse-h4-3ya - 5CSE-H4-3YA
    3. mitystom-5csx - 5CSX-H6-42A (SoM included in 80-000639 & 80-000640 Dev Kit)
    4. mitysom-5csx-h6-4ya - 5CSX-H6-4YA
    5. mitysom-5csx-h6-53b - 5CSX-H6-53b
  4. Now you should be ready to build up a reference toolchain and a reference filesystem image (and kernel). If one of the commands below does not execute as expected please see the troubleshooting section at the bottom of the wiki:
    [users@machine:.../build] bitbake meta-toolchain
    [users@machine:.../build] bitbake mitysom-5csx-dev-kit
    

    The following status should be shown once the bitbake commences:
    user@MitySOM-Dev:~/poky/build$ bitbake meta-toolchain
    WARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
    Parsing recipes:  10% |####                                     | ETA:  00:06:16
    
  5. If this works, you should have a reference filesystem and kernel located in poky/build/tmp/deploy/images. There should be a reference toolchain installer in poky/build/tmp/deploy/sdk.
  6. You can also build the full ADT installers from Yocto as well as any of the other target images.

Troubleshooting Command Line Yocto Build

Missing Utilities during "bitbake meta-toolchain"

The following message may be shown if this is the first time you are performing a Yocto build on either your own custom Linux PC or the Critical Link Linux Virtual Machine.

user@MitySOM-Dev:~/poky/build$ bitbake meta-toolchain
WARNING: Host distribution "Ubuntu-14.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Please install the following missing utilities: makeinfo,gawk,chrpath

ERROR: Execution of event handler 'check_sanity_eventhandler' failed

Run the following to get the required packages:
sudo apt-get update
sudo apt-get install gawk chrpath texinfo

Re-try the bitbake process

Configuration (.conf) file not found during bitbake

When editing your bblayers.conf file it should be noted that there MUST be a space at between the end of the directory entries added and the backslash (\) at the end of each line. If not an error similar to the following may be shown:

user@MitySOM-Dev:~/poky/build$ bitbake meta-toolchain
ERROR: Traceback (most recent call last):
  File "/home/user/poky/bitbake/lib/bb/cookerdata.py", line 162, in wrapped
    return func(fn, *args)
  File "/home/user/poky/bitbake/lib/bb/cookerdata.py", line 172, in parse_config_file
    return bb.parse.handle(fn, data, include)
  File "/home/user/poky/bitbake/lib/bb/parse/__init__.py", line 99, in handle
    return h['handle'](fn, data, include)
  File "/home/user/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 120, in handle
    abs_fn = resolve_file(fn, data)
  File "/home/user/poky/bitbake/lib/bb/parse/__init__.py", line 122, in resolve_file
    raise IOError("file %s not found" % fn)
IOError: file /home/user/poky/meta-mitysom-5csx/home/user/poky/meta-openembedded/meta-oe/conf/layer.conf not found

ERROR: Unable to parse /home/user/poky/meta-mitysom-5csx/home/user/poky/meta-openembedded/meta-oe/conf/layer.conf: file /home/user/poky/meta-mitysom-5csx/home/user/poky/meta-openembedded/meta-oe/conf/layer.conf not found

Example of error and resolution:
Mistake in bblayers.conf:

  /home/user/poky/meta-mitysom-5csx\
  /home/user/poky/meta-openembedded/meta-oe\

Should be (space before the back slashes):

  /home/user/poky/meta-mitysom-5csx \
  /home/user/poky/meta-openembedded/meta-oe \

Go to top
Add picture from clipboard (Maximum size: 600 MB)