Skip to main content
Associate
April 2, 2024
Question

Boot mainline kernel with stm32mp157c-dk2

  • April 2, 2024
  • 2 replies
  • 2783 views

Hello Folks,

I am trying to port mainline linux kernel version 6.8 on stm32mp157c-dk2 board.

When I flash mainline kernel image on stm32mp157c-dk2 board, kernel is not getting started.

Could anyone please guide me here?

How we can boot mainline kernel with stm32mp157c-dk2 board device?

Any steps that I can follow and achieve booting device.

Thanks in advance!

2 replies

Erwan SZYMANSKI
Technical Moderator
April 3, 2024

Hello @himanshubhavani ,
Unfortunately, ST does not support this kernel version, and the last release on which we are based in aligned with Linux kernel 6.1 (with OpenSTLinux v5).

Upgrading the kernel version by yourself with taking a recent mainline one would also mean  to rebase all ST drivers on it, and it will be a massive work.

I really advice you to go on Linux kernel provided by ST in its release, and if there are some features that came after in the mainline kernel, you can backport it by yourself. It will be much easier than the other way.

Kind regards,
Erwan

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
April 5, 2024

Hello @Erwan SZYMANSKI ,

Thanks for the response!

As per your suggestion, I tried first zImage and stm32mp157c-dk2.dtb from mainline kernel version 6.1.

Unfortunately it ends up with the same issue faced with kernel 6.8 (Device gets reset from u-boot and doesn't go to boot kernel)

I am attaching logs here for your reference.

 

U-Boot 2022.10-stm32mp-r1.1 (Apr 03 2024 - 00:25:53 +0530) 

CPU: STM32MP157CAC Rev.B
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)
Board: MB1272 Var2.0 Rev.C-01
DRAM: 512 MiB
optee optee: OP-TEE: revision 3.19
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 367 devices, 43 uclasses, devicetree: board
WDT: Started watchdog with servicing (32s timeout)
NAND: 0 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0 
STM32MP> NOTICE: CPU: STM32MP157CAC Rev.B
NOTICE: Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
NOTICE: Board: MB1272 Var2.0 Rev.C-01
NOTICE: BL2: v2.8-stm32mp1-r1.0(release):custom()
NOTICE: BL2: Built : 00:26:07, Apr 3 2024
NOTICE: BL2: Booting BL32
I/TC: Early console on UART#4
I/TC: 
I/TC: Pager is enabled. Hashes: 3264 bytes
I/TC: Pager pool size: 92kB
I/TC: Embedded DTB found
I/TC: OP-TEE version: Unknown_3.19 (gcc version 10.3.1 20210621 (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29))) #1 Tue Apr 2 1m
I/TC: WARNING: This OP-TEE configuration might be insecure!
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
I/TC: Primary CPU initializing
I/TC: Platform stm32mp1: flavor 157C_DK2 - DT stm32mp157c-dk2.dts
I/TC: DTB enables console (non-secure)
I/TC: HUK unlocked
I/TC: Primary CPU switching to normal world boot
optee optee: OP-TEE: revision 3.19


U-Boot 2022.10-stm32mp-r1.1 (Apr 03 2024 - 00:25:53 +0530)

CPU: STM32MP157CAC Rev.B
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157c-dk2)
Board: MB1272 Var2.0 Rev.C-01
DRAM: 512 MiB
optee optee: OP-TEE: revision 3.19
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
Core: 367 devices, 43 uclasses, devicetree: board
WDT: Started watchdog with servicing (32s timeout)
NAND: 0 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000

 

It would be great if you can provide me some details to boot stm32mp157c-dk2 board with v6.1 which is already release.

Thanks in advance!

Erwan SZYMANSKI
Technical Moderator
April 5, 2024

Hello @himanshubhavani ,

Can you take the Linux kernel provided by ST following this article ? https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package#Installing_the_components_to_develop_software_running_on_Arm_Cortex-A_-28OpenSTLinux_distribution-29

I think it will put you on the right track.

Kind regards,
Erwan.

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.
g.rađenović
Associate
September 19, 2024

Hi,

I am a software developer for embedded platforms. We are using STM32MP15x CPU Family in many products. Maintaining a kernel which is not mainline is not an easy task, and can be really a blocker when choosing a new CPU for new products/platforms. We are now evaluating CPU for a new platform, and STM32MP2x is one of the candidates.

So, I'll repeat a question, already asked here, do you have a plan to support STM32MP15x, and also STM32MP25x in mainline kernel?

Best regards
Goran