Skip to main content
Visitor II
August 5, 2021
Solved

Compile Device Tree

  • August 5, 2021
  • 7 replies
  • 3117 views

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?

    This topic has been closed for replies.
    Best answer by Jean-Marc B

    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

    7 replies

    Super User
    August 6, 2021

    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.2Author
    Visitor II
    August 9, 2021

    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.2Author
    Visitor II
    August 11, 2021

    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.

    ST Employee
    August 11, 2021

    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.2Author
    Visitor II
    August 11, 2021

    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.

    ST Employee
    August 11, 2021

    @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

    NPal.2Author
    Visitor II
    August 12, 2021

    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

    ST Employee
    August 12, 2021

    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

    Visitor II
    August 19, 2021

    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?

    NPal.2Author
    Visitor II
    August 20, 2021

    Hi @AlexandrShipovsky​ : If you look closely at the error message it says reference to an non-existent node. Are you sure you dts file has correct changes in place?

    Visitor II
    August 20, 2021

    In fact, I did not change this file at all. The file code was supplied in the developer's package. These devices are all present on the STM32MP157A-DK1 board