Difference between revisions of "How to create an SDK for OpenSTLinux distribution"

[quality revision] [quality revision]
m
 
m (To go further: eSDK generation)
 

Template:ArticleMainWriter Template:ReviewersList Template:ArticleApprovedVersion

When an OpenSTLinux distribution has been modified, it is pertinent to build a new software development kit package that integrates the modifications, and to redistribute this SDK to developers (see SDK development cycle model).

1 Prerequisites[edit]

The Distribution Package relative to your STM32 microprocessor Series is installed: Category:Distribution Package.

On the installation:

  • some pieces of software might have been modified or integrated
  • the build environment script has been executed
  • the selected image has been rebuilt

2 SDK generation[edit]

The OpenEmbedded build system uses BitBake to generate the software development kit package (SDK) installation script.

For more information about the SDK, see the SDK for OpenSTLinux distribution article.

Standard SDK generation
Source: Yocto Project[1]

The do_populate_sdk task helps to create the standard SDK and handles two parts: a target part and a host part. The target part is built for the target hardware and includes libraries and headers. The host part is the part of the SDK that runs on the host machine.

  • Check that the build environment script has been executed, and that the current directory is the build directory of the OpenSTLinux distribution (for example, openstlinux-4.1420-rocko-mp1-18-07-0306-24/build-openstlinuxweston-stm32mp1')
  • Generate the SDK installation files (including the installation script) for a standard SDK with the following command :
 bitbake -c populate_sdk <image>
Where:
<image> Image name; example:
  • st-image-weston
Example:
bitbake -c populate_sdk st-image-weston
  • The SDK installation files (<image>-<distro>-<machine>-<host machine>-toolchain-<Yocto release>+-snapshot.*) are written to the deploy/sdk directory inside the build directory build-<distro>-<machine> as shown in the figure above
Where:
<host machine> Host machine on which the SDK is generated
  • x86_64 (64-bit host machine; this is the only supported value)
<Yocto release> Release number of the Yocto Project; example:
  • 23.4 1 (aka rockodunfell)
Example
 ls tmp-glibc/deploy/sdk/
st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-23.4+1-snapshot.host.manifest
st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-23.4+snapshot.1-snapshot.license
st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot-license_content.html
st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot.sh
st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-23.4+1-snapshot.target.manifest
st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-23.4+1-snapshot.testdata.json

The main final output is the cross-development toolchain installation script (.sh file), which includes the environment setup script.
Note that several OpenEmbedded variables exist that help configure these files. The following list shows the variables associated with a standard SDK:

    DEPLOY_DIR: points to the deploy directory.
    SDKMACHINE: specifies the architecture of the machine on which the cross-development tools are run to create packages for the target hardware.
    SDKIMAGE_FEATURES: lists the features to include in the "target" part of the SDK.
    TOOLCHAIN_HOST_TASK: lists packages that make up the host part of the SDK (that is, the part that runs on the SDKMACHINE). This variable allows packages other than the default ones to be added.
    TOOLCHAIN_TARGET_TASK: lists packages that make up the target part of the SDK (that is, the part built for the target hardware).
    SDKPATH: Defines the default SDK installation path offered by the installation script.

3 Reference list[edit]


<noinclude>

{{ArticleMainWriter | Jean-ChristopheT}}
{{ReviewersList | NathalieS, BernardP, RomualdJ, DenisH}}
{{ArticleApprovedVersion | Jean-ChristopheT | NathalieS(29May'18,Done), BernardP (24 May'18, PASS), RomualdJ (Passed, 1Jun'18), DenisH (Passed, 30May'18) | No previous approved version | PhilipS - 4Jun'18 - 7651 | 20Jun'18}}

[[Category:How to build software]]</noinclude>

When an OpenSTLinux distribution has been modified, it is pertinent to build a new software development kitpackage that integrates the modifications, and to redistribute this SDK to developers (see [[SDK for OpenSTLinux distribution#SDK development cycle model|SDK development cycle model]]).

==Prerequisites==
The Distribution Package relative to your STM32 microprocessor Series is installed: [[:Category:Distribution Package]].

On the installation:
* some pieces of software might have been modified or integrated
* the build environment script has been executed
* the selected image has been rebuilt

==SDK generation==
The OpenEmbedded build system uses BitBake to generate the software development kitpackage (SDK) installation script. 

For more information about the SDK, see the [[SDK for OpenSTLinux distribution]] article.

[[File: Standard_SDK_generation.png|thumb|upright=4|center|link=|Standard SDK generation<br>Source: Yocto Project<ref>http://www.yoctoproject.org/documentation</ref>]]

The ''do_populate_sdk'' task helps to create the standard SDK and handles two parts: a target part and a host part. The target part is built for the target hardware and includes libraries and headers. The host part is the part of the SDK that runs on the host machine.

* Check that the build environment script has been executed, and that the current directory is the build directory of the OpenSTLinux distribution (for example, ''openstlinux-4.14-rocko-mp1-18-07-0320-06-24/build-openstlinuxweston-stm32mp1')

* Generate the SDK installation files (including the installation script) for a standard SDK with the following command :
 {{PC$}} bitbake -c populate_sdk <image>

: Where:
:{|
| <image> || Image name; example:
* st-image-weston
|}
: Example:
: {{PC$}} bitbake -c populate_sdk st-image-weston

* The SDK installation files (''<image>-<distro>-<machine>-<host machine>-toolchain-<Yocto release>+-snapshot.*'') are written to the ''deploy/sdk'' directory inside the build directory ''build-<distro>-<machine>'' as shown in the figure above
: Where:
:{|
| <host machine> || Host machine on which the SDK is generated
* x86_64	(64-bit host machine; this is the only supported value)
|-
| <Yocto release> || Release number of the Yocto Project; example:
* 2.43.1		(aka rockodunfell)
|}

: Example
 {{PC$}} ls tmp-glibc/deploy/sdk/
 st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.4+3.1-snapshot.host.manifest
 st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.4+3.1-snapshot.license
 st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot-license_content.html
 st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot.sh
 st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.4+3.1-snapshot.target.manifest
 st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.4+3.1-snapshot.testdata.json

The main final output is the cross-development toolchain installation script (''.sh'' file), which includes the environment setup script. <br>

Note that several OpenEmbedded variables exist that help configure these files. The following list shows the variables associated with a standard SDK:<pre>

    DEPLOY_DIR: points to the deploy directory.
    SDKMACHINE: specifies the architecture of the machine on which the cross-development tools are run to create packages for the target hardware.
    SDKIMAGE_FEATURES: lists the features to include in the "target" part of the SDK.
    TOOLCHAIN_HOST_TASK: lists packages that make up the host part of the SDK (that is, the part that runs on the SDKMACHINE). This variable allows packages other than the default ones to be added.
    TOOLCHAIN_TARGET_TASK: lists packages that make up the target part of the SDK (that is, the part built for the target hardware).
    SDKPATH: Defines the default SDK installation path offered by the installation script.</pre>


==Reference list==<references />

<noinclude>

[[Category:How to build software]]
{{PublicationRequestId | 7651 | 2018-06-04 | PhilipS}}</noinclude>
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>
+
When an OpenSTLinux distribution has been modified, it is pertinent to build a new software development package that integrates the modifications, and to redistribute this SDK to developers (see [[SDK for OpenSTLinux distribution#SDK development cycle model|SDK development cycle model]]).
{{ArticleMainWriter | Jean-ChristopheT}}
 
{{ReviewersList | NathalieS, BernardP, RomualdJ, DenisH}}
 
{{ArticleApprovedVersion | Jean-ChristopheT | NathalieS(29May'18,Done), BernardP (24 May'18, PASS), RomualdJ (Passed, 1Jun'18), DenisH (Passed, 30May'18) | No previous approved version | PhilipS - 4Jun'18 - 7651 | 20Jun'18}}
 
 
 
[[Category:How to build software]]
 
</noinclude>
 
 
 
When an OpenSTLinux distribution has been modified, it is pertinent to build a new software development kit that integrates the modifications, and to redistribute this SDK to developers (see [[SDK for OpenSTLinux distribution#SDK development cycle model|SDK development cycle model]]).
 
   
 
==Prerequisites==
 
==Prerequisites==
Line 18: Line 10:
   
 
==SDK generation==
 
==SDK generation==
The OpenEmbedded build system uses BitBake to generate the software development kit (SDK) installation script.  
+
The OpenEmbedded build system uses BitBake to generate the software development package (SDK) installation script.  
   
 
For more information about the SDK, see the [[SDK for OpenSTLinux distribution]] article.
 
For more information about the SDK, see the [[SDK for OpenSTLinux distribution]] article.
Line 26: Line 18:
 
The ''do_populate_sdk'' task helps to create the standard SDK and handles two parts: a target part and a host part. The target part is built for the target hardware and includes libraries and headers. The host part is the part of the SDK that runs on the host machine.
 
The ''do_populate_sdk'' task helps to create the standard SDK and handles two parts: a target part and a host part. The target part is built for the target hardware and includes libraries and headers. The host part is the part of the SDK that runs on the host machine.
   
* Check that the build environment script has been executed, and that the current directory is the build directory of the OpenSTLinux distribution (for example, ''openstlinux-4.14-rocko-mp1-18-07-03/build-openstlinuxweston-stm32mp1')
+
* Check that the build environment script has been executed, and that the current directory is the build directory of the OpenSTLinux distribution (for example, ''openstlinux-20-06-24/build-openstlinuxweston-stm32mp1')
   
 
* Generate the SDK installation files (including the installation script) for a standard SDK with the following command :
 
* Generate the SDK installation files (including the installation script) for a standard SDK with the following command :
Line 38: Line 30:
 
: {{PC$}} bitbake -c populate_sdk st-image-weston
 
: {{PC$}} bitbake -c populate_sdk st-image-weston
   
* The SDK installation files (''<image>-<distro>-<machine>-<host machine>-toolchain-<Yocto release>+snapshot.*'') are written to the ''deploy/sdk'' directory inside the build directory ''build-<distro>-<machine>'' as shown in the figure above
+
* The SDK installation files (''<image>-<distro>-<machine>-<host machine>-toolchain-<Yocto release>-snapshot.*'') are written to the ''deploy/sdk'' directory inside the build directory ''build-<distro>-<machine>'' as shown in the figure above
 
: Where:
 
: Where:
 
:{|
 
:{|
Line 45: Line 37:
 
|-
 
|-
 
| <Yocto release> || Release number of the Yocto Project; example:
 
| <Yocto release> || Release number of the Yocto Project; example:
* 2.4 (aka rocko)
+
* 3.1 (aka dunfell)
 
|}
 
|}
   
 
: Example
 
: Example
 
  {{PC$}} ls tmp-glibc/deploy/sdk/
 
  {{PC$}} ls tmp-glibc/deploy/sdk/
  st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.4+snapshot.host.manifest
+
  st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot.host.manifest
  st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.4+snapshot.sh
+
  st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot.license
  st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.4+snapshot.target.manifest
+
st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot-license_content.html
  st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.4+snapshot.testdata.json
+
st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot.sh
  +
  st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot.target.manifest
  +
  st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot.testdata.json
   
 
The main final output is the cross-development toolchain installation script (''.sh'' file), which includes the environment setup script. <br>
 
The main final output is the cross-development toolchain installation script (''.sh'' file), which includes the environment setup script. <br>
Line 68: Line 62:
 
==Reference list==
 
==Reference list==
 
<references />
 
<references />
  +
  +
<noinclude>
  +
[[Category:How to build software]]
  +
{{PublicationRequestId | 7651 | 2018-06-04 | PhilipS}}
  +
</noinclude>