Last edited 3 years ago

Example of directory structure for Packages: Difference between revisions


Latest revision as of 15:14, 16 November 2021

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.

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 name):
Template:PC$ mkdir STM32MP15-Ecosystem-v3.1.0
Template:PC$ cd STM32MP15-Ecosystem-v3.1.0
  • 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 chain 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_stm32mp157f-ev1-optee.tsv              Template:Highlight
            │   ├── FlashLayout_emmc_stm32mp157f-ev1-trusted.tsv            Template:Highlight
            │   ├── FlashLayout_sdcard_stm32mp157f-dk2-basic.tsv            Template:Highlight
            │   ├── FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv            Template:Highlight
            │   ├── FlashLayout_sdcard_stm32mp157f-dk2-trusted.tsv          Template:Highlight
            │   ├── FlashLayout_sdcard_stm32mp157f-dk2-extensible.tsv       Template:Highlight
            │   └── [...]
            ├── Template:Green
            │   ├── fip-<board>-<boot-type>.bin             Template:Highlight            
            ├── Template:Green
            │   ├── tf-a-<board>-<boot-type>.stm32          Template:Highlight
            ├── Template:Green
            │   ├── u-boot-nodtb-soc.bin                    Template:Highlight
            │   ├── u-boot-<board>-<boot-type>.dtb          Template:Highlight
            ├── Template:Green
            │   ├── tee-header_v2-<board>.bin
            ​│   ├── tee-pageable_v2--<board>.bin
           ​ │   ├── tee-pager_v2--<board>.bin
            ├── Template:Green
            │   ├── vmlinux                                 Template:Highlight
            ├── Template:Green
            │   └── create_sdcard_from_flashlayout.sh
            ├── 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-vendorfs-openstlinux-weston-stm32mp1.ext4          Template:Highlight
            ├── 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
            └── [...]

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):
    • Linux® kernel
    • U-Boot
    • TF-A
    • OP-TEE OS
  • The debug symbol files for Linux kernel, U-Boot, TF-A and OP-TEE OS
  • 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
│   ├── environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi  Template:Highlight
│   ├── site-config-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
│   ├── Template:Green
│   │   ├── Template:Green                Template:Highlight
│   │   │   └── [...]
│   │   └── Template:Green                                     Template:Highlight
│   │       └── [...]
│   └── version-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
├── Template:Green             Template:Highlight
│   ├── Template:Green
│   │   ├── Template:Green                         Template:Highlight
│   │   │   └── [...]
│   │   ├── Template:Green
│   │   │   └── [...]
│   │   └── Template:Green       Template:Highlight
│   │       └── [...]
│   ├── Template:Green
│   │   └── [...]
│   ├── License.md                      Template:Highlight
│   ├── Template:Green                     Template:Highlight
│   │   └── [...]
│   ├── package.xml
│   ├── Template:Green
│   │   ├── STM32CubeProjectsList.html  Template:Highlight
│   │   ├── Template:Green             Template:Highlight
│   │   │   └── [...]
│   │   └── Template:Green             Template:Highlight
│   │       └── [...]
│   ├── Readme.md
│   ├── Release_Notes.html              Template:Highlight
│   └── Template:Green
│       └── [...]
└── Template:Green     Template:Highlight
    ├── Template:Green
    │   └── Template:Green                                Template:Highlight
    │       ├── tf-a-bl2-optee.elf                  Template:Highlight
    │       ├── tf-a-bl2-trusted.elf                Template:Highlight
    │       ├── tf-a-bl32-trusted.elf               Template:Highlight
    │       ├── u-boot-stm32mp157a-dk1-optee.elf    Template:Highlight
    │       ├── u-boot-stm32mp157a-dk1-trusted.elf  Template:Highlight
    │       ├── u-boot-stm32mp157f-dk2-optee.elf    Template:Highlight
    │       ├── u-boot-stm32mp157f-dk2-trusted.elf  Template:Highlight
    │       ├── u-boot-stm32mp157f-ev1-optee.elf    Template:Highlight
    │       ├── u-boot-stm32mp157f-ev1-trusted.elf  Template:Highlight
    │       ├── vmlinux                             Template:Highlight
    │       └── [...]
    └── Template:Green
        └── Template:Green
            ├── Template:Green
            ├── Template:Green         Template:Highlight
                └── Template:Highlight

Appendix A shows the structure of the Linux kernel, U-Boot, TF-A and OP-TEE OS 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:Green  Template:Highlight
        │   └── [...]
        ├── Template:Green           Template:Highlight
        │   └── [...]
        ├── Template:Green
        │   ├── Template:Green                   Template:Highlight
        │   │   ├── Template:Green
        │   │   │   ├── Template:Green
        │   │   │   │   ├── st-image-core.bb          Template:Highlight
        │   │   │   │   └── 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: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
        │   │   │       └── st-image-vendorfs.bb  Template:Highlight
        │   │   └── [...]
        │   ├── Template:Green  Template:Highlight
        │       └── [...]
        │   └── Template:Green
        │       ├── envsetup.sh         Template:Highlight
        │       └── [...]
        ├── Template:Green       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
├── stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17  Template:Highlight
│   └── sources
│       └── arm-ostl-linux-gnueabi
│           ├── FIP_artifacts                  Template:Highlight
│           │   ├── Template:Green                               Template:Highlight
│           │   ├── Template:Green              Template:Highlight
│           │   ├── Template:Green                            Template:Highlight
│           │   ├── Template:Green                             Template:Highlight
│           ├── linux-5.10.61
│           │   ├── 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:Highlight
│           │   │   │       └── Template:Green
│           │   │   ├── Template:Green                         Template:Highlight
│           │   │   └── Template:Green
│           │   └── [...]
│           ├── optee-os-stm32mp-3.12.0-stm32mp-r2                                           Template:Highlight
│           │   ├── Template:Green                                                           Template:Highlight
│           │   │   ├── Template:Green  Template:Highlight
│           │   │   ├── Template:Green  Template:Highlight
│           │   │   ├── Template:Green  Template:Highlight
│           │   │   └── Template:Green
│           │   └── [...]
│           ├──tf-a-stm32mp-v2.4-stm32mp-r2                             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: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
│           │   └── [...]
│           └── u-boot-stm32mp-v2020.10-stm32mp-r2                       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
│               │   ├── 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: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
│               └── [...]

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 files in STPurple are the same as the ones available in the Starter Package: flash layout, binaries for bootfs, rootfs, userfs and vendorfs partitions
  • the Template:Grey are the same as the ones available in the Starter and Developer Packages: binaries for FSBL and SSBL partitions, and for OP-TEE OS runtime services
  • the Template:Orange are the same as the ones available in the Developer Package: Linux kernel image and device tree blobs, and debug symbol files


Distribution-Package/openstlinux-5.10-dunfell-mp1-21-11-17 /build-openstlinuxweston-stm32mp/Template:Green
├── Template:Green
│   └── Template:Green
│       ├── flashlayout_st-image-weston                                 Template:Highlight
│       │   ├── FlashLayout_emmc_stm32mp157f-ev1-optee.tsv              Template:Highlight
│       │   ├── FlashLayout_emmc_stm32mp157f-ev1-trusted.tsv            Template:Highlight
│       │   ├── FlashLayout_nand-4-256_stm32mp157f-ev1-optee.tsv        Template:Highlight
│       │   ├── FlashLayout_nand-4-256_stm32mp157f-ev1-trusted.tsv      Template:Highlight
│       │   ├── FlashLayout_nor-emmc_stm32mp157f-ev1-optee.tsv          Template:Highlight
│       │   ├── FlashLayout_nor-emmc_stm32mp157f-ev1-trusted.tsv        Template:Highlight
│       │   ├── FlashLayout_nor-nand-4-256_stm32mp157f-ev1-optee.tsv    Template:Highlight
│       │   ├── FlashLayout_nor-nand-4-256_stm32mp157f-ev1-trusted.tsv  Template:Highlight
│       │   ├── FlashLayout_nor-sdcard_stm32mp157f-ev1-optee.tsv        Template:Highlight
│       │   ├── FlashLayout_nor-sdcard_stm32mp157f-ev1-trusted.tsv      Template:Highlight
│       │   ├── FlashLayout_sdcard_stm32mp157a-dk1-basic.tsv            Template:Highlight
│       │   ├── FlashLayout_sdcard_stm32mp157a-dk1-optee.tsv            Template:Highlight
│       │   ├── FlashLayout_sdcard_stm32mp157a-dk1-trusted.tsv          Template:Highlight
│       │   ├── FlashLayout_sdcard_stm32mp157f-dk2-basic.tsv            Template:Highlight
│       │   ├── FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv            Template:Highlight
│       │   ├── FlashLayout_sdcard_stm32mp157f-dk2-trusted.tsv          Template:Highlight
│       │   ├── FlashLayout_sdcard_stm32mp157f-ev1-basic.tsv            Template:Highlight
│       │   ├── FlashLayout_sdcard_stm32mp157f-ev1-optee.tsv            Template:Highlight
│       │   └── FlashLayout_sdcard_stm32mp157f-ev1-trusted.tsv          Template:Highlight
│       │   └── [...]
│       ├── scripts
│       │   └── create_sdcard_from_flashlayout.sh
│       ├── st-image-bootfs-openstlinux-weston-stm32mp1.ext4            Template:Highlight
│       ├── st-image-userfs-openstlinux-weston-stm32mp1.ext4            Template:Highlight
│       ├── st-image-vendorfs-openstlinux-weston-stm32mp1.ext4          Template:Highlight
│       ├── st-image-weston-openstlinux-weston-stm32mp1.ext4            Template:Highlight
│       ├── Template:Grey                                                       Template:Highlight
│       ├── Template:Orange                                                      Template:Highlight
│       ├── Template:Orange                                                     Template:Highlight
│       └── [...]
└── [...]