Files
rpi-buildroot/board/bsh/imx8mn-bsh-smm-s2/nand-full.lst
Michael Trimarchi 97ac89eb11 board/bsh/imx8mn-bsh-smm-s2: erase the entire NAND chip
If an attempt is made to create a UBI volume and it already exists, the
operation fails. Therefore, before requesting the creation of a UBI
volume, we erase the entire NAND to ensure that no errors occur.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2025-05-17 12:46:17 +02:00

32 lines
1.0 KiB
Plaintext

# @_flash.bin | bootloader
# @_image [_flash.bin] | image burn to nand, default is the same as bootloader
# @_filesystem | filesystem to burn
# @_kernel | kernel image
# @_dtb | dtb image
# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -f _flash.bin
FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f _image
FB[-t 10000]: ucmd nand erase.chip
# Burn image to nandfit partition if needed
FB: ucmd if env exists nandfit_part; then nand erase.part nandfit; nand write ${fastboot_buffer} nandfit ${filesize}; else true; fi;
FB: ucmd nandbcb init ${fastboot_buffer} nandboot ${filesize}
FB[-t 10000]: ucmd ubi part nandrootfs
FB[-t 10000]: ucmd ubi create root -
FB: download -f _filesystem
FB[-t 60000]: ucmd ubi write ${loadaddr} root ${filesize}
FB: download -f _kernel
FB[-t 10000]: ucmd nand write ${loadaddr} nandkernel ${filesize}
FB: download -f _dtb
FB[-t 8000]: ucmd nand write ${loadaddr} nanddtb ${filesize}
FB: reboot
FB: done