Changes between Version 71 and Version 72 of newport


Ignore:
Timestamp:
07/31/2018 09:00:06 PM (6 years ago)
Author:
Cale Collins
Comment:

Restructured page, moved information from /Newport pertaining to newport/firmware

Legend:

Unmodified
Added
Removed
Modified
  • newport

    v71 v72  
    9999 * ​[http://www.cavium.com/pdfFiles/OCTEON-TX-CN80XX-CN81XX-Product-Brief-Rev1.pdf OCTEON TX CN80XX-CN81XX Product Brief]
    100100
     101= Firmware, BSP (OS), GSC Update Procedures
     102
     103[wiki:/newport/firmware See this page for all firmware related information]
     104
     105[wiki:/newport/firmware#UpdateFirmwareviaSerialConsoleandEthernetfromBootloader Jump to img.gz installation procedure using bootloader, serial, and tftp]
     106
    101107= Newport Ethernet =
    102108
     
    115121
    116122
    117 [=#firmware-version]
    118 = Firmware Versioning =
    119 
    120 You can determine the firmware version of various portions of the firmware by looking for banners on the serial console. For example:
    121 {{{#!bash
    122 Gateworks Newport SPL (ea21abc Tue Dec 12 23:42:48 UTC 2017)
    123 
    124 GSC     : v49 0x832c WDT:disabled board temp:61C
    125 RTC     : 0
    126 Model   : GW6304-B
    127 ...
    128 NOTICE:  BL1: v1.3(release):OCTEONTX_SDK_6_2_0_build_26
    129 NOTICE:  BL1: Built : 15:30:07, Dec  4 2017
    130 ...
    131 U-Boot 2017.09-rc1-00023-g1fd1415 (Dec 12 2017 - 15:42:30 -0800) for Cavium OcteonTX CN81XX ARM V8 Core
    132 ...
    133 [    0.000000] Linux version 4.14.4-00005-g9e5958b (tharvey@tharvey) (gcc version 5.3.0 (Cavium Inc. Version 0.99 build 440)) #141 SMP PREEMPT Fri Dec 15 10:18:19 PST 2017
    134 ...
    135 Ubuntu 16.04 LTS xenial-newport ttyAMA0
    136 ...
    137 }}}
    138  - The above output shows you:
    139   * Secondary Program Loader (SPL) is 'ea21abc' built on Tue Dec 12 23:42:48 2017. The git sha of 'ea21abc'.
    140   * GSC v49 0x832c
    141   * ATF (ARM Trusted Firmware) is v1.3 built on Dec 4 2017.
    142   * U-Boot is '2017.09-rc1-00023-g1fd1415' built on Dec 12 2017.
    143   * Linux version 4.14.4-00005-g9e5958b built on Fri Dec 15 10:18:19 PST 2017
    144   * Ubuntu 16.04 (aka xenial) OS (use {{{dpkg -l | grep "^ii"}}} to see what packages and versions are installed
    145 
    146 If you want more detail on the versions of the various components of the [wiki:newport/boot Boot Firmware] you can look at the {{{version}}} file created/placed by the Newport BSP Makefile in the FAT12 filesystem. See [wiki:newport/boot#version newport/boot/version] for details.
    147 
    148 
    149 [=#firmware-update]
    150 = Updating Firmware =
    151 This section provides instructions for updating both GSC firmware as well as boot device firmware.
    152 
    153 There are two methods for updating firmware:
    154  * on a live board using Serial Console and Ethernet ('''Note that currently the eMMC FLASH can only be updated on a live board booted from either eMMC or microSD''')
    155  * on removable storage (ie recovery microSD)
    156  * using a GW16099 JTAG dongle (see [#jtag below]) ('''Note that currently only the GSC firmware can be updated via JTAG''')
    157 
    158 The various items that can be updated:
    159  * GSC Firmware - currently only JTAG updates are supported for Newport - see [#jtag-gsc below]
    160  * Boot Firmware (Everything up to and including the Bootloader) - currently must be updated from U-Boot or Linux on a live system - see [#serial-ethernet below]
    161  * Root Filesystem (Operating System) - currently must be updated from U-Boot or Linux on a live system - see [#serial-ethernet below]
    162 
    163 
    164 [=#serial-ethernet]
    165 == Update Firmware via Serial Console and Ethernet ==
    166 The quickest and easiest way to update your firmware is via Serial Console and Ethernet. You can do this either in the U-Boot bootloader (recommended) or within a Linux OS. If your primary boot device is corrupt, then you can boot via an alternate boot device (ie microSD) - see [#recovery newport/recovery] for details.
    167 
    168 
    169 [=#serial-ethernet-uboot]
    170 === Update Firmware via Serial Console and Ethernet from Bootloader ===
    171 If updating firmware via !Bootloader/Serial/Ethernet (recommended for speed) you need to setup a TFTP server to host the files for transfer. Alternatively you could load firmware files from removable storage (microSD, mSATA, or USB for example) however the transfer rate is typically very slow compared to Gigabit Ethernet. For details on setting up a TFTP server see [wiki:tftpserver here].
    172 
    173 The following instructions assume your board target IP address is 192.168.1.1 and you have a TFTP server at 192.168.1.146. Adjust environment according to your network via 'setenv ipaddr <ipaddr>' and 'setenv serverip <serverip>'.
    174 
    175 Note that the {{{dev}}} variable needs to be set to the MMC device you are updating:
    176  * setenv dev 0 # boot device
    177  * setenv dev 1 # secondary device
    178  * use {{{mmc list}}} to see how they are configured
    179 
    180 The methods you use to update the firmware depends on what specifically you are trying to update.
    181 
    182 Update the entire device from a Compressed Disk Image ('[wiki:newport/boot boot firmware]' as well as OS):
    183 {{{#!bash
    184 setenv dev 0 # use 'mmc list' to show which device to use for eMMC vs microSD
    185 tftpboot ${loadaddr} xenial-newport.img.gz && gzwrite mmc ${dev} ${loadaddr} ${filesize}
    186 }}}
    187   - **If the image was created using a minimally sized filesystem you will want to resize it after booting to take advantage of the full partition space. For an {{{ext4}}} root filesystem on the primary MMC device run {{{resize2fs /dev/mmcblk0p2}}}.**
    188 
    189 To summarize:
    190 {{{#!bash
    191 setenv ipaddr 192.168.1.1 # sets device IP
    192 
    193 setenv serverip 192.168.1.146 # sets TFTP server IP
    194 
    195 setenv dev 0 # sets MMC device to be flashed
    196 
    197 tftpboot ${loadaddr} xenial-newport.img.gz && gzwrite mmc ${dev} ${loadaddr} ${filesize} # will flash xenial-newport.img.gz which resides in the top most directory of the TFTP server 
    198 }}}
    199 
    200 Updating just the kernel can be done with {{{tftpboot}}} and {{{fatwrite}}}:
    201 {{{#!bash
    202 # kernel
    203 tftpboot $loadaddr kernel.itb && fatwrite mmc $dev:1 $loadaddr kernel.itb $filesize
    204 # bootscript
    205 tftpboot $loadaddr newport.scr && fatwrite mmc $dev:1 $loadaddr newport.scr $filesize
    206 }}}
    207 
    208 Updating the [wiki:newport/boot 'Boot firmware'] (everything up to and including the Bootloader):
    209 On a Newport booted to the bootloader:
    210 {{{#!bash
    211 mmc dev 0 # use 'mmc list' to show which device to use for eMMC vs microSD
    212 tftpboot ${loadaddr} firmware-newport.img && mmc write ${loadaddr} 0 8000 # update first 16MB
    213 mmc rescan # re-scan the mmc devices in case the partition table changed
    214 }}}
    215 
    216 Incorrect or out of date Boot Firmware may result in the analogue to digital conversion or registers being misinterpreted, in example:
    217 {{{#!bash
    218 GSC     : v51 0x859f WDT:disabled board temp:3276C
    219 RTC     : 0
    220 Model   : GW6300-B
    221 MFGDate : 12-13-2017
    222 Serial  : 757565
    223 DTB     : gw6300.dtb
    224 SoC     : CN8020-850BG676-SCP-P12-G 1024KB 850/500MHz 0xa2 Pass 1.2
    225 MMC0    : eMMC
    226 MMC1    : not detected
    227 Boot    : eMMC non-trusted
    228 DRAM    : 1024 MB, 1333 MT/s, DDR4 UDIMM
    229 J9      : PCI
    230 J10     : PCI
    231 J11     : PCI
    232 QLM0    : PCIE_1X1@5000MHz
    233 QLM1    : SGMII_1X1@1250MHz
    234 QLM2    : PCIE_1X1@5000MHz
    235 QLM3    : PCIE_1X1@5000MHz
    236 Serial  : 2x RS232 without flow control
    237 PEM0    : QLM0 Link Timeout
    238 PEM1    : QLM2 Link Timeout
    239 PEM2    : QLM3 Link Timeout
    240 temp    : 32765 - Failed High: 9000
    241 vin     : 7798784 - Failed High: 60000
    242 3p3     : 137088 - Failed High: 3630
    243 5p0     : 84481 - Failed High: 5500
    244 0p9     : 107521 - Failed High: 990
    245 core    : 8782184 - Failed High: 946
    246 1p2     : invalid
    247 2p5     : invalid
    248 1p0     : invalid
    249 1p5     : invalid
    250 1p8     : invalid
    251 anl     : invalid
    252 }}}
    253 
    254 
    255 
    256 [=#serial-ethernet-linux]
    257 === Update Firmware via Serial Console and Ethernet from Linux ===
    258 If booted to Linux on a board you can also update the kernel and bootscript fairly easily by mounting the FAT12 filesystem and copying the file(s):
    259 {{{#!bash
    260 mount /dev/mmcblk0p1 /mnt
    261 cp kernel.itb /mnt
    262 cp newport.scr /mnt
    263 }}}
    264 
    265 You can also easily update the [wiki:newport/boot 'Boot Firmware']. First prepare a boot image that contains your desired partition table, boot firmware, kernel, bootscript and U-Boot environment (see example above). Then on a booted Newport:
    266 {{{#!bash
    267 cd /tmp
    268 wget http://dev.gateworks.com/newport/boot_firmware/firmware-newport.img
    269 dd if=firmware-newport.img of=/dev/mmcblk0
    270 }}}
    271  * Note above we are writing to {{{/dev/mmcblk0}}} and not a partition
    272  * Use {{{/dev/mmcblk1}}} for the secondary MMC device (ie microSD)
    273  * Note that Newport boards only supports MMC based boot devices
    274  *  **Note that this overwrites the partition-table, the U-Boot environment, and the FAT12 filesystem which are things you might have customizations in.**
    275 
    276 Note that if you want to update the root filesystem itself from within Linux you can only do this by either:
    277  a) updating portions of the live filesystem that are not in use (ie package updates)
    278  b) booting to a kernel+ramdisk (ie [wiki:buildroot buildroot) and imaging the disk
    279123
    280124
     
    296140tftpboot ${loadaddr} firmware-newport.img && mmc write ${loadaddr} 0 8000
    297141}}}
    298 
    299 
    300 [=#jtag]
    301 == JTAG Programming ==
    302 The Gateworks JTAG adapter (GW16099) is available in the Newport Dev Kit as well as on the Gateworks web store [http://shop.gateworks.com/index.php?route=product/category&path=70_80 here]
    303 
    304 All Newport boards have a 10-pin JTAG header which provides:
    305  * JTAG Programming for embedded FLASH - see [wiki:jtag_instructions here] for instructions
    306  * Serial Console access via UART0 (/dev/ttyAMA0)
    307 
    308 Please Note:
    309  * '''Linux software is supported for programming Newport (jtag_usbv4 required).''' Windows is not supported at this time.''' (serial console through Windows does work).
    310  * '''JTAG Programming of eMMC has not been made available yet'''. You must boot from a microSD image to program or re-program eMMC flash
    311  * '''JTAG Programming of the GSC firmware is supported by the most recent version of jtag_usbv4''' [http://svn.gateworks.com/jtag/linux/x86/jtag_usbv4 here]
    312 
    313 [=#jtag-gsc]
    314 === Update GSC Firmware via JTAG ===
    315 To update the GSC firmware via JTAG download the {{{jtag_usbv4}}} application on a Linux x86 host from [http://svn.gateworks.com/jtag/linux/x86/jtag_usbv4 here] and execute as follows:
    316 {{{#!bash
    317 ./jtag_usbv4 -m gsc_630x_v49.txt
    318 }}}
    319 
    320 Note that the {{{ftdi_sio}}} kernel module must not be loaded (sudo rmmod ftdi_sio) and you may need to run this command as root by pre-pending a sudo depending on the configuration of your linux host.
    321 
    322 For more details please see:
    323  * [wiki:jtag Gateworks JTAG wiki page]
    324 
    325142
    326143[=#bootdevice]