| | 143 | |
| | 144 | |
| | 145 | [=#bootloader] |
| | 146 | == U-Boot Bootloader == |
| | 147 | Gateworks supports the U-Boot Bootloader for the Newport product family. We provide pre-built firmware images (see [#firmware above) as well as source for building and/or modifying it yourself. |
| | 148 | |
| | 149 | One of the primary features of the Bootloader is to provide access to the {{{hwconfig}}} environment variable that the firmware uses for initial board configuration on power-up. |
| | 150 | |
| | 151 | [=#hwconfig] |
| | 152 | === hwconfig === |
| | 153 | The U-Boot Bootloader by convention provides a {{{hwconfig}}} environment variable which is used by the firmware (before U-Boot is loaded and executed) to configure board options at power-up. These options can include things such as: |
| | 154 | * miniPCIe socket functions (ie PCIe vs mSATA vs USB 3.0) |
| | 155 | * serial configuration (ie RS232 vs RS485) |
| | 156 | |
| | 157 | [=#socketconfig] |
| | 158 | ==== hwconfig: miniPCIe Socket Configuration ==== |
| | 159 | Newport board model socket options: |
| | 160 | * GW630x: |
| | 161 | - J9: PCIe |
| | 162 | - J10: PCIe or SATA |
| | 163 | - J11: PCIe or USB 3.0 |
| | 164 | |
| | 165 | You can get/set the {{{hwconfig}}} variable within the U-Boot bootloader but you must reboot the board for it to take effect as the variable is acted upon in the Secondary Program Loader (SPL). |
| | 166 | |
| | 167 | Examples: |
| | 168 | * GW630x: |
| | 169 | - J10 PCIe, J11 PCIe (default) |
| | 170 | {{{#!bash |
| | 171 | setenv hwconfig 'j10:pcie;j11:pcie'; saveenv |
| | 172 | }}} |
| | 173 | - J10 mSATA, J11 USB 3.0 |
| | 174 | {{{#!bash |
| | 175 | setenv hwconfig 'j10:sata;j11:usb'; saveenv |
| | 176 | }}} |
| | 177 | - J9/J10 disabled, J11 PCIe |
| | 178 | {{{#!bash |
| | 179 | setenv hwconfig 'j9:disabled;j10:disabled;j11:pcie'; saveenv |
| | 180 | }}} |
| | 181 | |
| | 182 | '''Note that {{{hwconfig}}} is also used for serial configuration so care should be taken to preserve that configuration if used''' |
| | 183 | |
| | 184 | [=#serialconfig] |
| | 185 | ==== hwconfig: serial Configuration ==== |
| | 186 | Many boards in the Newport product family provide a 5-pin off-board serial connector that provides the following options: |
| | 187 | - 1x RS485 FD (UART2) |
| | 188 | - 1x RS485 HD (UART2) |
| | 189 | - 1x RS232 w/ hardware flow control (UART2) |
| | 190 | - 2x RS232 w/o hardware flow control (UART2/UART3) |
| | 191 | |
| | 192 | By default 2x RS232 with no flow control is enabled. To configure a different option use the {{{hwconfig}}} U-Boot env variable. The {{{mode}}} property of the {{{serial}}} option defines the initial configuration of the serial port(s). If RS485 is selected by the {{{mode}}} property the {{{term}}} property will select whether or not on-board termination is enabled. |
| | 193 | |
| | 194 | The {{{mode}}} property can have the following values: |
| | 195 | * rs232 - 2x RS232 (UART2/UART3) without hardware flow control (default if not specified) |
| | 196 | * rs232_dtr - RS232 (UART2) with hardware flow control |
| | 197 | * rs485_hd - RS485 half-duplex |
| | 198 | * rs485_fd - RS485 full-duplex |
| | 199 | |
| | 200 | Examples: |
| | 201 | * enable RS485 half duplex no on-board termination |
| | 202 | {{{#!bash |
| | 203 | setenv hwconfig "serial:mode=rs485_hd,term=no"; saveenv |
| | 204 | }}} |
| | 205 | * enable RS485 full duplex with on-board termination |
| | 206 | {{{#!bash |
| | 207 | setenv hwconfig "serial:mode=rs485_fd,term=yes"; saveenv |
| | 208 | }}} |
| | 209 | * enable RS232 with hardware flow-control: |
| | 210 | {{{#!bash |
| | 211 | setenv hwconfig "serial:mode=rs232_dtr"; saveenv |
| | 212 | }}} |
| | 213 | |
| | 214 | |
| | 215 | '''Note that {{{hwconfig}}} is also used for serial configuration so care should be taken to preserve that configuration if used''' |