cancel
Showing results for 
Search instead for 
Did you mean: 

Boot mainline kernel with stm32mp157c-dk2

himanshubhavani
Associate II

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!

5 REPLIES 5
Erwan SZYMANSKI
ST Employee

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.

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!

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.

Hello @Erwan SZYMANSKI ,

STM Linux kernel v6.1.28 is up and running.

But I want to run Mainline Linux kernel 6.1 on stm32mp157c-dk2. I could see the dts for this board "stm32mp157c-dk2" is already available in mainline kernel.

How can I test Mainline Linux kernel v6.1 on stm32mp157c-dk2?

Thanks and Regards,

Himanshu Bhavani

@himanshubhavani ,
Which Linux Kernel configuration did you apply to your mainline kernel ? The one provided by ST for its board ? 

Why do you need the mainline kernel running on your platform ? 

Rgs,
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.