cancel
Showing results for 
Search instead for 
Did you mean: 

Can't run gtk_hello_world example on STM32MP157F

MFR
Associate II

Hi, I was following the STM32MP157F-DK2 tutorial for developing on ARM Cortex A7. 

I have two problems:

1) Starter package - i have using STM32CubeProgrammer to download the image to a new SD Card, but the board failed to load Linux

2) i have tried the example given for hello_world.c . host cross-compilation is successful, but the program cannot run on the board with the following error messages:

root@stm32mp1:/usr/local# su -l weston -c "/usr/local/gtk_hello_world"
chown: cannot read directory '/home/root': Permission denied
/usr/local/gtk_hello_world: /lib/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/gtk_hello_world)

appreciate any help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kevin HUBER
ST Employee

Hello @MFR ,

Sorry for the long delay to reply. I hope that you were able to solve your issue, otherwise you can find my reply below.

3) i have noticed the working preinstalled image are using STM32MP157C-DK2 instead of 157F dtb file, but I guess its compatible correct?

Yes, it is compatible to use the 157C-DK2 on a 157F-DK2, but not using 157F-DK2 on a board 157C-DK2.

Regarding your issue, you have to follow the getting started from the beginning and flash the whole image.
In your case you are trying to make work the linux  kernel 6.1.28, the one from ecosystem DV5.0:
https://wiki.st.com/stm32mpu/wiki/STM32_MPU_OpenSTLinux_release_note#Main_software_components

With an U-Boot 2018.11-stm32mp-r4 , which is the U-Boot version of the ecosystem DV1.2 a very very old ecosystem:
https://wiki.st.com/stm32mpu-ecosystem-v1/wiki/STM32MP15_OpenSTLinux_release_note_-_v1.2.0#Main_software_components

So the structure of the flash and the interaction between the boot levels are completely different.
Please can you follow the tutorial as adviced previously: 
https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image

If you flash the starter package of the DV5.0 as explained here, everything should work.
If this still doesn't work, please share your whole boot logs with me.

Best Regards,
Kevin

 

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.

View solution in original post

5 REPLIES 5
Kevin HUBER
ST Employee

Hello @MFR ,

Please can you clarify the context.
1) You are saying that you are not able to load Linux with the starter package.
2) You are running running "gtk_hello_world" from Linux. So you were able to reach Linux?

On which ecosystem are you working?
On MP157F-DK2, the recommended tutorial is the latest one, made for DV 5.0.0:
 https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image

If you still have an issue, please can you share the complete boot traces.

Best Regards,
Kevin

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.

Hi Kevin,
let me clarify the situation. I have using STM32MP157F-DK2 board with Ubuntu 20.04 and followed the "Getting Started" steps where I have tested the gtk_hello_world on the preinstalled Linux (kernel 4.19.94) image that comes with the board. I continue to follow the steps to download the new starter package to a different SD card using the STM32CubeProgrammer. This new downloaded image failed to work, where it hang on the ST splash screen. I have followed the steps and using the latest ecosystem you mentioned.
Fyi, I have also tried the Developer Package Linux kernel upgrade (to upgrade from the preinstalled image to the new kernel version 6.1.28), but same thing it failed to work.

My finding are as follows:
1) Starter package downloading to new SD card happens to screwed up the partition on the new SD card. I have compared the partition structure with the working preinstalled image.
2)Developer package new Linux kernel upgrade stuck at starting the kernel.
3) i have noticed the working preinstalled image are using STM32MP157C-DK2 instead of 157F dtb file, but I guess its compatible correct?

See below of the boot message for the new kernel 6.1.28:

[11406.841575] iwdg 5a002000.watchdog: timeout skrinked to 131
[11406.846870] watchdog: watchdog0: watchdog did not stop!
[11406.860887] systemd-shutdow: 24 output lines suppressed due to ratelimiting
[11406.883526] systemd-shutdown[1]: Syncing filesystems and block devices.
[11407.078368] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[11407.107839] systemd-journald[129]: Received SIGTERM from PID 1 (systemd-shutdow).
[11407.142734] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[11407.161637] systemd-shutdown[1]: Hardware watchdog 'STM32 Independent Watchdog', version 0
[11407.173834] systemd-shutdown[1]: Unmounting file systems.
[11407.183389] [14552]: Remounting '/' read-only in with options '(null)'.
[11407.284271] EXT4-fs (mmcblk0p6): re-mounted. Opts: (null)
[11407.299095] systemd-shutdown[1]: All filesystems unmounted.
[11407.303576] systemd-shutdown[1]: Deactivating swaps.
[11407.308954] systemd-shutdown[1]: All swaps deactivated.
[11407.313659] systemd-shutdown[1]: Detaching loop devices.
[11407.325141] systemd-shutdown[1]: All loop devices detached.
[11407.348877] reboot: Restarting system
INFO: PSCI Power Domain Map:
INFO: Domain Node : Level 1, parent_node -1, State ON (0x0)
INFO: Domain Node : Level 0, parent_node 0, State ON (0x0)
INFO: CPU Node : MPID 0x0, parent_node 0, State ON (0x0)
INFO: CPU Node : MPID 0x1, parent_node 0, State ON (0x0)
NOTICE: CPU: STM32MP157FAC Rev.Z
NOTICE: Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
NOTICE: Board: MB1272 Var4 Rev.C-02
INFO: Reset reason (0x54):
INFO: System reset generated by MPU (MPSYSRST)
INFO: PMIC version = 0x20
INFO: Using SDMMC
INFO: Instance 1
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.0-r3.0(debug):
NOTICE: BL2: Built : 13:13:37, Oct 2 2018
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-1066/888 bin G 1x4Gb 533MHz v1.45
INFO: Memory size = 0x20000000 (512 MB)
INFO: BL2 runs SP_MIN setup
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2ffef000
INFO: Image id=4 loaded: 0x2ffef000 - 0x30000000
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0xc0100000
INFO: STM32 Image size : 810245
WARNING: Skip signature check (header option)
INFO: Image id=5 loaded: 0xc0100000 - 0xc01c5d05
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2ffef000
INFO: SPSR = 0x1d3
NOTICE: SP_MIN: v2.0-r3.0(debug):
NOTICE: SP_MIN: Built : 13:13:37, Oct 2 2018
INFO: ARM GICv2 driver initialized
INFO: stm32mp HSI (18): Secure only
INFO: stm32mp HSE (20): Secure only
INFO: stm32mp PLL2 (27): Secure only
INFO: stm32mp PLL2_R (30): Secure only
INFO: SP_MIN: Initializing runtime services
INFO: SP_MIN: Preparing exit to normal world


