Skip to main content
Associate II
July 30, 2025
Solved

How to boot Linux with initramfs loaded by dfu-util (without manual U-Boot commands)?

  • July 30, 2025
  • 1 reply
  • 469 views
Hello ST Community,

I am working with an STM32MP2-based board and would like to load an initramfs image into DDR RAM using dfu-util and then boot it without having to manually enter U-Boot commands.
 
I have tried to follow the documentation, specifically:
Here are my observations:
  • When using a flashlayout, after transferring the images, U-Boot does not boot the kernel automatically — it stops at the U-Boot prompt and waits for manual commands.
  • When using a U-Boot script (as described in the documentation), I am able to transfer artifacts for ramfs in DFU mode, but when I attempt to load the kernel (alt=0), the process hangs: and after about 30 seconds to 1 minute the board resets itself (as if by a hard reset).
  • I have tried both compressed (Image.gz) and uncompressed (Image) kernel images, with the same result.
 
My questions:
  • Is it possible to load and boot a Linux kernel with initramfs in RAM using dfu-util, so that the system boots automatically without manual U-Boot interaction?
  • If so, could you please clarify the correct procedure, or point out what I might be doing wrong?
Any advice, example scripts, or working flashlayouts would be greatly appreciated!
Thank you in advance for your help.
Best regards,
Nikolai
This topic has been closed for replies.
Best answer by Nikolai_Navrotski
Hello ST Community,
 
I managed to solve the issue. The problem was caused by incorrect RAM addresses in the DFU alternate settings.
Adding the following line to my U-Boot defconfig fixed it:
CONFIG_DFU_ALT_RAM0="uImage ram 0x84000000 0x2000000;devicetree.dtb ram 0x86000000 0x100000;uramdisk.image.gz ram 0x86400000 0x10000000"
 

1 reply

Nikolai_NavrotskiAuthorBest answer
Associate II
August 8, 2025
Hello ST Community,
 
I managed to solve the issue. The problem was caused by incorrect RAM addresses in the DFU alternate settings.
Adding the following line to my U-Boot defconfig fixed it:
CONFIG_DFU_ALT_RAM0="uImage ram 0x84000000 0x2000000;devicetree.dtb ram 0x86000000 0x100000;uramdisk.image.gz ram 0x86400000 0x10000000"