On Fri, May 10, 2024 at 4:19 PM Fabio Estevam <feste...@gmail.com> wrote: > > Hi, > > I am using an imx8mp-evk board and I can flash the U-Boot into the > eMMC hardware partition 0 by running: > > => tftpboot $loadaddr flash.bin > => setexpr blkcnt $filesize + 0x1ff && setexpr blkcnt $blkcnt / 0x200 > => mmc dev 2 1 > => mmc write $loadaddr 0 $blkcnt > > Now I want to do the same via UUU. > > I tried to create a script called emmc_flash: > > uuu_version 1.5.21 > > SDPS: boot -f flash.bin > SDPS: done > FB: ucmd setenv fastboot_dev mmc > FB: ucmd mmc dev 2 1 > FB: flash bootloader flash.bin > FB: Done > > Then on the PC: uuu emmc_flash > > U-Boot is loaded to RAM, but the eMMC hardware partition is not programmed. > > What is the correct script for doing this? > > Any suggestions?
Create an lst file Hi Fabio Top posting # @_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 # 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 You can just change as you want. We have this file in buildroot, uuu can run command on the device using FB command. Example how call it ${OUTPUT_DIR}/host/bin/uuu -v -b ${IMAGES_DIR}/nand-full.lst \ ${IMAGES_DIR}/flash.bin \ ${IMAGES_DIR}/flash.bin \ ${IMAGES_DIR}/rootfs.ubifs \ ${IMAGES_DIR}/Image \ ${IMAGES_DIR}/freescale/imx8mn-bsh-smm-s2.dtb Michael > > Thanks -- Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 mich...@amarulasolutions.com __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 i...@amarulasolutions.com www.amarulasolutions.com