| 112 | |
| 113 | |
| 114 | [=#firmware] |
| 115 | = Firmware (Up to and including the Bootloader) = |
| 116 | The 'firmware-image' for Newport is defined as the combination of the First level 'boot stub' and the additional firmware stages through the bootloader. This can be broken down into the following stages: |
| 117 | * Boot ROM (internal on CN80XX/CN81XX SoC): fetch first level boot stub (192KB limit) from boot device (MMC or SPI FLASH) |
| 118 | * SPL (Secondary Program Loader) |
| 119 | * Bootloader (U-Boot) |
| 120 | |
| 121 | For a Secondary Program Loader, or SPL, Gateworks currently uses the Cavium Board Development Kit (BDK) provided by their OCTEON-TX Software Development Kit (SDK). In this current implementation the Boot ROM loads and executes the BDK, the BDK loads and executes the ARM Trusted Firmware (ATF) and the ATF loads and executes the U-Boot bootloader in multiple stages as such: |
| 122 | * First level: Bootstub (firmware/bdk) |
| 123 | * Second level: ATF (firmware/atf) |
| 124 | * Third level: U-Boot (bootloader/u-boot) |
| 125 | |
| 126 | Gateworks provides a pre-built firmware-image ready to flash onto boot devices as well as source for building and/or modifying the firmware yourself. |
| 127 | |
| 128 | [=#bootrom] |
| 129 | == Boot ROM == |
| 130 | The OCTEON-TX Boot ROM code loads an image from the primary boot device which can be either MMC or SPI FLASH. For a description of available boot devices see [#bootdevice below]. |
| 131 | |
| 132 | |
| 133 | [=#bootdevice] |
| 134 | == Boot Device == |
| 135 | Some boards have multiple boot device and may allow selection of which one is the 'primary boot device': |
| 136 | ||= board =||= Primary Boot Device =||= Alternate Boot Device =|| |
| 137 | || GW630x || on board eMMC || microSD || |
| 138 | |
| 139 | To boot from the alternate boot device manually you can press-and-release the user pushbutton 5 times in a row and the board will power cycle primary power (the 3.3V LED will go off, then on again) and the board will boot from the alternate boot device. |
| 140 | |
| 141 | Boards with an Alternate boot device also have a boot watchdog such that if the current boot device fails to boot within 30 seconds, the board will power cycle primary power and attempt boot from the other boot device. |