Changes between Version 46 and Version 47 of jtag_instructions


Ignore:
Timestamp:
12/29/2022 08:03:51 PM (23 months ago)
Author:
Tim Harvey
Comment:

updated mkimage_jtag usage notes and examples

Legend:

Unmodified
Added
Removed
Modified
  • jtag_instructions

    v46 v47  
    193193
    194194Notes:
    195  - 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
     195 - 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
    196196 - the {{{-s}}} option invokes the 'scripted' mode which allows you to specify multiple objects
    197  - the {{{-e}}} option invokes the 'scripted' mode but also instructs {{{jtag_usbv4}}} to erase the entire part
    198  - 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
     197 - for eMMC:
     198  * you must use the {{{-s}}} scripted mode and the {{{-e}}} flag to erase the entire part does nothing special as the erase mode is specified for each blob
     199  * you can specify the '--partconf <boot0|boot1|user>' option to instruct {{{jtag_usbv4}}} to configure the eMMC to boot off the boot0, boot1, or user hardware partition
     200  * each blob must match the format <blob-file>@<hardware-partition>:<erase_mode>:<start-block>-[end-block] where:
     201   - hardware-partition specifies the eMMC hardware partition: boot0, boot1, or user
     202   - erase-mode specifies what type of erase mode to use:
     203     * erase_none - no erase
     204     * erase_all - erase the entire hardware partition from block 0 to end of device
     205     * erase_part - erase only part of the hardware partition specified by <start-block> and <end-block>
     206     * if end block is not specified it will default to the last block of the hardware partition
     207 - for NAND:
     208  - you do not need to use the {{{-s}}} scripted mode and can instead use the following legacy syntax:
     209    * mkimage_jtag <ubi> > firmware.bin # program ubi@17MB and erasing to the end of the device
     210    * mkimage_jtag <spl> <uboot> > firmware.bin # program the SPL and U-Boot only erasing 0 to 16MB (thus leaving U-Boot env and ubi in-tact)
     211    * mkimage_jtag <spl> <uboot> <ubi> > firmware.bin # erase entire part and program the SPL, U-Boot, and UBI
     212  - if you wish to erase the entire NAND part use the {{{-e}}} flag which also specifies scripted mode
    199213
    200214Examples:
    201  * Newport eMMC:
    202   - update the boot firmware and set the hardware partition and erase the entire part:
    203 {{{#!bash
    204 ./mkimage_jtag --emmc -e --partconf=user firmware-newport.img@user:erase_all:0-16M > firmware-newport.bin
     215 * eMMC:
     216  - configure the eMMC to boot from the user hardware partition, program the boot firmware to the user hardware partition but only erase from block 0 to block 32768 (0 to 16MiB):
     217{{{#!bash
     218./mkimage_jtag --emmc -s --partconf=user firmware.img@user:erase_part:0-32768 > firmware.bin
     219}}}
     220  - configure the eMMC to boot from the user hardware partition, program the boot firmware to the user hardware partition and erase the entire user hardware partition:
     221{{{#!bash
     222./mkimage_jtag --emmc -s --partconf=user firmware.img@user:erase_all:0-32768 > firmware.bin
    205223}}}
    206224 * Ventana NAND: (see wiki:ventana/bootloader#nand here for NAND flash map)
     
    209227./mkimage_jtag SPL u-boot.img > uboot.bin
    210228}}}
    211   - update just the rootfs (does not touch boot firmware):
     229  - program a UBI image erasing to the end of the device (does not touch boot firmware):
    212230{{{#!bash
    213231./mkimage_jtag openwrt-ventana-rootfs.ubi > image.bin
    214232}}}
    215   - update the boot firmware and the root filesystem (erases entire flash):
     233  - program boot firmware and a UBI (erases entire flash):
    216234{{{#!bash
    217235./mkimage_jtag SPL u-boot.img openwrt-ventana-rootfs.ubi > image.bin
    218236}}}
    219  - Program U-boot SPL, env, and erase entire part
     237  - program U-boot SPL, env, and erase entire part using scripted mode
    220238{{{#!bash
    221239mkimage_jtag -e SPL@0 u-boot.img@14M env@16M > image.bin
    222 }}}
    223  - Program U-boot SPL and erase entire part
    224 {{{#!bash
    225 mkimage_jtag -e SPL@0 u-boot.img@14M > image.bin
    226240}}}
    227241