Changes between Version 16 and Version 17 of jtag_instructions


Ignore:
Timestamp:
12/07/2018 10:37:06 PM (6 years ago)
Author:
Tim Harvey
Comment:

added mkimage_jtag instructions for newport

Legend:

Unmodified
Added
Removed
Modified
  • jtag_instructions

    v16 v17  
    200200
    201201
    202 [=#ventana-images]
    203 === Creating jtagable images for Ventana ===
    204 
    205 [https://youtu.be/i3G8sQlwzcU Click here for instructional video baised on this section, mkimage and jtag_usbv4 are demonstrated]
    206 
    207 In order to create a jtagable image for our Ventana family line, you can use our [http://dev.gateworks.com/ventana/images/mkimage_jtag mkimage_jtag] script which can be downloaded [http://dev.gateworks.com/ventana/images/mkimage_jtag here]. (You may need to chmod the mkimage_jtag script to make executable. Be sure it does not have any extension such as txt) The usage varies, depending on typical use cases. For example, you can create jtagable images that only update the bootloader without erasing all of NAND. You can also create jtagable images with both the bootloader and a ubi image which will erase all of nand. Below are several examples on how to use this script. Also note that the script outputs to std out, so in the examples below, we redirect it to a file.
    208 
    209 Necessary files:
    210 * [http://trac.gateworks.com/attachment/wiki/jtag_instructions/SPL SPL]
    211 * [http://trac.gateworks.com/attachment/wiki/jtag_instructions/u-boot.img u-boot.img]
    212 
    213 To update just the bootloader, create a jtagable image with just the two parts:
    214 {{{
    215 $ ./mkimage_jtag SPL u-boot.img > uboot.bin
    216 }}}
    217 
    218 To update both the bootloader and rootfs (ubi)
    219 {{{
    220 $ ./mkimage_jtag SPL u-boot.img openwrt-ventana-rootfs.ubi > image.bin
    221 }}}
    222 
    223 To update just the rootfs
    224 {{{
    225 $ ./mkimage_jtag openwrt-ventana-rootfs.ubi > image.bin
     202[=#images]
     203=== Creating jtagable binary images with mkimage_jtag
     204
     205[https://youtu.be/i3G8sQlwzcU Click here for instructional video based on this section, mkimage and jtag_usbv4 are demonstrated]
     206
     207In order to create a jtagable image for Newport and Ventana products, you need to use the {{{mkimage_jtag}}} script to create a binary file containing flash instructions and content used by the {{{jtag_usbv4}}} application. You can download the latest version of the script [http://dev.gateworks.com/ventana/images/mkimage_jtag here]:
     208{{{#!bash
     209wget http://dev.gateworks.com/ventana/images/mkimage_jtag
     210chmod +x mkimage_jtag
     211}}}
     212
     213The usage varies, depending on what you want to program, how, and where. For example, you can create images that only update the boot firmware without touching the rest of flash. In general you provide binary files and details on where to place them and what to erase.
     214
     215Notes:
     216 - for eMMC you can specify the '--partconf <boot0|boot1|user>' option to instruct {{{jtag_usbv4}}} to set the eMMC register that specifies the hardware to boot from
     217 - the {{{-s}}} option invokes the 'scripted' mode which allows you to specify multiple objects
     218 - the {{{-e}}} option invokes the 'scripted' mode but also instructs {{{jtag_usbv4}}} to erase the entire part
     219 - Because JTAG is extremely slow for large flash parts such as eMMC it is advised that you use JTAG just to flash the boot firmware then use the boot firmware to flash the remainder of the device
     220
     221Examples:
     222 * Newport eMMC:
     223  - update just the boot firmware and set the hardware partition:
     224{{{#!bash
     225./mkimage_jtag --emmc -s --partconf=user firmware-newport.img@user:erase_part:0-16 > firmware-newport.bin
     226}}}
     227  - update the boot firmware and set the hardware partition and erase the entire part:
     228{{{#!bash
     229./mkimage_jtag --emmc -e --partconf=user firmware-newport.img@user:erase_all:0-16 > firmware-newport.bin
     230}}}
     231 * Ventana NAND: (see wiki:ventana/bootloader#nand here for NAND flash map)
     232  - update just the boot firmware (SPL and u-boot):
     233{{{#!bash
     234./mkimage_jtag SPL u-boot.img > uboot.bin
     235}}}
     236  - update just the rootfs (does not touch boot firmware):
     237{{{#!bash
     238./mkimage_jtag openwrt-ventana-rootfs.ubi > image.bin
     239}}}
     240  - update the boot firmware and the root filesystem (erases entire flash):
     241{{{#!bash
     242./mkimage_jtag SPL u-boot.img openwrt-ventana-rootfs.ubi > image.bin
    226243}}}
    227244
    228245Once these steps are complete and the bin file has been generated, follow the other instructions on this page to flash this .bin file to the board. Linux instructions for programming are here [#linux-jtag-flashing]
    229246
    230 ==== Troubleshooting mkimage_jtag ====
    231  1. Be sure the mkimage_jtag script does not have any file extensions such as txt. If so, rename it to mkimage_jtag
    232  2. Be sure the mkimage_jtag script has executable permissions. If not, run the command:
    233 {{{
    234 chmod 777 mkimage_jtag
    235 }}}
     247Troubleshooting:
     248 * If downloaded from a browser, make sure the {{{mkimage_jtag}}} script does not have any file extensions such as txt and be sure is has executable permissions.
    236249
    237250