Registered User |
Registered User mNo edit summary |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
{{SoftwareLicenseAgreement | distribution=OpenSTLinux}} | {{SoftwareLicenseAgreement | distribution=OpenSTLinux}} | ||
* Download the [{{EcosystemRelease/Package | revision=4. | * Download the [{{EcosystemRelease/Package | revision=4.1.0 | package=SDK package | request=url}}/{{EcosystemRelease/Package | revision=4.1.0 | package=SDK package | request=name}} Developer Package Yocto SDK] into the following directory: '''$HOME/STM32MPU_workspace/tmp''' | ||
* Uncompress the tarball file to get the SDK installation script | * Uncompress the tarball file to get the SDK installation script | ||
{{PC$}} cd $HOME/STM32MPU_workspace/tmp | {{PC$}} cd $HOME/STM32MPU_workspace/tmp | ||
{{PC$}} tar xvf {{EcosystemRelease/Package | revision=4. | {{PC$}} tar xvf {{EcosystemRelease/Package | revision=4.1.0| package=SDK package | request=name}} | ||
==Run the SDK installation script== | ==Run the SDK installation script== | ||
* Create your STM32MP1 Developer Package SDK directory on your host computer | * Create your STM32MP1 Developer Package SDK directory on your host computer | ||
{{PC$}} mkdir -p $HOME/STM32MPU_workspace/STM32MP1-Ecosystem-v4. | {{PC$}} mkdir -p $HOME/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/SDK | ||
* Change the permissions of the SDK installation script so that it is executable | * Change the permissions of the SDK installation script so that it is executable | ||
{{PC$}} chmod +x {{EcosystemRelease/Package | revision=4. | {{PC$}} chmod +x {{EcosystemRelease/Package | revision=4.1.0 | package=SDK installation script | request=path}}/{{EcosystemRelease/Package | revision=4.1.0 | package=SDK installation script | request=name}} | ||
* Execute the SDK installation script | * Execute the SDK installation script | ||
{{PC$}} ./{{EcosystemRelease/Package | revision=4. | {{PC$}} ./{{EcosystemRelease/Package | revision=4.1.0 | package=SDK installation script | request=path}}/{{EcosystemRelease/Package | revision=4.1.0 | package=SDK installation script | request=name}} -d <working directory absolute path>/Developer-Package/SDK | ||
* The following log is output when the installation is successful: | * The following log is output when the installation is successful: | ||
<pre> | <pre> | ||
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 4.0. | ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 4.0.4-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23 | ||
=================================================================================================================================== | =================================================================================================================================== | ||
You are about to install the SDK to "/home/osboxes/STM32MPU_workspace/STM32MP1-Ecosystem-v4. | Enter target directory for SDK (default: /opt/st/stm32mp1/4.0.4-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23):/home/osboxes/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/SDK | ||
Extracting SDK | You are about to install the SDK to "/home/osboxes/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/SDK". Proceed [Y/n]? | ||
Extracting SDK.........................................................................................................................................................................................................................done | |||
Setting it up...done | Setting it up...done | ||
SDK has been successfully set up and is ready to be used. | SDK has been successfully set up and is ready to be used. | ||
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. | Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. | ||
$ . /home/osboxes/STM32MPU_workspace/STM32MP1-Ecosystem-v4. | $ . /home/osboxes/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi | ||
</pre> | </pre> | ||
Line 46: | Line 47: | ||
{{info|The SDK environment setup script must be run once on each new working terminal on which you cross-compile}} | {{info|The SDK environment setup script must be run once on each new working terminal on which you cross-compile}} | ||
{{PC$}} cd $HOME/STM32MPU_workspace/STM32MP1-Ecosystem-v4. | {{PC$}} cd $HOME/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package | ||
{{PC$}} source SDK/{{EcosystemRelease/Package | revision=4. | {{PC$}} source SDK/{{EcosystemRelease/Package | revision=4.1.0 | package=SDK setup script | request=name}} | ||
--------------------- | --------------------- | ||
Line 63: | Line 64: | ||
* Check the C compiler version | * Check the C compiler version | ||
{{PC$}} $CC --version | {{PC$}} $CC --version | ||
arm-ostl-linux-gnueabi-gcc (GCC) 11. | arm-ostl-linux-gnueabi-gcc (GCC) 11.3.0 | ||
Copyright (C) 2021 Free Software Foundation, Inc. | Copyright (C) 2021 Free Software Foundation, Inc. | ||
This is free software; see the source for copying conditions. There is NO | This is free software; see the source for copying conditions. There is NO | ||
Line 71: | Line 72: | ||
{{PC$}} echo $OECORE_SDK_VERSION | {{PC$}} echo $OECORE_SDK_VERSION | ||
4.0. | 4.0.4-{{EcosystemRelease/Package | revision=4.1.0 | package=OpenSTLinux distribution | request=name}} | ||
If any of these commands fails or does not return the expected result, try to reinstall the SDK. | If any of these commands fails or does not return the expected result, try to reinstall the SDK. |
Latest revision as of 11:32, 22 November 2022
1. Overview
This stage explains how to install the SDK.
The SDK for OpenSTLinux distribution provides a standalone cross-development toolchain and libraries tailored to the contents of the specific image flashed onto the board.
2. Host computer configuration
2.1. Install extra packages
Additional Ubuntu packages must be installed to perform basic development tasks, basic cross-compilation (via Developer Package) or more complex cross-compilation such as OpenEmbedded does (via Distribution Package):
- Packages required by OpenEmbedded/Yocto (details here):
sudo apt-get update
sudo apt-get install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool
sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
sudo apt-get install libmpc-dev libgmp-dev
- Packages needed for some "Developer Package" use cases:
sudo apt-get install build-essential libssl-dev
- Package for repo (used to download the "Distribution Package" source code):
repo.Please follow the installation instructions described in
For Ubuntu 20.04, first set python3 as default: sudo apt install python-is-python3
- Useful tools:
sudo apt-get install coreutils bsdmainutils sed curl bc lrzsz corkscrew cvs subversion mercurial nfs-common nfs-kernel-server libarchive-zip-perl dos2unix texi2html diffstat libxml2-utils
2.2. Additional configurations
Additional configurations have to be installed to support up to 16 partitions per MMC. By default, on Linux® systems, a maximum of 8 partitions are allowed on MMC. All Packages (Starter Package, ...) need more than 10 partitions for the storage device. In order to extend the number of partitions per device to 16, the following options must be added to modprobe:
echo 'options mmc_block perdev_minors=16' > /tmp/mmc_block.conf
sudo mv /tmp/mmc_block.conf /etc/modprobe.d/mmc_block.conf
3. Download the SDK
- Download the [unknown revision/unknown revision Developer Package Yocto SDK] into the following directory: $HOME/STM32MPU_workspace/tmp
- Uncompress the tarball file to get the SDK installation script
unknown revisioncd $HOME/STM32MPU_workspace/tmp tar xvf
4. Run the SDK installation script
- Create your STM32MP1 Developer Package SDK directory on your host computer
mkdir -p $HOME/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/SDK
- Change the permissions of the SDK installation script so that it is executable
unknown revision/unknown revisionchmod +x
- Execute the SDK installation script
unknown revision/unknown revision -d <working directory absolute path>/Developer-Package/SDK./
- The following log is output when the installation is successful:
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 4.0.4-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23
===================================================================================================================================
Enter target directory for SDK (default: /opt/st/stm32mp1/4.0.4-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23):/home/osboxes/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/SDK
You are about to install the SDK to "/home/osboxes/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/SDK". Proceed [Y/n]?
Extracting SDK.........................................................................................................................................................................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /home/osboxes/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
5. Start the SDK up
unknown revisioncd $HOME/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package source SDK/
The following checks ensure that the environment is correctly set up:
- Check the target architecture
echo $ARCH
arm
- Check the toolchain binary prefix for the target tools
echo $CROSS_COMPILE
arm-ostl-linux-gnueabi-
- Check the C compiler version
$CC --version
arm-ostl-linux-gnueabi-gcc (GCC) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Check that the SDK version is the expected one (e.g.)
unknown revisionecho $OECORE_SDK_VERSION 4.0.4-
If any of these commands fails or does not return the expected result, try to reinstall the SDK.