SDPS Command for 8ULP Details

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

SDPS Command for 8ULP Details

165 Views
Wei_Han
Contributor I

I'm trying to understand how the binary is stored and flashed to the EMMC for iMX8ULP.

 

uuu_version 1.2.39

# @_flash.bin            | bootloader
# @_image   [_flash.bin] | image burn to emmc, default is the same as bootloader

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin

FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
FB: flash bootloader _image
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
FB: Done

 

 

The shared SRAM controller has 7 ports, which are arbitrated to access the 768KB of SRAM Memory. The 7 ports, can access orthogonal regions of memory in parallel at the same time. The 768KB of SRAM Memory is partitioned into 8 blocks as shown by the table below.

 

I doubt when the `SDPS: boot -f _flash.bin` is inserted, where is the temporary storage to store the entire binary (flash.bin) as the SRAM is just around 768KB but the binary that I used is 1,777,664 bytes. Seem like the SRAM is not enough to fit in the entire binary.

Besides that, wondering what the flag used to indicate that the file already finished transferring so that the fast boot command can take over, and flash it into the emmc. 

 

 

0 Kudos
6 Replies

131 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

it is a rather big uboot bin that you are using. Also, please note that Uboot is copied to OCRAM which only have 256KB, which usually it is enough for Uboot.

This is controlled by the Fastboot driver on uboot, you may take a look to it.
https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/drivers/fastboot/fb_fsl/fb_fsl_command.c

Best regards/Saludos,
Aldo.

0 Kudos

121 Views
Wei_Han
Contributor I

Since my Uboot + SPL is already over 256KB, where it will be stored before loading to the EMMC? As the UUU still works with this "huge" binary.

 

Another Question is:

1. Is it the bootrom that will extract the u-boot from flash.bin and put it into the OCRAM? (Our own u-boot.bin is already over 256KB, it is around 934kb)

 

0 Kudos

101 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Please do accept my apologize for the confusion, you're right, having a look on both reference manual and imx-mkimage script, the only portion of the boot container that it is copied to OCRAM is SPL, while uboot is directly copied to DDR, this is handled by A35 Boot ROM.

Please have a look to the Reference manual chapter:
12 System boot flow
3.2.2 System memory map (Application domain)

And to the imx-mkimage script:
https://github.com/nxp-imx/imx-mkimage/blob/lf-6.6.3_1.0.0/iMX8ULP/soc.mak#L28

Best regards/Saludos,
Aldo.

0 Kudos

88 Views
Wei_Han
Contributor I

Just wondering, where is the place (a piece of code) to split the binary (flash.bin) into spl and u-boot as I study the SDPS in UUU seems like it just loads the entire binary using the USB_transfer. 

Besides that, is it whole binary sent to BootROM or piece by piece?  

0 Kudos

83 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

You're correct, UUU will only download the binary, it is the Boot ROM who actually place every piece of code in their respective address.

It is sent as a whole, but as said above the Boot ROM will handle the rest.

Best regards/Saludos,
Aldo.

0 Kudos

26 Views
Wei_Han
Contributor I

Hi,

Thanks for your reply. 

 

Just wondering for the bootRom copied the u-boot to DDR and SPL copied to the OCRAM was happened when we issued the SDPS or the FB:flashBootloder? If is the FB:flashbootloader, then when the SDPS occur, it use the USB transfer to transfer the binary and where it stored?

0 Kudos