| 125 | [=#firmware-version] |
| 126 | = Firmware Versioning = |
| 127 | You can determine the firmware version of various portions of the firmware by looking for banners on the serial console. For example: |
| 128 | {{{#!bash |
| 129 | Gateworks Newport SPL (ea21abc Tue Dec 12 23:42:48 UTC 2017) |
| 130 | |
| 131 | GSC : v49 0x832c WDT:disabled board temp:61C |
| 132 | RTC : 0 |
| 133 | Model : GW6304-B |
| 134 | ... |
| 135 | NOTICE: Booting Trusted Firmware |
| 136 | NOTICE: BL1: v1.3(release):OCTEONTX_SDK_6_2_0_build_26 |
| 137 | NOTICE: BL1: Built : 15:30:07, Dec 4 2017 |
| 138 | NOTICE: CHIP UniqueID not set |
| 139 | ... |
| 140 | U-Boot 2017.09-rc1-00023-g1fd1415 (Dec 12 2017 - 15:42:30 -0800) for Cavium OcteonTX CN81XX ARM V8 Core |
| 141 | ... |
| 142 | }}} |
| 143 | - The above shows the version of the BDK used as the Secondary Program Loader (SPL) is 'ea21abc' built on Tue Dec 12 23:42:48 2017. The git sha of 'ea21abc'. |
| 144 | - The above shows the version of the ATF (ARM Trusted Firmware) is v1.3 built on Dec 4 2017. |
| 145 | - The above shows the version of U-Boot is '2017.09-rc1-00023-g1fd1415' built on Dec 12 2017. |
| 146 | |
| 147 | |
| 186 | |
| 187 | |
| 188 | [=#microsd] |
| 189 | == Creating a microSD recovery image == |
| 190 | If your primary boot won't boot for some reason (ie, you corrupted it during development) you can boot from a microSD (see [#bootdevice here]). |
| 191 | |
| 192 | To create a bootable microSD meant for recovery purposes only needing the Bootloader you can use [https://github.com/Gateworks/images-newport/raw/master/firmware-newport.img firmware-newport.img]: |
| 193 | * On a Linux host: |
| 194 | {{{#!bash |
| 195 | DEVICE=/dev/sdc # set to the microSD on your host |
| 196 | sudo dd if=firmware-newport.img of=$DEVICE |
| 197 | }}} |
| 198 | - '''Be careful to set the DEVICE above to the device the microSD appears as on your Linux host - you do not want to overwrite part of your hosts filesystem''' |
| 199 | * On a Newport board booted from eMMC: |
| 200 | {{{#!bash |
| 201 | mmc list # if booted from eMMC you should see microSD as dev 1 |
| 202 | mmc dev 1 # select microSD |
| 203 | tftpboot ${loadaddr} firmware-newport.img && mmc write ${loadaddr} 0 8000 |
| 204 | }}} |
| 205 | |
| 206 | To create a bootable microSD with the Gateworks Ubuntu image (takes longer): |
| 207 | * On a Linux host: |
| 208 | {{{#!bash |
| 209 | DEVICE=/dev/sdc # set to the microSD on your host |
| 210 | zcat xenial-newport.img.gz | sudo dd of=$DEVICE |
| 211 | # re-partition with a 3.5MB DOS partition (required by BDK) and a Linux partition at 16MB |
| 212 | printf "3072,8191,1,,\n32768,,L,,\n" | sudo sfdisk -uS $DEVICE |
| 213 | }}} |
| 214 | - we re-partition so that the full size of your microSD is available as the firmware image has partitions setup for a 8GiB device. Even though the partition table grows to the size of your device you still need to run {{{resize2fs /dev/mmcblk0p2}}} after bootup to grow the partition to fit the space in the table. |
| 215 | - while you could use U-Boot on a running board to program a microSD you would not be able to adjust it's partition table easily to take advantage of a larger disk. |