Changes between Version 35 and Version 36 of newport


Ignore:
Timestamp:
02/08/2018 01:18:00 AM (7 years ago)
Author:
Tim Harvey
Comment:

move boot firmware and bootloader sections to own page

Legend:

Unmodified
Added
Removed
Modified
  • newport

    v35 v36  
    5858 * [#bsp Gateworks Newport Board Support Package]
    5959 * [#images Pre-built Firmware Images]
    60  * [#firmware Boot Firmware (up to and including the Bootloader)]
    61  * [#bootloader U-Boot Bootloader]
     60 * [wiki:newport/boot Newport Boot Firmware (up to and including the Bootloader)]
     61 * [wiki:newport/bootloader Newport U-Boot Bootloader]
    6262 * [#bsp Newport Board Support Packages and Operating Systems]
    6363 * [#linux Linux kernel support]
     
    110110Gateworks provides a Board Support Package for Newport which provides source code and an easy mechanism to build:
    111111 * Gateworks Newport Linux Kernel
    112  * Gateworks Newport Boot Firmware
     112 * [wiki:newport/boot Gateworks Newport Boot Firmware]
    113113
    114114[=#source]
     
    131131The [https://github.com/Gateworks/uboot-newport images-newport] !GitHub repository hosts various pre-built firmware images used for Newport:
    132132 * [https://github.com/Gateworks/images-newport/raw/master/gsc_630x.txt GSC firmware image]
    133  * [https://github.com/Gateworks/images-newport/raw/master/firmware-newport.img boot firmware image] (everything up to and including the bootloader stored on the embedded FLASH boot device) (see [#firmware below] for details)
     133 * [https://github.com/Gateworks/images-newport/raw/master/firmware-newport.img boot firmware image] (everything up to and including the bootloader stored on the embedded FLASH boot device) (see [wiki:newport/boot newport/boot] for details)
    134134 * Download linux-newport.tar.xz from [https://github.com/Gateworks/linux-newport/releases/latest latest Newport kernel release] - Compressed TAR archive of pre-built Linux kernel
    135135 * Download xenial-newport.img.gz from [https://github.com/Gateworks/images-newport/releases/latest latest Newport firmware release] - Compressed Disk Image containing Firmware and Ubuntu 16.04 Xenial
     
    334334
    335335
    336 [=#firmware]
    337 = Boot Firmware (Up to and including the Bootloader) =
    338 The 'Boot Firmware' 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:
    339  * Boot ROM (internal on CN80XX/CN81XX SoC): fetch first level boot stub (192KB limit) from boot device (MMC or SPI FLASH)
    340  * SPL (Secondary Program Loader)
    341  * Bootloader (U-Boot)
    342 
    343 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:
    344  * First level: Bootstub (firmware/bdk)
    345  * Second level: ATF (firmware/atf)
    346  * Third level: U-Boot (bootloader/u-boot)
    347 
    348 Gateworks provides a pre-built Boot Firmware (firmware-newport.img) ready to flash onto boot devices as well as source for building and/or modifying the boot firmware yourself.
    349 
    350 
    351 [=#bootrom]
    352 == Boot ROM ==
    353 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].
    354 
    355 The Boot ROM uses information from 0x10000 to 0x7FFFF on the primary boot device. The first 64KB is not used by the Boot ROM and is used as a standard partition table for backwards compatibility with standard Operating Systems and from 0x80000 (512KB) onward is used by the Operating System.
    356 
    357 
    358336[=#bootdevice]
    359 == Boot Device ==
     337= Boot Device =
    360338Some boards have multiple boot device and may allow selection of which one is the 'primary boot device':
    361339||= board =||= Primary Boot Device =||= Alternate Boot Device =||
     
    371349Note if booting with the onboard eMMC as the primary boot device, “0/mmcblk0” is the U-Boot/Linux device node for eMMC and “1/mmcblk1” is the U-Boot/Linux device node for microSD. When booting from the alternate device (microSD) this is swapped.
    372350
     351
    373352=== Booting to a kernel/rootfs on the microSD ===
    374 
    375353This assumes the bootloader will remain on the eMMC, but then we switch to the microSD for the kernel/rootfs.
    376354
     
    411389reset
    412390}}}
    413 
    414 
    415 
    416 
    417 
    418 [=#bootloader]
    419 == U-Boot Bootloader ==
    420 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.
    421 
    422 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.
    423 
    424 [=#hwconfig]
    425 === hwconfig ===
    426 The U-Boot Bootloader by convention provides a {{{hwconfig}}} environment variable which is used by the boot firmware (before U-Boot is loaded and executed) to configure board options at power-up. These options can include things such as:
    427  * miniPCIe socket functions (ie PCIe vs mSATA vs USB3.0)
    428  * serial configuration (ie RS232 vs RS485)
    429 
    430 [=#socketconfig]
    431 ==== hwconfig: miniPCIe Socket Configuration ====
    432 Newport board model socket options:
    433  * GW630x:
    434    - J9: PCIe
    435    - J10: PCIe or SATA
    436    - J11: PCIe or USB3.0
    437 
    438 Note that USB2.0 is routed to all three miniPCIe sockets always but as USB3.0 shares signals with PCIe you must choose between PCIe and USB3 on sockets that support USB3.
    439 
    440 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).
    441 
    442 Examples:
    443  * GW630x:
    444   - J10 PCIe, J11 PCIe (default)
    445 {{{#!bash
    446 setenv hwconfig 'j10:pcie;j11:pcie'; saveenv
    447 }}}
    448   - J10 mSATA, J11 USB3.0
    449 {{{#!bash
    450 setenv hwconfig 'j10:sata;j11:usb3'; saveenv
    451 }}}
    452   - J9/J10 disabled, J11 PCIe
    453 {{{#!bash
    454 setenv hwconfig 'j9:disabled;j10:disabled;j11:pcie'; saveenv
    455 }}}
    456 
    457 '''Note that {{{hwconfig}}} is also used for serial configuration so care should be taken to preserve that configuration if used'''
    458 
    459 [=#serialconfig]
    460 ==== hwconfig: serial Configuration ====
    461 Many boards in the Newport product family provide a 5-pin off-board serial connector that provides the following options:
    462 - 1x RS485 FD (UART2)
    463 - 1x RS485 HD (UART2)
    464 - 1x RS232 w/ hardware flow control (UART2)
    465 - 2x RS232 w/o hardware flow control (UART2/UART3)
    466 
    467 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.
    468 
    469 The {{{mode}}} property can have the following values:
    470  * rs232 - 2x RS232 (UART2/UART3) without hardware flow control (default if not specified)
    471  * rs232_dtr - RS232 (UART2) with hardware flow control
    472  * rs485_hd - RS485 half-duplex
    473  * rs485_fd - RS485 full-duplex
    474 
    475 Examples:
    476  * enable RS485 half duplex no on-board termination
    477 {{{#!bash
    478 setenv hwconfig "serial:mode=rs485_hd,term=no"; saveenv
    479 }}}
    480  * enable RS485 full duplex with on-board termination
    481 {{{#!bash
    482 setenv hwconfig "serial:mode=rs485_fd,term=yes"; saveenv
    483 }}}
    484 * enable RS232 with hardware flow-control:
    485 {{{#!bash
    486 setenv hwconfig "serial:mode=rs232_dtr"; saveenv
    487 }}}
    488 
    489 
    490 '''Note that {{{hwconfig}}} is also used for serial configuration so care should be taken to preserve that configuration if used'''
    491391
    492392