imx91: mmc write offset to user partition

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx91: mmc write offset to user partition

Jump to solution
222 Views
stoejs
Contributor II

Hi there,
I'm trying to find the correct offset to write flash.bin into the user partition
via mmc. My lst file, the write command is in the second to last line:

uuu_version 1.2.39

SDPS: boot -f ./flash.bin

SDPV: delay 1000
SDPV: write -f ./flash.bin -skipspl
SDPV: jump

FB: ucmd env set fastboot_buffer 0x80000000
FB: ucmd mmc erase 0x0 0x2000
FB: download -f ./flash.bin
FB: ucmd setexpr filesize $filesize + 0x1ff
FB: ucmd setexpr sectors $filesize / 0x200
FB: ucmd mmc write 0x80000000 64 $sectors
FB: Done

There is a emmc memory map in IMX91RM (9.8.2.4), which states that there are several unused areas.
I tried several offsets, e.g. 0x8000 == 32 kB resolving with block size 512 kB to 64.
Is this the right way?

I know about uuu's -b emmc, but I want to write the binary to the user partition
as the environment needs to be able to be changed from userland later.

Any help is appreciated.

0 Kudos
Reply
1 Solution
167 Views
kawateb265
Contributor II

You can refer to the following link for a demo on the user partition of the iMX secondary boot, which shows how to write the image to different offsets.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-secondary-boot-collection/ta-p/19169...

View solution in original post

2 Replies
168 Views
kawateb265
Contributor II

You can refer to the following link for a demo on the user partition of the iMX secondary boot, which shows how to write the image to different offsets.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/iMX-secondary-boot-collection/ta-p/19169...

99 Views
stoejs
Contributor II
Thank you. 0x40 is the offset I was looking for.
0 Kudos
Reply