Build confirmation procedure


Index


1. Introduction

1-1. About this document

This document contains information at the time of confirmation for the purpose of being used as a reference when customers use this layer and recipes.

1-2. Note


2. Build procedure

2-1. Get dependency layers

At the time of construction confirmation, we use meta-intel(intel BSP layer) which is a dependent layer and poky including meta and bitbake.
The following is information about the dependent layers used.

2-2. Directory structure

Arrange this layer and other layers to be used as described below.
Place meta-intel (intel BSP layer) and meta-coras (this layer) appropriately for poky.

(layer structure) ./(project_root) ├── poky ......... Yocto Project reference │ ├── bitbake ... bitbake │ ├── meta ...... openembedded-core │ └── etc. ├── meta-intel ... intel BSP layer └── meta-coras ... this layer

2-3. Setup

  1. Run as below to set up the build directory.

    $ source ./oe-init-build-env You had no conf/local.conf file. This configuration file has therefore been created for you from /.../poky/meta-poky/conf/local.conf.sample You may wish to edit it to, for example, select a different MACHINE (target hardware). See conf/local.conf for more information as common configuration options are commented. You had no conf/bblayers.conf file. This configuration file has therefore been created for you from /.../poky/meta-poky/conf/bblayers.conf.sample To add additional metadata layers into your configuration please add entries to conf/bblayers.conf. The Yocto Project has extensive documentation about OE including a reference manual which can be found at: http://yoctoproject.org/documentation For more information about OpenEmbedded see their website: http://www.openembedded.org/ ### Shell environment set up for builds. ### You can now run 'bitbake <target>' Common targets are: core-image-minimal core-image-full-cmdline core-image-sato core-image-weston meta-toolchain meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86' Other commonly useful commands are: - 'devtool' and 'recipetool' handle common recipe tasks - 'bitbake-layers' handles common layer tasks - 'oe-pkgdata-util' handles common target package tasks
  2. Add a layer.

    The following is the case of adding layers with the bitbake-layers command.

    $ bitbake-layers add-layer ../meta-intel NOTE: Starting bitbake server... $ bitbake-layers add-layer ../../meta-coras NOTE: Starting bitbake server...
  3. Edit the local.conf file.

    Add the MACHINE setting and the recipe of the RAS sample program for checking the operation.
    The following MACHINE options can be used according to the model when incorporating the CORAS(LNX) execution environment. (MACHINE = "xxx")

    1 The MACHINE option for models with wireless modules installs the kernel module and firmware for the installed wireless modules. When using wifi, bluetooth, it is necessary to add the utility to be used, bluez5, etc. as appropriate.
    Reference : 2-6. For models with wireless module

    2 The BX-T1000 includes a kernel module for using the RAS utility. When using the sample program, it is necessary to add the "kernel-module-i2c-dev" and "kernel-module" packages as appropriate.
    You may also need to adjust the patch according to the kernel you are using. See section 2-7. About the patch of the kernel of BX-T1000 for patching the kernel. See the Yocto Project and Linux kernel documentation for general kernel custom issues.

    3 Each machine option utilizes the "intel-core i7-64" MACHINE option defined in the meta-intel layer.

    4 When the MACHINE option of the target model of TPBK (LNX) is selected, the related packages are incorporated from the recipe of recipes-tpbk (excluding API execution samples, etc.).

  4. Add the following to local.conf to create an image that includes the RAS sample.
    Please incorporate other sample tools as necessary.

    (In the following example, the MACHINE name "cpsbxc200" for the CPS-BXC200 series is specified.)

    $ vi ./conf/local.conf ... MACHINE = "cpsbxc200" IMAGE_INSTALL:append = " coras-samples" ...

    In the case of systemd use, and add it to the local.conf as follows.

    $ vi ./conf/local.conf ... INIT_MANAGER = " systemd" ...

    Reference materials

2-4. Build

Build with "core-image-minimal" as an image for confirmation.

$ bitbake core-image-minimal

Confirm that the build completes normally.

To build the SDK, execute as follows. The SDK including the CORAS(LNX) development environment is output.

$ bitbake core-image-minimal -c populate_sdk

You can build a cross-build environment by installing the built SDK.

# sdk install $ ./tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-corei7-64-cpsbxc200-toolchain-3.1.1.sh # sdk environment setup $ . /opt/poky/2.5.1_zybo-z7/environment-setup-xxxx # compile $ ${CC} source_code.c -o output.bin -lmtdll

2-5. Execution confirmation

Boot on the target machine using the constructed image.
(Expand the image built in the external storage or internal storage as appropriate.)
After booting, check the execution of the sample program on the console.
(At boot time, select the appropriate device from the BIOS menu to boot.)
(In the recipe of coras-samples, a sample program is generated and embedded according to the model from the MACHINE option name. In addition, the execution binary of the sample program is stored under /opt/contec/coras/samples/bin. )

Below is an example of execution and output of a sample program for CPS-BXC200.

# cd /opt/contec/coras/samples/bin # ./hwmon # Temperature, Voltage cpu temp [33] , system temp [33] Vcore [0.984 (V)] lV33 [3.312(V)] lV5 [5.184(V)] lV5SB [5.126 (V)] lVBat [2.992(V)] lV3VSB [3.296 (V)] CPU_VNN [0.896 (V)] # ./sled 1 # led on MT_SetLEDStatus OK status led 1 [on] status led 2 [on] status led 3 [on] # ./sled 0 # led off MT_SetLEDStatus OK status led 1 [off] status led 2 [off] status led 3 [off] # ./wdt 1 15 # watch-dog-timer) time-up_action:Reset, timer:15[sec.] MT_SetWDTMode : WDT_RESET MT_StartWDT ok WDT Tick Count [10 -> 0] WDT Tick Count Over. About 15 seconds remain!! MT_Close ok

Construction confirmation, RAS sample execution confirmation is over

2-6. For models with wireless module

If bxu200r is specified for the MACHINE option, HW support for the built-in wireless module (wifi/bluetooth) will be added. If you execute "rfkill list all" on the constructed image, you can see that Wireless LAN and Bluetooth are output as shown below.

When actually using wifi and bluetooth, please check after adding packages such as connman, wpa-supplicant, bluez5 and other utilities required for use.

# rfkill list all 0: hci0: Bluetooth Soft blocked: yes Hard blocked: no 1: phy0: Wireless LAN Soft blocked: yes Hard blocked: no

2-7. About the patch to the kernel of BX-T1000

Patch the kernel source code in meta-intel by specifying bxt1000 for the MACHINE option. If the kernel version to be used is different, such as when the committed version of meta-intel in "2-1. Get dependency layers" is used, it is necessary to update the patch file as appropriate.

See the links below for how to patch the kernel.

2-8. TPBK(LNX) recipes

When the MACHINE option of the target model of TPBK (LNX) is selected, the related packages are incorporated from the recipe of recipes-tpbk (excluding API execution samples, etc.).


3. Supplementary material

3-1. local.conf

local.conf

3-2. bblayers.conf

bblayers.conf