How to compile the device tree with the Distribution Package

Revision as of 14:27, 28 March 2019 by Registered User



1. Introduction[edit source]

This article is reserved to Yocto experts or at least people who have already practiced with the Yocto environmment.

This section describes all steps to create and configure a layer for demo with DeviceTree files coming from STM32CubeMX tool and to add and configure a machine for the demo that is similar to those that the OpenSTLinux Distribution Package already supports.
Mainly the machine delivered inside the existing STM32MP BSP layer 'addons'.
For reminder this addons layer is deployed here in our delivery : <path of OpenSTLinux distribution delivery>/layers/meta-st/meta-st-stm32mp-addons/

2. Create a new open embedded layer for your demo[edit source]

First you need to create a new layer, take a look at the latest How to create a new open embedded layer

After the creation you will have here <path of OpenSTLinux distribution delivery>/layers/meta-st/:

$ tree meta-my-custo-layer
meta-my-custo-layer
├── conf
│   └── layer.conf
├── COPYING.MIT
├── README
└── recipes-example
    └── example
        └── example.bb

3 directories, 4 files

2.1. Update layer.conf file[edit source]

Open layer.conf file and add the lines below for the licenses, the demo layer path and the dependency with the STM32MP BSP layer 'addons' :

EULA_FILE_ST_stm32mpcommondemomotor = "${LAYERDIR}/conf/eula/${MACHINE}"
EULA_FILE_ST_MD5SUM_stm32mpcommondemomotor = "8b505090fb679839cefbcc784afe8ce9"

#Inform bitbake for adding another location to search for licenses
LICENSE_PATH += "${LAYERDIR}/files/licenses"

# Set a variable to get the STM32MP MX BSP location
STM32MP_DEMO_MOTOR_BASE = "${LAYERDIR}"

# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_meta-my-custo-layer = "1"

LAYERDEPENDS_meta-my-custo-layer = "stm-st-stm32mp-mx"

2.2. Create the machine for your demo[edit source]

2.3. Associate EULA with the new demo machine[edit source]

2.4. Move DeviceTree files and project coming from STM32CubeMX tool[edit source]

2.5. Update README file[edit source]

2.6. Clean up useless content[edit source]

3. Add specific recipes and content necessary for your demo[edit source]