Last edited 2 weeks ago

Package repository for OpenSTLinux distribution

Applicable for STM32MP13x lines, STM32MP15x lines, STM32MP21x lines, STM32MP23x lines, STM32MP25x lines


The package repository for the OpenSTLinux distribution contains standard Linux APT packages compatible with the OSTL distribution.

This service makes it easy to enrich or update the starter packages uploaded to ST boards using standard APT commands from the board console.

1. Purpose[edit | edit source]

This page describes how to access and use the package repository for the OpenSTLinux distribution on STM32MPU platforms. It explains the repository structure, available packages, and the recommended methods for integrating these packages into your development or deployment workflow.
Please read the Disclaimer chapter carefully before using the information on this page.

2. Disclaimers[edit | edit source]

STMicroelectronics' package repository service is provided for evaluation purposes only, and therefore not approved for use in production.
The package licenses hosted in these repositories can be found here: OpenSTLinux licenses.
Command outputs described in this document may vary slightly depending on the tool version.

2.1. Description[edit | edit source]

OpenSTLinux provides a package repository service hosted at the non-browsable URL http://packages.openstlinux.st.com. The package repository service is designed for STM32MP157x-DKx , STM32MP157x-EV1 , STM32MP135F-DK , STM32MP215F-DK , STM32MP257x-DK and STM32MP257x-EV1 boards and is enabled by default in the Starter Package.

Warning
Some packages provided in the OpenSTLinux distribution can't be installed or run on the STM32MP135F-DK board. This mainly concerns graphical and related packages because the hardware and technical characteristics are different between STM32MP157x-DKx , STM32MP157x-EV1 on one hand, and the STM32MP215F-DK , STM32MP257x-DK and STM32MP257x-EV1 on the other hand.

2.2. Organization[edit | edit source]

Within each repository, packages are organized in three groups (i.e. components in the APT terminology):

  • The main group contains a wide selection of packages whose installation is automatically tested by STMicroelectronics
  • The untested group contains all the other packages that can be built using the bitbake world command. However their installation is not guaranteed.
  • The updates group contains additional packages not included in the OpenSTLinux distribution releases and updated packages. This group is managed by a dedicated layer available through github®. Further details are available by following the github® link: https://github.com/STMicroelectronics/meta-st-pkgrepo-updates.

2.3. Limitations[edit | edit source]

The package repository service doesn't include the packages that are shipped in the rootfs image, nor the BSP components (TF-A, U-Boot, Linux and OP-TEE). They can be installed only from the Starter Package using the STM32CubeProgrammer.

Available rootfs space is about 60 MB by default. For a better experience it is recommended to flash the Starter Package using the "extensible" flashlayout (*-extensible.tsv).
Extensible flashlayout doesn't write the userfs partition to extend the rootfs partition to the size of the SD card.

3. Usage[edit | edit source]

3.1. Prerequisite[edit | edit source]

We assume that your board has an internet connection, either through an Ethernet cable or through a Wi-Fi.


Warning
If a cache proxy issue occurs, a workaround is available:
  • Export the http_proxy environment variable with the following command before any apt-* commands:
export http_proxy='http://<proxy url>:<proxy port>/'
  • Adjust the board's date to match the local time zone by using:
date +%y%m%d -s "yyyymmdd"
date +%T -s "hh:mm:ss"

3.2. Apt[edit | edit source]

OpenSTLinux packages can be handled using apt-* utilities, which are the same utilities used on a Debian system. The first apt-* command that must be run before any other is:

 apt-get update
 The software package is provided AS IS, and by downloading it, you agree to be
 bound to the terms of the software license agreement (SLA).
 The detailed content licenses can be found at
 https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.
  
 Get:1 http://packages.openstlinux.st.com/6.2.1 scarthgap InRelease [5276 B]
 Get:2 http://packages.openstlinux.st.com/6.2.1 scarthgap/main armhf Packages [963 kB]
 Get:3 http://packages.openstlinux.st.com/6.2.1 scarthgap/updates armhf Packages [26.8 kB]
 Get:4 http://packages.openstlinux.st.com/6.2.1 scarthgap/untested armhf Packages [1535 kB]

Fetched 2530 kB in 3s (813 kB/s)

 Reading package lists... Done

This command synchronizes the local packages index from the repositories enumerated in /etc/apt/sources.list{,.d}. Once it is updated, apt-cache can be used to get the list of all available packages:

 apt-cache search .
 a52dec - ATSC A/52 surround sound stream decoder
 a52dec-doc - ATSC A/52 surround sound stream decoder
 abseil-cpp - Abseil is a cpp library like STL
 acl - Utilities for managing POSIX Access Control Lists
 ...
 zram - Linux zram compressed in-memory swap
 zsh - UNIX Shell similar to the Korn shell
 zsh-doc - UNIX Shell similar to the Korn shell - Documentation files
 zsync-curl - File transfer tool optimised for large files (curl port)
 zsync-curl-doc - File transfer tool optimised for large files (curl port) - Documentation files

