Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read files in u-boot

Tags:

file

linux

u-boot

How can I read the file which is located on boot partition in u-boot? I can use fatload to read this file to ram but how then I can read it? I can write some additional command by u-boot makro U_BOOT_CMD but don't know how to use emmc and file there.

like image 298
M4xell Avatar asked Dec 06 '25 10:12

M4xell


2 Answers

You could probably use a two steps approach, this would avoid using emmc specific code in your u-boot custom command:

  1. loading the file into memory,
  2. use a custom u-boot command for reading it from memory.

For example:

fatload mmc 0 0x3000000 file.bin
m4xell 0x3000000

Your custom m4xell u-boot command would then be able to access the file content at 0x3000000.

like image 96
Frant Avatar answered Dec 09 '25 02:12

Frant


You can use the mm command to display the memory content.

You can run the the UEFI shell using the bootefi command. Inside the UEFI shell the edit command can display files. The UEFI shell is delivered with Tianocore EDK II.

like image 27
Xypron Avatar answered Dec 09 '25 02:12

Xypron