cancel
Showing results for 
Search instead for 
Did you mean: 

Direct Kernel Boot on STM32MP1

HZ890
Associate

Hi everyone,

I'm attempting to optimize the boot process on my STM32MP157F-DK2 board by removing U-Boot and booting the Linux kernel directly via the FIP. I've followed the documented steps for STM32MP1:

  1. TF-A BL2 Modifications:

    • Updated STM32MP_BL33_BASE and STM32MP_BL33_MAX_SIZE in the STM32MP1 header file.

    • Increased the SDMMC timeout in stm32_sdmmc2.c to accommodate the larger kernel image.

  2. FIP Creation:

    • Recompiled TF-A with my modifications.

    • Created a new FIP where I replaced the U-Boot binary and its DTB with my Linux kernel Image and DTB.

    • The new FIP (fip.bin) now contains the kernel and DTB.

  3. Flash Layout TSV Modifications:
    I updated the TSV file to allocate a larger space for the FIP. Below is the relevant excerpt:

    HZ890_0-1742823828143.png

Despite these modifications, every time I execute the process, it fails. My questions are:

  • What is the purpose of the bootfs partition?
    Since my new FIP (fip.bin) already contains the Linux kernel and its DTB, I'm unclear why the flash layout still reserves a bootfs partition. Is it meant for additional boot configurations, an initial ramdisk, or something else?

  • Why is the u-boot-env partition still present?
    If U-Boot is being removed entirely from the boot chain, what role does the U-Boot environment play here? Is it kept for legacy or recovery purposes?

I would really appreciate any insights or suggestions on what might be going wrong or what additional changes I need to consider for a successful direct kernel boot setup on STM32MP157f-dk2.

Thanks in advance for your help!

2 REPLIES 2
Erwan SZYMANSKI
ST Employee

Hello @HZ890 ,
Can you please precise a bit the status when you says "everytime I execute the process it fails" ? Do you talk at boot time or during the preparation process ? 

Do you have some error logs or anything to share ? 

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.

Dear Erwan SZYMANSKI,

I received the following error during the boot time process:

 

NOTICE: CPU: STM32MP157FAC Rev.Z NOTICE: Model: STMicroelectronics STM32MP157F-DK2 Discovery Board NOTICE: Board: MB1272 Var4.0 Rev.C-03 NOTICE: BL2: v2.10-stm32mp1-r1.0(release):() NOTICE: BL2: Built : 11:26:24, Apr 7 2025 ERROR: BL2: Failed to load image id 1 (-27)

If you have any pointers or an example with those platforms, it would be much appreciated.

Best Regards,
Hassan