cancel
Showing results for 
Search instead for 
Did you mean: 

U-Boot Developer Build Not Finding libcrypto.so.1.1

JKell.6
Associate III

Building per the Developer Package Device Tree Building Wiki

Using STM32MP1-Ecosystem_v4.0.0

Verified libssl-dev and libncurses have been installed

openssl version 3.0.0 is present

confirmed libcrypto.so is present at usr/lib/x86_64_linux-gnu

[fiptool] Create fip-stm32mp153a-xpro-mp1-mx-optee.bin fip binary into 'FIP_DEPLOYDIR_FIP' folder...
fiptool: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
[fiptool] Done

1 ACCEPTED SOLUTION

Accepted Solutions
JeanPhilippeR
ST Employee

Hi Jim,

When checking the build commands you are using, you are following the chapter §5.2 in README.HOW_TO.txt, and I recommend you to not launch "make stm32mp15_defconfig" first, only the second make command with all the given parameters.

So you can try

  • "make mrproper" first to get clean environment
  • make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb FIP_CONFIG="optee" DEVICETREE=$DTS_NAME all

One more point, in order to take into account your dt file generated from CubeMx, you will have to update arch/arm/dts/Makefile, in order to add it on the CONFIG_STM32MP15x. Do not know if already taken into account on your side?

Thank you

Jean-Philippe

View solution in original post

9 REPLIES 9
JeanPhilippeR
ST Employee

Dear @Community member​ 

This issue must be corrected with new STM32MP1-Ecosystem_v4.1.0.

However, you can probably cherry-pick some commits on https://github.com/STMicroelectronics/meta-st-stm32mp:

Thank you

BR

Jean-Philippe

Thanks Jean-Phillipe, I'll give that a go and see what happens.

Jean-Phillipe,

I installed 4.1.0 today and all looked good. Just tried to build with my device trees and the libcrypto error did go away which is awesome however there seem to be a few more errors at the u-boot stage which aren't very clear keeping the build from completing. I'm not doing anything special, simple CubeMX device trees based on my target hardware. Is anyone actually building successfully with this stuff?

Using /home/jkellar-pulse/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-v2021.10-stm32mp-r2-r0/u-boot-stm32mp-v2021.10-stm32mp-r2 as source for U-Boot
  /home/jkellar-pulse/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-v2021.10-stm32mp-r2-r0/u-boot-stm32mp-v2021.10-stm32mp-r2 is not clean, please run 'make mrproper'
  in the '/home/jkellar-pulse/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-v2021.10-stm32mp-r2-r0/u-boot-stm32mp-v2021.10-stm32mp-r2' directory.
make[2]: *** [/home/jkellar-pulse/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-v2021.10-stm32mp-r2-r0/u-boot-stm32mp-v2021.10-stm32mp-r2/Makefile:1858: prepare3] Error 1
make[2]: Leaving directory '/home/jkellar-pulse/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-v2021.10-stm32mp-r2-r0/build/stm32mp15_defconfig'
make[1]: *** [Makefile:177: sub-make] Error 2
make[1]: Leaving directory '/home/jkellar-pulse/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-v2021.10-stm32mp-r2-r0/u-boot-stm32mp-v2021.10-stm32mp-r2'
make: *** [/home/jkellar-pulse/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-v2021.10-stm32mp-r2-r0/u-boot-stm32mp-v2021.10-stm32mp-r2/../Makefile.sdk:142: uboot-stm32mp15_defconfig] Error 1
~/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23 ~/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi
~/STM32MPU_workspace/STM32MP1-Ecosystem-v4.1.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/sources/arm-ostl-linux-gnueabi 

Hello @Community member​ 

Just make a try on my side, and no issue seen.: STM32MP157F-DK2 board selected.

Could you please tell me more about different below steps?

  • Board selected in CubeMx
  • Name of dts files generated
  • Action done to copy on the U-Boot source code
  • Build cmd line done

Thank you

Jean-Philippe

Hello JeanPhilippe

I can build the EV and DK boards sets. For my custom target I'm not specifying a board. I've generated DTS files from an IOC in CubeMX. Its for an STM32MP153A. Attached is my project information (e.g. the IOC, DTS files, etc.)

To answer your questions:

No board selected. Custom target spec'd in CubeMX for STM32MP153A. DTS files generated by CubeMX.

DTS file names - stm32mp153a-xpro-mp1-mx.dts

I assume this is in reference to getting the sources, in particular U-Boot. Used the TAR file from the SOURCES download. Followed the README.HOW_TO.txt file in each source (i.e. kernel, tf-a, op-tee and u-boot) to setup and do an initial build of everything.

I've written a script to perform all command line sets from the README files. Script is attached. Specifically for U-Boot the command line is:

make stm32mp15_defconfig
make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb FIP_CONFIG="optee" DEVICETREE=$DTS_NAME all 

Thanks,

Jim

JeanPhilippeR
ST Employee

Hi Jim,

When checking the build commands you are using, you are following the chapter §5.2 in README.HOW_TO.txt, and I recommend you to not launch "make stm32mp15_defconfig" first, only the second make command with all the given parameters.

So you can try

  • "make mrproper" first to get clean environment
  • make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb FIP_CONFIG="optee" DEVICETREE=$DTS_NAME all

One more point, in order to take into account your dt file generated from CubeMx, you will have to update arch/arm/dts/Makefile, in order to add it on the CONFIG_STM32MP15x. Do not know if already taken into account on your side?

Thank you

Jean-Philippe

Hi Jean-Philippe,

Yes! Very good. Seems that I'm now building a complete set of binaries. The solution is in two parts though one of which doesn't seem documented that I could find, therefore I hadn't done it.

  1. Removing the "make stm32mp15_defconfig" is important and adding "make mrproper" is good. Doing this removed some errors I was still getting after doing point 2 in this list yesterday.
  2. Updating the Makefile file in <u-boot source folder>/arch/arm/dts" is required and doesn't seem to be documented very well. It was brought to my attention yesterday by another. For anyone else having this issue - Search in the Makefile mentioned above for dtb-$(CONFIG_STM32MP15x). You have to add your custom DTB filename to the list.

After that all was good.

Thanks,

Jim

Hi Jim,

Good to hear this is ok now on your side!

Thank you for your feedback.

I will check how to improve guidelines in the README.HOW_TO.txt.

Thank you

BR

Jean-Philippe

Hi Jim,

I would like to complete my answer for your point2.

When checking the full build mecanism, DEVICE_TREE_EXT build variable exist to cover your need (using DT files from CubeMx). it avoid making patch in DTS Makefile.

You can use it as below example with <newCubeMxDT>

$ make -f $PWD/../Makefile.sdk UBOOT_CONFIG=trusted UBOOT_DEFCONFIG=stm32mp15_defconfig UBOOT_BINARY=u-boot.dtb DEVICETREE=<newCubeMxDT> DEVICE_TREE_EXT=<newCubeMxDT>.dtb all

We will check to highlight this way of working (wiki page or README.HOW_TO).

Best regards

JJean-Philippe