Template:ArticleMainWriter Template:ReviewersList Template:ArticleApprovedVersion
1. Article purpose[edit source]
This article aims at proposing a way to organize, on the host PC, the software packages of the different Packages (Starter, Developer and Distribution) for a given release of the STM32MPU Embedded Software distribution.
The main objective of the proposed organization is to keep together the software packages corresponding to a given release because there are links between them. For example:
- Flashing the image from the Starter Package on the board is mandatory before modifying the source code from the Developer Package. Both the image and the source code must belong to the same software release.
- The SDK (Developer Package) and the image (Starter Package) have both been generated from the Distribution Package. A software release thus guarantees that there is no misalignment between the different software packages.
An example of organization for tools is proposed here.
Template:Info Template:InfoTemplate:UpdateNeededForNewRelease
The directories are shown in Template:Green, while the files are in black.
2. Creating the structure[edit source]
- Create your <working directory> and assign a unique name to it (for example by including the release date):
Template:PC$ mkdir STM32MPU-Release-18-07-03 Template:PC$ cd STM32MPU-Release-18-07-03
- Create the first-level directories that will host the software packages delivered through the STM32MPU Embedded Software distribution release note:
Template:PC$ mkdir Starter-Package Template:PC$ mkdir Developer-Package Template:PC$ mkdir Distribution-Package
- The resulting directory structure looks as follows:
Template:Green Template:Highlight ├── Template:Green Template:Highlight ├── Template:Green Template:Highlight └── Template:Green Template:Highlight
Once all software packages have been installed according to the instructions given in the STM32MPU Embedded Software distribution release note, the resulting directory structure looks as follows:
Template:Green Template:Highlight ├── Template:Green Template:Highlight │ ├── Template:Green Template:Highlight │ ├── Template:Green Template:Highlight │ └── Template:Green Template:Highlight ├── Template:Green Template:Highlight │ └── Template:Green Template:Highlight └── Template:Green Template:Highlight └── Template:Green Template:Highlight
3. Focus on the Starter Package directory[edit source]
The Starter-Package directory contains the software image for the STM32MPU Embedded Software distribution.
The trusted boot chain is the default solution delivered by STMicroelectronics. It includes the superset of features (for example, all Flash memory devices are supported). The basic boot chain is also upstreamed by STMicroelectronics, with a limited number of features (for example microSD card memory boot only). Refer to the Boot chains overview article for details.
Flash memory partitions (e.g. rootfs, bootfs...) are explained in the STM32MP15 Flash mapping article.
Template:Green └── Template:Green └── Template:Green └── Template:Green ├── Template:Green Template:Highlight │ ├── FlashLayout_emmc_stm32mp157c-ev1-trusted.tsv Template:Highlight │ ├── FlashLayout_nand-4-256_stm32mp157c-ev1-trusted.tsv Template:Highlight │ ├── FlashLayout_nor-emmc_stm32mp157c-ev1-trusted.tsv Template:Highlight │ ├── FlashLayout_nor-nand-4-256_stm32mp157c-ev1-trusted.tsv Template:Highlight │ ├── FlashLayout_nor-sdcard_stm32mp157c-ev1-trusted.tsv Template:Highlight │ ├── FlashLayout_sdcard_stm32mp157c-dk2-basic.tsv Template:Highlight │ ├── FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv Template:Highlight │ ├── FlashLayout_sdcard_stm32mp157c-ev1-basic.tsv Template:Highlight │ └── FlashLayout_sdcard_stm32mp157c-ev1-trusted.tsv Template:Highlight ├── Template:Green │ └── create_sdcard_from_flashlayout.sh ├── splash.bin Template:Highlight ├── st-image-bootfs-openstlinux-weston-stm32mp1.ext4 Template:Highlight ├── st-image-bootfs-openstlinux-weston-stm32mp1.manifest ├── st-image-userfs-openstlinux-weston-stm32mp1.ext4 Template:Highlight ├── st-image-userfs-openstlinux-weston-stm32mp1.manifest ├── st-image-weston-openstlinux-weston-stm32mp1.ext4 Template:Highlight ├── st-image-weston-openstlinux-weston-stm32mp1.license ├── st-image-weston-openstlinux-weston-stm32mp1-license_content.html ├── st-image-weston-openstlinux-weston-stm32mp1.manifest ├── st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi ├── tf-a-stm32mp157c-dk2-trusted.stm32 Template:Highlight ├── tf-a-stm32mp157c-ev1-trusted.stm32 Template:Highlight ├── u-boot-spl.stm32-stm32mp157c-dk2-basic Template:Highlight ├── u-boot-spl.stm32-stm32mp157c-ev1-basic Template:Highlight ├── u-boot-stm32mp157c-dk2-basic.img Template:Highlight ├── u-boot-stm32mp157c-dk2-trusted.stm32 Template:Highlight ├── u-boot-stm32mp157c-ev1-basic.img Template:Highlight └── u-boot-stm32mp157c-ev1-trusted.stm32 Template:Highlight
4. Focus on the Developer Package directory[edit source]
The Developer-Package directory contains:
- The source code for the following OpenSTLinux software packages (development for Arm® Cortex®-A processor):
- TF-A
- Linux kernel
- U-Boot
- The debug symbol files for Linux kernel, U-Boot and TF-A
- The SDK (for cross-development on an host PC)
- The STM32Cube MPU Package (developed for Arm® Cortex®-M processor)
Template:Green ├── Template:Green Template:Highlight │ ├── Template:Green │ │ └── Template:Green Template:Highlight │ │ ├── tf-a-bl2-trusted.elf Template:Highlight │ │ ├── tf-a-bl32-trusted.elf Template:Highlight │ │ ├── u-boot-stm32mp157c-dk2-trusted.elf Template:Highlight │ │ ├── u-boot-stm32mp157c-ev1-trusted.elf Template:Highlight │ │ └── vmlinux Template:Highlight
│ └── Template:Green │ └── Template:Green │ ├── Template:Green Template:Highlight │ │ ├── [*].patch Template:Highlight │ │ ├── fragment-[*].config Template:Highlight │ │ ├── Template:Green Template:Highlight │ │ ├── linux-4.14.48.tar.xz │ │ ├── README.HOW_TO.txt Template:Highlight │ │ └── series
│ ├── Template:Green Template:Highlight │ │ ├── [*].patch Template:Highlight │ │ ├── Template:Green Template:Highlight │ │ ├── Makefile.sdk Template:Highlight │ │ ├── README.HOW_TO.txt Template:Highlight │ │ ├── series │ │ └── tf-a-stm32mp-1.5-release.AUTOINC+ed8112606c.tar.gz
│ └── Template:Green Template:Highlight │ ├── [*].patch Template:Highlight │ ├── Template:Green Template:Highlight │ ├── Makefile.sdk Template:Highlight │ ├── README.HOW_TO.txt Template:Highlight │ ├── series │ └── u-boot-trusted-stm32mp-2018.03-release.AUTOINC+f95ab1fb6e.tar.gz
├── Template:Green Template:Highlight │ ├── environment-setup-cortexa7hf-neon-vfpv4-openstlinux_weston-linux-gnueabi Template:Highlight │ ├── site-config-cortexa7hf-neon-vfpv4-openstlinux_weston-linux-gnueabi │ ├── Template:Green │ │ ├── Template:Green Template:Highlight │ │ │ └── [...] │ │ └── Template:Green Template:Highlight │ │ └── [...] │ └── version-cortexa7hf-neon-vfpv4-openstlinux_weston-linux-gnueabi
└── Template:Green Template:Highlight ├── COPYING ├── COPYING.BSD-3 ├── Template:Green │ ├── Template:Green Template:Highlight │ │ └── [...] │ ├── Template:Green │ │ └── [...] │ └── Template:Green Template:Highlight │ └── [...] ├── Template:Green │ └── [...] ├── LLA_evaluation_for_STM32MPU_17-12-06_plain.txt ├── Template:Green │ └── [...] ├── package.xml ├── Template:Green │ ├── STM32CubeProjectsList.html Template:Highlight │ ├── Template:Green Template:Highlight │ │ └── [...] │ └── Template:Green Template:Highlight │ └── [...] ├── Release_Notes.html Template:Highlight └── Template:Green └── [...]
Appendix A shows the structure of the Linux kernel, U-Boot and TF-A installation directories after these software packages have been built.
5. Focus on the Distribution Package directory[edit source]
The Distribution-Package directory contains all the OpenEmbedded layers required to get the source code of any STM32MPU Embedded Software component, as well as a build framework based on OpenEmbedded.
Template:Green └── Template:Green Template:Highlight ├── Template:Green Template:Highlight │ └── [...] ├── Template:Green Template:Highlight │ └── [...]
├── Template:Green │ ├── Template:Green Template:Highlight │ │ ├── Template:Green │ │ │ └── Template:Green │ │ │ ├── st-example-image-qt.bb Template:Highlight │ │ │ ├── st-example-image-x11.bb Template:Highlight │ │ │ └── st-example-image-xfce.bb Template:Highlight │ │ ├── Template:Green │ │ │ ├── Template:Green │ │ │ │ ├── st-image-core.bb Template:Highlight │ │ │ │ ├── st-image.inc │ │ │ │ └── st-image-weston.bb Template:Highlight │ │ │ └── Template:Green │ │ │ └── [...] │ │ └── [...]
│ ├── Template:Green Template:Highlight │ │ ├── Template:Green │ │ │ ├── Template:Green Template:Highlight │ │ │ │ └── [...] │ │ │ ├── Template:Green Template:Highlight │ │ │ │ └── [...] │ │ │ ├── Template:Green Template:Highlight │ │ │ │ └── [...] │ │ │ └── Template:Green Template:Highlight │ │ │ └── [...] │ │ ├── Template:Green │ │ │ ├── Template:Green Template:Highlight │ │ │ │ └── [...] │ │ │ ├── Template:Green Template:Highlight │ │ │ │ └── [...] │ │ │ └── Template:Green Template:Highlight │ │ │ └── [...] │ │ ├── Template:Green │ │ │ ├── Template:Green Template:Highlight │ │ │ │ └── [...] │ │ │ └── [...] │ │ ├── Template:Green │ │ │ └── Template:Green Template:Highlight │ │ │ └── [...] │ │ │ └── Template:Green Template:Highlight │ │ │ └── [...] │ │ ├── Template:Green │ │ │ └── Template:Green │ │ │ ├── st-image-bootfs.bb Template:Highlight │ │ │ └── st-image-userfs.bb Template:Highlight │ │ └── [...]
│ ├── Template:Green Template:Highlight │ └── [...] │ └── Template:Green │ ├── envsetup.sh Template:Highlight │ └── [...] └── Template:Green Template:Highlight └── [...]
Appendix B shows the structure of the build directory.
6. Appendix A: directory structure after build (Developer Package)[edit source]
Provided you have followed the recommendations of the README.HOW_TO.txt helper files to build the Linux kernel, the U-Boot and the TF-A, then the following Template:Green contain the build outputs.
Developer-Package ├── openstlinux-4.14-rocko-mp1-18-07-03 Template:Highlight │ └── sources │ └── arm-openstlinux_weston-linux-gnueabi │ ├── linux-stm32mp-4.14-48 Template:Highlight │ │ ├── Template:Green Template:Highlight │ │ │ ├── Template:Green │ │ │ │ ├── Template:Green │ │ │ │ │ └── Template:Green │ │ │ │ │ └── Template:Green │ │ │ │ │ └── Template:Green Template:Highlight │ │ │ │ └── Template:Green │ │ │ │ ├── Template:Green Template:Highlight │ │ │ │ ├── Template:Green Template:Highlight │ │ │ │ ├── Template:Green Template:Highlight │ │ │ │ └── Template:Green │ │ │ ├── Template:Green Template:Highlight │ │ │ └── Template:Green │ │ └── [...]
│ ├── tf-a-stm32mp-1.5-release.AUTOINC+ed8112606c Template:Highlight │ │ ├── Template:Green Template:Highlight │ │ │ ├── Template:Green Template:Highlight │ │ │ ├── Template:Green Template:Highlight │ │ │ ├── Template:Green Template:Highlight │ │ │ ├── Template:Green Template:Highlight │ │ │ └── Template:Green │ │ └── [...]
│ └── u-boot-trusted-stm32mp-2018.03-release.AUTOINC+f95ab1fb6e Template:Highlight │ ├── Template:Green Template:Highlight │ │ ├── Template:Green Template:Highlight │ │ ├── Template:Green Template:Highlight │ │ ├── Template:Green Template:Highlight │ │ ├── Template:Green Template:Highlight │ │ └── Template:Green │ └── [...]
7. Appendix B: directory structure after build (Distribution Package)[edit source]
Provided you have followed the build method explained in OpenSTLinux distribution, then the following Template:Green contain the build outputs.
As long as you did not modify the source code:
- the Template:Purple are the same as the ones available in the Starter Package: flash layout, binaries for bootfs, userfs and rootfs partitions
- the Template:Grey are the same as the ones available in the Starter and Developer Packages: binaries for FSBL and SSBL partitions
- the Template:Orange are the same as the ones available in the Developer Package: Linux kernel image and device tree blobs
- the Template:Rose are only available in the Distribution Package: they concern the OP-TEE (see How to populate and boot a board with OP-TEE)
Distribution-Package/openstlinux-4.14-rocko-mp1-18-07-03/build-openstlinuxweston-stm32mp1/Template:Green └── Template:Green | └── Template:Green | ├── Template:Purple Template:Highlight | │ ├── Template:Rose Template:Highlight | │ ├── Template:Purple Template:Highlight | │ ├── Template:Rose Template:Highlight | │ ├── Template:Purple Template:Highlight | │ ├── Template:Rose Template:Highlight | │ ├── Template:Purple Template:Highlight | │ ├── Template:Rose Template:Highlight | │ ├── Template:Purple Template:Highlight | │ ├── Template:Rose Template:Highlight | │ ├── Template:Purple Template:Highlight | │ ├── Template:Purple Template:Highlight | │ ├── Template:Rose Template:Highlight | │ ├── Template:Purple Template:Highlight | │ ├── Template:Purple Template:Highlight
| │ ├── Template:Rose Template:Highlight | │ └── Template:Purple Template:Highlight | │ └── [...] | ├── Template:Purple | │ └── Template:Purple | ├── Template:Purple Template:Highlight | ├── Template:Purple Template:Highlight | ├── Template:Purple Template:Highlight | ├── Template:Purple Template:Highlight | ├── Template:Orange Template:Highlight | ├── Template:Orange Template:Highlight | ├── Template:Rose Template:Highlight | ├── Template:Orange Template:Highlight | ├── Template:Orange Template:Highlight | ├── Template:Rose Template:Highlight | ├── Template:Grey Template:Highlight | ├── Template:Rose Template:Highlight | ├── Template:Grey Template:Highlight
| ├── Template:Purple Template:Highlight | ├── Template:Purple Template:Highlight | ├── Template:Purple Template:Highlight | ├── Template:Rose Template:Highlight | ├── Template:Grey Template:Highlight | ├── Template:Purple Template:Highlight | ├── Template:Rose Template:Highlight | ├── Template:Grey Template:Highlight | ├── Template:Orange Template:Highlight | ├── Template:Orange Template:Highlight | └── [...] └── [...]