cancel
Showing results for 
Search instead for 
Did you mean: 

Compile Device Tree

NPal.2
Senior

Hi all,

What is the most correct and easiest way to generate dtb for the STM32MP1?

I tried following this :

https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Developer_Package

Looks way complicated and I get below error :

/opt/st/stm32mp1/3.1-openstlinux-5.10-dunfell-mp1-21-03-31/sysroots/x86_64-ostl_sdk-linux/lib/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so)

post that came across workshop video which does it in few steps.

https://www.youtube.com/watch?v=XhB0rGLjl_Q&list=PLnMKNibPkDnFeV4sBarnsAtFTg7h6V-9_&index=9

I couldn't seem to get it up and compile file in any case? I mean it exists cleanly but not dtb gets generated?

What i might be missing here?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @NPal.2​ 

Thank you for your feedback and your patience.

I am still suspecting a mismatch between your OS platform and what is expected by the SDK. What is your OS environment? Ubuntu20.04?

I am sorry I am a poor help here :(

Best regards,

--JM

View solution in original post

13 REPLIES 13
KnarfB
Principal III

Looks to me like a path issue: The libc path is within the SDK (sysroots/x86_64-ostl_sdk-linux) but the "required by" lib lto_plugin is on a native (host) path /usr/lib/. Probably setting/correcting LD_LIBRARY_PATH or launching the command in a dedicated yocto devshell helps.

NPal.2
Senior

Hi @KnarfB​ : Thanks for pointing that out. I manually edited the variable value and set it to /lib/x86_64-linux-gnu/ works well now.

NPal.2
Senior

Hi @KnarfB​ ,

Previously i mentioned it manually changed the value of the LD_LIBRARY_PATH variable to /lib/x86_64-linux-gnu/.

Looks like that does not work at all. I might have got it working in a wrong way since i did not export the SDK first.

SO now every time I export the SDK and try to do a build i get above error. I also understand the problem but cannot seem to find any solution. 0693W00000D2A2XQAV.png@Jean-Marc B​ @Community member​ , kindly provide your inputs as well if possible. Anything will be appreciated.

Jean-Marc B
ST Employee

Hello @NPal.2​ 

This is a bit far away from my expertise fields ;) I am not sure my inputs will help you.

I would first check the versions of the different downloaded archives (starter package, developer package and sdk toolchain) to be sure you have the same tag for all the three archives.

Perhaps you have conflicts between two mixed setups. I would recommend to start from a new terminal.

Then, the sdk should be properly installed and initialized as described in the following wiki : https://wiki.st.com/stm32mpu/wiki/SDK_for_OpenSTLinux_distribution

Best regards,

--JM

NPal.2
Senior

HI all,

Thanks @Jean-Marc B​ for response.

I am using kernel : linux-stm32mp-5.10.10-r0

from en.SOURCES-stm32mp1-openstlinux-5.10-dunfell-mp1-21-03-31

SDK Version : 3.1-openstlinux-5.10-dunfell-mp1-21-03-31

I am pretty sure they are from the same version : 3.0.0 which is the latest

And post following the procedure mentioned here :

https://github.com/STMicroelectronics/meta-st-stm32mp/blob/dunfell/recipes-kernel/linux/linux-stm32mp/README.HOW_TO.txt

It fails at step : make ARCH=arm O="$PWD/../build" multi_v7_defconfig fragment*.config

Kindly help me out.

Jean-Marc B
ST Employee

@NPal.2​ 

Thanks your for your feedback.

It seems to me your gcc installation is based on gcc-10.x (from your screen snapshot, I read /usr/lib/gcc/x86_64-linux/10).

On the two supported platforms for OpenSTLinux, for Ubuntu18, the default gcc is 7.x and for Ubuntu20, the default gcc is 9.x.

Does the installed and used gcc version on your machine be the cause of your problem because too high compared with 7.x or 9.x?

Best regards,

--JM

Hi @Jean-Marc B​ : Thanks for pointing that out. I removed all other version of GCC to make sure it does not conflicts with the one i need and installed 9.x version. However i am still getting this build error.

0693W00000D2FeRQAV.png

Hello @NPal.2​ 

Thank you for your feedback and your patience.

I am still suspecting a mismatch between your OS platform and what is expected by the SDK. What is your OS environment? Ubuntu20.04?

I am sorry I am a poor help here :(

Best regards,

--JM

AlexandrShipovsky
Associate III

Hello! I use developer package+STM32CubeIDE. At a certain point (I don't understand why) I stopped compiling the linux kernel device tree. Everything else compiles without errors (tf-a, u-boot, modules). What could be the reason?