Avenger96 UMS Image Programming: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
Line 8: Line 8:
* Connect USB cable between USB OTG and PC host port and call the following from U-Boot command line.
* Connect USB cable between USB OTG and PC host port and call the following from U-Boot command line.
  ums 0 mmc 1  
  ums 0 mmc 1  
-> Mass storage is detected from the Host PC.
-> Mass storage is detected from the host PC.
* Now you can use balena etcher to flash the dh-image-demo to eMMC.
* Now you can use balena etcher to flash the dh-image-demo to eMMC.



Revision as of 09:41, 1 July 2022

Introduction

This guide is about how to flash the AV96 board via universal mass storage.

Start UMS mode in U-Boot and flash the image

  • Set Avenger96 boot mode to SPI boot.
  • Start the board and stop in U-Boot by pressing any key.
  • Connect USB cable between USB OTG and PC host port and call the following from U-Boot command line.
ums 0 mmc 1 

-> Mass storage is detected from the host PC.

  • Now you can use balena etcher to flash the dh-image-demo to eMMC.

Update U-Boot from USB stick

After the image update you will have the problem, that the originally flashed U-Boot is not capable to load the new Image. To fix this you have to update the U-Boot on the SPI flash:

  • Copy the U-Boot and SPL binaiers to a USB stick and plugin the flash drive at the AVenger96 Host port
  • Start U-Boot and set the following ENV variable:
env set update_sf 'usb start && env set loadaddr 0xc2000000 && env set loadaddr1 0xd2000000 && load usb 0 ${loadaddr1} u-boot-spl.stm32 && env set filesize1 ${filesize} && load usb 0 ${loadaddr} u-boot.itb && sf probe && sf erase 0 0x200000 && sf update ${loadaddr1} 0 ${filesize1} && sf update ${loadaddr1} 0x40000 ${filesize1} && sf update ${loadaddr} 0x80000 ${filesize} && env set filesize1 && env set loadaddr1'
  • Run the script
run update_sf
  • Restart the board -> New U-Boot will start up and will load the flashed dh-image-demo

Get the U-Boot binaries