Skip to main content
Associate III
June 16, 2026
Question

OpenSTDroid v6.2.0 Build Error

  • June 16, 2026
  • 4 replies
  • 115 views

Hi everyone,

I am new to Android development, and I have two questions about OpenSTDroid v6.2.0.

  1. I followed the official documentation to build OpenSTDroid, but I encountered a build error. The details are shown in the attached error.txt.

    How to build OpenSTDroid distribution - stm32mpu
     
  2. For OpenSTDroid, is the Device Tree workflow similar to Yocto?
    In other words, should the Device Tree be generated by STM32CubeMX and then integrated into the OpenSTDroid source tree?

Any guidance or suggestions would be greatly appreciated.

Thank you.

4 replies

Jean-Christophe_TROTIN
ST Employee
June 16, 2026

Hi ​@Steven-LIN ,

About the first point, the following lines after the execution of the “stm32mp2setup” command look suspicious: it looks as if the command was executed twice (“already applied”), which might lead to an instable configuration.

  • The required patches have been already applied successfully with more recent configuration
  • The required patches have been already applied successfully

So, I propose that you “clear” the patches and apply them again with the following commands (executed in a terminal on which the ”source ./build/envsetup.sh” and “lunch aosp_dk-trunk_staging-userdebug” commands have already been executed):

            $ stm32mp2clear

            $ stm32mp2setup

Then, you can try to build again.

 

About the second point, as explained in the https://wiki.st.com/stm32mpu/wiki/How_to_customize_Linux_kernel_for_Android#Changing_the_Device_Tree wiki article,  OpenSTDroid uses a product device tree overlay. Thus, the device tree generated by STM32CubeMX cannot be used as it, but integrated into the OpenSTDroid device tree overlay.

 

Hope this information helps.

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Associate III
June 16, 2026

Hi Jean-Christophe,

I have tried your suggestion, but I still encounter the following error when running stm32mp2setup after stm32mp2clear.

$ stm32mp2clear
aries and sources

$ stm32mp2setup
[1/2]: Apply patches
Apply patches based on required configuration
Apply patches based on required configuration
[2/2]: Load graphics libraries
=> Loading GPU driver and libraries
=> Extracting data to device/stm/stm32mp2/graphics
cp: cannot stat 'device/stm/stm32mp2/tmp/gcnano-userland-android-16.0.0-20260522/*': No such file or directory
=> Extracting data to device/stm/stm32mp2-kernel/gcnano-driver

It seems that the expected gcnano-userland-android-16.0.0-20260522 directory or files are missing under device/stm/stm32mp2/tmp/.

Could you please advise whether I missed any required package or step before running stm32mp2setup?

Thank you.

Jean-Christophe_TROTIN
ST Employee
June 16, 2026

Hi ​@Steven-LIN 

 

I executed again the different steps specified in the wiki to build OpenSTDroid, in order to cross-check that I don’t encounter the same problem as the one you described. So, on my side, I didn’t get any trouble (the build process is still in progress, but the first steps are fine).

 

It seems that your execution of “stm32mp2setup” is cleaner at least for “[1/2]: Apply patches”. For “[2/2]: Load graphics libraries”, I suggest that you run the following command to force EULA dependent libraries load:

            $ load_eula -f

 

Then, you can try again to build with “make -j” (please do not re-execute “stm23mp2setup” command).

 

Hope this information helps.

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Associate III
June 17, 2026

Hi Jean-Christophe,

I have decided to perform a fresh repo sync and try again.

Thank you for your help!

Visitor
June 17, 2026

Following this thread, we have a similar issue..
 

Associate III
June 17, 2026

Hi allsafers,

Are you building in a Docker environment?

I have re-run repo sync from scratch, and the build is currently in progress.

Associate III
June 17, 2026

Hi Jean-Christophe,

I have now completed the build.

According to the contents of FlashLayout_emmc_cm33tdcid.tsv, I copied the required image files, but the total size is only about 1.1 GB. Is this expected for the OpenSTDroid build output?

Also, I would like to confirm whether it is possible to flash this image using STM32CubeProgrammer with the FlashLayout_emmc_cm33tdcid.tsv file.

I tried flashing it with STM32CubeProgrammer, and the flashing process completed very quickly. However, after switching the board back to eMMC boot mode, there was no response.

I also tried the boot procedure described in the wiki: switching back to eMMC mode, pressing RESET, and then pressing USER2, but there was still no reaction.

Could you please advise whether I may have missed any required files, flashing steps, or boot configuration?

Thanks.

Associate III
June 18, 2026

I am currently trying another flashing method.

I changed PE to P in the TSV file, and converted super.img, metadata.img, and userdata.img to raw images using simg2img.

After that, I am trying to flash the images with STM32CubeProgrammer directly, without using the flash-device script.

I will update the result after the flashing test is complete.

Thanks.