It is possible to list only packages that match a given pattern, for example:

 apt-cache search emacs
 libreadline-doc - Library for editing typed command lines - Documentation files
 libreadline8 - Library for editing typed command lines
 emacs-base - Emacs is the extensible, customizable, self-documenting real-time display editor
 emacs-doc - Emacs is the extensible, customizable, self-documenting real-time display editor - Documentation files
 emacs-full - Emacs is the extensible, customizable, self-documenting real-time display editor
 emacs-minimal - Emacs is the extensible, customizable, self-documenting real-time display editor
 gpm - Console mouse driver
 gpm-doc - Console mouse driver - Documentation files
 zile - Zile is lossy Emacs
 zile-doc - Zile is lossy Emacs - Documentation file

You can check if a package is already installed or not:

 apt-cache policy zile
 zile:
   Installed: (none)
   Candidate: 2.4.15-r0
   Version table:
      2.4.15-r0 500
         500 http://packages.openstlinux.st.com/6.2.1 scarthgap/untested armhf Packages

The desired package(s) can then be easily installed:

 apt-get install zile
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 The following additional packages will be installed:
   bdwgc
 The following NEW packages will be installed:
   bdwgc zile
 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
 Need to get 153 kB of archives.
 After this operation, 0 B of additional disk space will be used.
 Do you want to continue? [Y/n]
 Get:1 http://packages.openstlinux.st.com/6.2.1 scarthgap/untested armhf bdwgc armhf 8.2.6-r0 [73.1 kB]
 Get:2 http://packages.openstlinux.st.com/6.2.1 scarthgap/untested armhf zile armhf 2.4.15-r0 [80.3 kB]

Fetched 153 kB in 0s (388 kB/s)

 The software package is provided AS IS, and by downloading it, you agree to be
 bound to the terms of the software license agreement (SLA).
 The detailed content licenses can be found at
 https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.
 
 Selecting previously unselected package bdwgc.
 (Reading database ... 15543 files and directories currently installed.)
 Preparing to unpack .../bdwgc_8.2.6-r0_armhf.deb ...
 Unpacking bdwgc (8.2.6-r0) ...
 Selecting previously unselected package zile.
 Preparing to unpack .../zile_2.4.15-r0_armhf.deb ...
 Unpacking zile (2.4.15-r0) ...
 Setting up bdwgc (8.2.6-r0) ...
 Setting up zile (2.4.15-r0) ...

... or removed:

 apt-get remove zile
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 The following package was automatically installed and is no longer required:
   bdwgc
 Use 'apt autoremove' to remove it.
 The following packages will be REMOVED:
   zile
 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
 After this operation, 0 B of additional disk space will be used.
 Do you want to continue? [Y/n]
 
 The software package is provided AS IS, and by downloading it, you agree to be
 bound to the terms of the software license agreement (SLA).
 The detailed content licenses can be found at
 https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.
   
 (Reading database ... 15552 files and directories currently installed.)
 Removing zile (2.4.15-r0) ...


This command removes only the files installed by the package. It doesn't remove the package from the apt download cache. If there is not enough space available on the system, it is recommended to clean the cache:

 apt-get clean

Likewise, some packages may have been installed automatically to satisfy dependencies with other packages. If they are no longer required, they can be removed to free space:

 apt-get autoremove
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 The following packages will be REMOVED:
   bdwgc
 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
 After this operation, 0 B of additional disk space will be used.
 Do you want to continue? [Y/n]
 
 The software package is provided AS IS, and by downloading it, you agree to be
 bound to the terms of the software license agreement (SLA).
 The detailed content licenses can be found at
 https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.
 
 (Reading database ... 15551 files and directories currently installed.)
 Removing bdwgc (8.2.6-r0) ...
Warning
The above examples were taken from an STM32MP1 board. For STM32MP2 boards, outputs may differ. In particular, the STM32MP2 package architecture is arm64 instead of armhf, which is used for the STM32MP1 package architecture.

4. How to activate a local package repository[edit | edit source]

4.1. Prerequisite[edit | edit source]

Even if Package repository for OpenSTLinux offers a wide variety of packages, you may need to use a local and personal package repository. Using a local and private package repository is a 'smart' and 'quick' way to update the Starter Package with your developments.

A local package repository is a collection of *.deb organized in the format required by the apt-* commands. The local repository should provide Packages metadata files.

The OpenEmbedded/Yocto build system can generate a valid package repository natively (by using bitbake package-index command listed below). So first, install the STM32MPU OpenSTLinux distribution.

4.2. Update the repo package indexes[edit | edit source]

Execute the bitbake package-index command:

 cd [your STM32MP Distribution path]/build-<DISTRO>-<MACHINE>
 bitbake package-index

4.3. HTTP server execution on the computer[edit | edit source]

The http.server python application is already installed with the OpenSTLinux distribution on the board. You just need to launch this application on your host computer, in the [your STM32MP Distribution path]/build-<DISTRO>-<MACHINE>/tmp-glibc/deploy/deb folder:

