Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Repository

Branch

Tag

Revision

https://github.com/nxp-imx/mfgtools

master

1.4.243

ed48c51

Procedure with uuu tool

  1. Create a text file named conga-qmx6-flash-spl.auto with the following content:

    Code Block
    languagec
    
    
    uuu_version 1.2.39
    
    # u-boot-with-spl.imx | boot bootloader with spl
    # SPL                 | spl to flash to spi flash
    # u-boot.img          | uboot-proper to flash to spi-flash
    
    # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
    SDP: boot -f u-boot-with-spl.imx
    
    # This command will be run when ROM support stream mode
    # i.MX8QXP, i.MX8QM, skip QSPI header
    SDPS: boot -f u-boot-with-spl.imx -skipfhdr
    
    # These commands will be run when use SPL and will be skipped if no spl
    # SDPU will be deprecated. please use SDPV instead of SDPU
    # {
    SDPU: delay 1000
    SDPU: write -f u-boot-with-spl.imx -offset 0x10000 -skipfhdr
    SDPU: jump
    # }
    
    # These commands will be run when use SPL and will be skipped if no spl
    # if (SPL support SDPV)
    # {
    SDPV: delay 1000
    SDPV: write -f u-boot-with-spl.imx -skipspl -skipfhdr
    SDPV: jump
    # }
    
    # erase first 1MiB (u-boot partition)
    FB: ucmd sf probe
    FB: ucmd echo "Flash Erase"
    FB[-t 40000]: ucmd sf erase 0 0x100000
    
    
    FB: ucmd setenv fastboot_buffer ${loadaddr}
    FB: download -f SPL
    
    # write SPL to offset 1k
    FB: ucmd echo "Flash SPL"
    FB[-t 20000]: ucmd sf write ${fastboot_buffer} 0x400 ${fastboot_bytes}
    
    # write u-boot to offset 64k
    FB: download -f u-boot.img
    FB: ucmd echo "Flash u-boot.img"
    FB[-t 30000]: ucmd sf write ${fastboot_buffer} 0x10000 ${fastboot_bytes}
    
    FB: done
    

Three firmware files from the u-boot build are needed to start the flash procedure. Please copy them into the same directory as the uuu tool and the flash script above reside.

  • u-boot-with-spl.imx: the bootloader used for flashing

  • SPL: spl part to write to SPI-flash

  • u-boot.img: uboot-proper (TPL) to write to SPI-flash

  1. Start uuu, e.g. on MS-Windows in a powershell environment:

    Code Block
    languagec
    > .\uuu.exe conga-qmx6-flash-spl.auto

  2. Configure the carrier board for recovery boot mode (on conga-QEVAL: M13.1 to ON), connect the module via USB OTG interface to the PC, and power on the module.

  3. Wait until update has finished (uuu shows “Success” and returns to console)

  4. Power off the board, disable the recovery boot mode (on QEVAL: M13.1 to OFF)

  5. Power on again the module, press any key to stop the boot, and load the default environment:

    Code Block
    languagec
    => env default -a
    
    => savee
    
    => reset 

Procedure live update

  1. Boot the module into the OS

  2. Erase the complete bootloader SPI flash partition

Code Block
# flash_erase /dev/mtd0 0 0
Info

Attention:

Do not power off or reset the board until the complete flash procedure has finished at the end of step 3. Otherwise the board will not boot anymore. To recover from this situation, an new firmware has to be programmed via uuu tool in recovery mode.

  1. Flash u-boot files

There are two files on different offsets to flash:

Code Block
# dd if =SPL of= /dev/mtd0 bs=1k seek=1
# # i f scripted: sleep about 2 seconds
# dd if =u-boot.img of= /dev/mtd0 bs=1k seek=64