Flash QSPI firmware using U-Boot

How to flash the uboot, kernel and RootFS on qspi using u-boot commands

  • Running TFTP-Server with the following files:
    • QSPI NOR image without rootf (uboot-*-qspi.img)
    • ubi partition for QSPI NOR (root.ubi)
  1. boot from SD-Card or eMMC and interrupt the boot process in U-Boot
  2. Configure the network in uboot:
    • ⇒ setenv autoload no
    • ⇒ setenv serverip <serverip> (TFTP Server adress, e.g.: setenv serverip 192.168.100.110)
    • ⇒ setenv ipaddr <ipaddr> (e.g.: setenv ipaddr 192.168.100.111)
    • ⇒ setenv netmask <netmask> (e.g.: setenv netmask 255.255.255.0)
  1. Download boot loader image from tftp server
    => tftp $loadaddr uboot-*-qspi.img 
  2. Initialize QSPI
    => sf probe 
  3. Write boot laoder image to QSPI
    => sf update $loadaddr 0 $filesize
  4. change the dip switch to boot from qspi

use these following commands only if the qspi has not yet been written and initialized to prevent the write counter from being overwritten

  1. Download RootFS image from tftp server
    => tftp $loadaddr root.ubi
  2. erase the qspi flash completely
    => sf erase RootFS 3800000
  3. write downloaded image to qspi
    sf write ${loadaddr} RootFS ${filesize}

Disclaimer
TQ-Systems GmbH provides the Board Support Packages (BSP) free of charge. The software included in the shipment has been configured individually for the starter kits. The software is only intended to evaluate the module. The use of the Board Support Packages (BSP) is only allowed within the scope of functionality described by TQ-Systems GmbH. TQ-Systems GmbH does not accept any liability for all further changes of the Board Support Package and for any damage resulting from its use.