Reloading U-Boot Using a JTAG Programmer Print

In case you have accidentially erased U-Boot in the NAND Flash of the i.MX 6ULL SOM, perform the following steps to reload U-Boot:

  1. Install the latest openocd-0.10.0 to the host.
  2. Connect to the i.MX 6ULL SOM serial console using a terminal application.
  3. Connect JTAG between P3 on the IMX6ULL-SOM-BSB development host and the host.
  4. On the host, run openocd as root (imx6ull.cfg, imx6ull-som.cfg, mfg-jtag.cfg):
  5. openocd -l /dev/null -f imx6ull-som.cfg &
    telnet localhost 4444

  6. Load the u-boot-dtb.imx image to the SOM. Run at the openocd prompt:
  7. reset init
    load_image u-boot-dtb.imx 0x877ff400
    resume 0x87800000

  8. At this point, you should have U-Boot running in the target console.
  9. Stop at the U-Boot prompt, configure networking and install the Emcraft release kernel, DTB and rootfs.ubi images using update, dtbupdate and rootfsupdate U-Boot macros.
  10. Boot the board to the shell prompt with run bootcmd.
  11. At the shell prompt, run:
  12. kobs-ng init -x --search_exponent=1 -v /u-boot.imx

Sometimes openocd gets stuck on JTAG errors. Turn everything on and off and retry.