2025-03-24 6:47 AM
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:
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.
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.
Flash Layout TSV Modifications:
I updated the TSV file to allocate a larger space for the FIP. Below is the relevant excerpt:
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!
Solved! Go to Solution.
2025-06-27 2:23 AM
Hi @Erwan SZYMANSKI
Any idea why i am not able to boot after flashing the image. Below is my flashlayout file i am using.
I have also attached my modified fip binary please have a look let me knwo if i am missing anything?
#Opt | Id | Name | Type | IP | Offset | Binary |
- | 0x01 | fsbl-boot | Binary | none | 0x0 | arm-trusted-firmware/tf-a-stm32mp157f-dk2-usb.stm32 |
- | 0x03 | fip-boot | FIP | none | 0x0 | fip/fip-stm32mp157f-dk2-optee-programmer-usb.bin |
P | 0x04 | fsbl1 | Binary | mmc0 | 0x00004400 | arm-trusted-firmware/tf-a-stm32mp157f-dk2-optee-sdcard.stm32 |
P | 0x05 | fsbl2 | Binary | mmc0 | 0x00044400 | arm-trusted-firmware/tf-a-stm32mp157f-dk2-optee-sdcard.stm32 |
P | 0x06 | metadata1 | FWU_MDATA | mmc0 | 0x00084400 | arm-trusted-firmware/metadata.bin |
P | 0x07 | metadata2 | FWU_MDATA | mmc0 | 0x000C4400 | arm-trusted-firmware/metadata.bin |
P | 0x08 | fip-a | FIP | mmc0 | 0x00104400 | modified/fip-stm32mp157f-dk2-optee-sdcard.bin |
PED | 0x09 | fip-b | FIP | mmc0 | 0x02104400 | none |
PED | 0x0A | u-boot-env | ENV | mmc0 | 0x02904400 | none |
P | 0x10 | bootfs | System | mmc0 | 0x02984400 | st-image-bootfs-openstlinux-weston-stm32mp15-disco.ext4 |
P | 0x11 | vendorfs | FileSystem | mmc0 | 0x06984400 | st-image-vendorfs-openstlinux-weston-stm32mp15-disco.ext4 |
P | 0x12 | rootfs | FileSystem | mmc0 | 0x12084400 | st-image-qt-openstlinux-weston-stm32mp15-disco.ext4 |
P | 0x13 | userfs | FileSystem | mmc0 | 0x112084400 | st-image-qt-userfs-openstlinux-weston-stm32mp15-disco.ext4 |
Looking forward to your response.
Thank you.