cd [your STM32MP Distribution path]/build-<DISTRO>-<MACHINE>/tmp-glibc/deploy/deb
python3 -m http.server &

4.4. How to use the local OpenSTLinux package repository[edit | edit source]

4.4.1. From STM32MP1 boards[edit | edit source]

We use the IP address of the HTTP server we launched above to configure APT. That means this <IP> address should be configured as a static address on the host computer.
You can now configure the APT tool directly on the target via a Linux console:

echo "deb [trusted=yes] http://<IP>:8000/stm32mp1 /" > /etc/apt/sources.list.d/my_custom.list
echo "deb [trusted=yes] http://<IP>:8000/all /" >> /etc/apt/sources.list.d/my_custom.list
echo "deb [trusted=yes] http://<IP>:8000/cortexa7t2hf-neon-vfpv4 /" >> /etc/apt/sources.list.d/my_custom.list
echo "deb [trusted=yes] http://<IP>:8000/cortexa7hf-neon-vfpv4 /"  >> /etc/apt/sources.list.d/my_custom.list

In these examples, [trusted=yes] has been specified because the package repository Release file is not signed.

Then you can run the command to synchronize the local packages index:

apt-get update
The software package is provided AS IS, and by downloading it, you agree to be
bound to the terms of the software license agreement (SLA).
The detailed content licenses can be found at
https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.
Ign:1 http://<IP>:8000/stm32mp1  InRelease
Ign:2 http://<IP>:8000/all  InRelease
Ign:3 http://<IP>:8000/cortexa7t2hf-neon-vfpv4  InRelease
Ign:4 http://<IP>:8000/cortexa7hf-neon-vfpv4  InRelease
Get:5 http://<IP>:8000/stm32mp1  Release [1088 B]
Get:6 http://<IP>:8000/all  Release [1083 B]
Get:7 http://<IP>:8000/cortexa7t2hf-neon-vfpv4  Release [1115 B]
Get:8 http://<IP>:8000/cortexa7hf-neon-vfpv4  Release [1097 B]
Ign:9 http://<IP>:8000/stm32mp1  Release.gpg
Ign:10 http://<IP>:8000/all  Release.gpg
Ign:11 http://<IP>:8000/cortexa7t2hf-neon-vfpv4  Release.gpg
Ign:12 http://<IP>:8000/cortexa7hf-neon-vfpv4  Release.gpg
Get:13 http://<IP>:8000/stm32mp1  Packages [165 kB]
Get:14 http://<IP>:8000/all  Packages [109 kB]
Get:15 http://<IP>:8000/cortexa7t2hf-neon-vfpv4  Packages [2775 kB]
Get:16 http://<IP>:8000/cortexa7hf-neon-vfpv4  Packages [20.5 kB]
Fetched 3073 kB in 7s (463 kB/s)
Reading package lists... Done

The other apt-* commands are now available, as described above.

4.4.2. From STM32MP2 boards[edit | edit source]

We use the IP address of the HTTP server we launched above to configure APT. That means this <IP> address should be configured as a static address on the host computer.
You can now configure the APT tool directly on the target via a Linux console:

echo "deb [trusted=yes] http://<IP>:8000/stm32mp25 /" > /etc/apt/sources.list.d/my_custom.list
echo "deb [trusted=yes] http://<IP>:8000/all /" >> /etc/apt/sources.list.d/my_custom.list
echo "deb [trusted=yes] http://<IP>:8000/cortexa35 /" >> /etc/apt/sources.list.d/my_custom.list

In these examples, [trusted=yes] has been specified because the package repository Release file is not signed.

Then you can run the command to synchronize the local packages index:

 apt-get update
 The software package is provided AS IS, and by downloading it, you agree to be
 bound to the terms of the software license agreement (SLA).
 The detailed content licenses can be found at
 https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.
 Ign:1 http://<IP>:8000/stm32mp25  InRelease
 Ign:2 http://<IP>:8000/all  InRelease
 Ign:3 http://<IP>:8000/cortexa35  InRelease
 Get:4 http://<IP>:8000/stm32mp25  Release [1088 B]
 Get:5 http://<IP>:8000/all  Release [1083 B]
 Get:6 http://<IP>:8000/cortexa35  Release [1115 B]
 Ign:7 http://<IP>:8000/stm32mp25  Release.gpg
 Ign:8 http://<IP>:8000/all  Release.gpg
 Ign:9 http://<IP>:8000/cortexa35  Release.gpg
 Get:10 http://<IP>:8000/stm32mp25  Packages [165 kB]
 Get:11 http://<IP>:8000/all  Packages [109 kB]
 Get:12 http://<IP>:8000/cortexa35  Packages [2775 kB]
 Fetched 3073 kB in 7s (463 kB/s)
 Reading package lists... Done

The other apt-* commands are now available, as described above.


5. Support[edit | edit source]

Bug reports, request for new packages, or any other kind of support requests can be submitted through https://community.st.com.


6. Further readings[edit | edit source]