U-Boot 2018.11-stm32mp-r4 (Nov 14 2018 - 16:10:06 +0000)

CPU: STM32MP157FAC Rev.Z
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)
Board: MB1272 Var4 Rev.C-02
DRAM: 512 MiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
NAND: 0 MiB
MMC: STM32 SDMMC2: 0, STM32 SDMMC2: 1
Loading Environment from EXT4... OK
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0
Boot over mmc0!
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:4...
Found U-Boot script /boot.scr.uimg
1628 bytes read in 1 ms (1.6 MiB/s)
## Executing script at c4100000
Scanning mmc 0:4...
Found /mmc0_stm32mp157c-dk2_extlinux/extlinux.conf
Retrieving file: /mmc0_stm32mp157c-dk2_extlinux/extlinux.conf
614 bytes read in 1 ms (599.6 KiB/s)
Retrieving file: /splash.bmp
46180 bytes read in 3 ms (14.7 MiB/s)
Select the boot mode
1: stm32mp157c-dk2-sdcard
2: stm32mp157c-dk2-a7-examples-sdcard
3: stm32mp157c-dk2-m4-examples-sdcard
Enter choice: 1: stm32mp157c-dk2-sdcard
Retrieving file: /uImage
8289536 bytes read in 359 ms (22 MiB/s)
append: root=/dev/mmcblk0p6 rootwait rw console=ttySTM0,115200
Retrieving file: /stm32mp157c-dk2.dtb
73578 bytes read in 3 ms (23.4 MiB/s)
## Booting kernel from Legacy Image at c2000000 ...
Image Name: Linux-6.1.28
Created: 2023-09-08 3:14:31 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 8289472 Bytes = 7.9 MiB
Load Address: c2000040
Entry Point: c2000040
Verifying Checksum ... OK
## Flattened Device Tree blob at c4000000
Booting using the fdt blob at 0xc4000000
XIP Kernel Image ... OK
Using Device Tree in place at c4000000, end c4014f69

Starting kernel ...

MFR
Associate II

latest:

OpenAMP_TTY_echo also failed to work. No vitual port has been created (no /dev/ttyRPMSG0 or SG1).

your advise is highly sought. I'm planning to use the board for my current project.

Thanks.

Kevin HUBER
ST Employee

Hello @MFR ,

Sorry for the long delay to reply. I hope that you were able to solve your issue, otherwise you can find my reply below.

3) i have noticed the working preinstalled image are using STM32MP157C-DK2 instead of 157F dtb file, but I guess its compatible correct?

Yes, it is compatible to use the 157C-DK2 on a 157F-DK2, but not using 157F-DK2 on a board 157C-DK2.

Regarding your issue, you have to follow the getting started from the beginning and flash the whole image.
In your case you are trying to make work the linux  kernel 6.1.28, the one from ecosystem DV5.0:
https://wiki.st.com/stm32mpu/wiki/STM32_MPU_OpenSTLinux_release_note#Main_software_components

With an U-Boot 2018.11-stm32mp-r4 , which is the U-Boot version of the ecosystem DV1.2 a very very old ecosystem:
https://wiki.st.com/stm32mpu-ecosystem-v1/wiki/STM32MP15_OpenSTLinux_release_note_-_v1.2.0#Main_software_components

So the structure of the flash and the interaction between the boot levels are completely different.
Please can you follow the tutorial as adviced previously: 
https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image

If you flash the starter package of the DV5.0 as explained here, everything should work.
If this still doesn't work, please share your whole boot logs with me.

Best Regards,
Kevin

 

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.
MFR
Associate II

Thanks @Kevin HUBER