Changes between Version 38 and Version 39 of newport


Ignore:
Timestamp:
02/08/2018 08:49:25 PM (7 years ago)
Author:
Tim Harvey
Comment:

moved bsp section to newport/bsp

Legend:

Unmodified
Added
Removed
Modified
  • newport

    v38 v39  
    5656
    5757== Software ==
    58  * [#bsp Gateworks Newport Board Support Package]
     58 * [wiki:newport/bsp Gateworks Newport Board Support Package]
    5959 * [#images Pre-built Firmware Images]
    6060 * [wiki:newport/boot Newport Boot Firmware (up to and including the Bootloader)]
    6161 * [wiki:newport/bootloader Newport U-Boot Bootloader]
    62  * [#bsp Newport Board Support Packages and Operating Systems]
    6362 * [#linux Linux kernel support]
    6463 * [#third-party-linux Booting Third Party Linux Distro's on Newport]
     
    105104 * Linux eth0, U-Boot vnic0, SGMII PHY port, J20 RJ45 inside port closest to USB port. Passive PoE.
    106105 * Linux eth1, U-Boot vnic1, RGMII PHY port, J19 RJ45 nearest panel mount LED. Active PoE.
    107 
    108 [=#bsp]
    109 = Newport Board Support Package (BSP) =
    110 Gateworks provides a Board Support Package for Newport which provides source code and an easy mechanism to build:
    111  * Gateworks Newport Linux Kernel
    112  * [wiki:newport/boot Gateworks Newport Boot Firmware]
    113 
    114 [=#source]
    115 == BSP Source Code ==
    116 Newport Source code for the firmware, bootloader and kernel are hosted at !GitHub. We highly recommend you create a !GitHub account and 'Watch' these repositories to keep abreast of important feature additions, bugfixes, and firmware-releases. You can configure your !GitHub account to e-mail you when changes are made to repositories [https://github.com/settings/notifications here].
    117 
    118 The following !GitHub repos are used for Newport:
    119  * [https://github.com/Gateworks/bsp-newport] - Newport BSP support scripts and Makefile  ([https://github.com/Gateworks/bsp-newport/subscription watch])
    120  * [https://github.com/Gateworks/manifest-newport] - Newport BSP repo Manifest  ([https://github.com/Gateworks/manifest-newport/subscription watch])
    121  * [https://github.com/Gateworks/images-newport images-newport] - Newport pre-built firmware Firmware Images ([https://github.com/Gateworks/images-newport/subscription watch])
    122  * [https://github.com/Gateworks/uboot-newport uboot-newport] - Newport Bootloader ([https://github.com/Gateworks/uboot-newport/subscription watch)]
    123  * [https://github.com/Gateworks/linux-newport linux-newport] - Newport Linux Kernel ([https://github.com/Gateworks/linux-newport/subscription watch)]
    124  * [https://github.com/Gateworks/dts-newport dts-newport] - Newport Linux Device-Tree ([https://github.com/Gateworks/dts-newport/subscription watch)]
    125  * [https://github.com/Gateworks/bdk-newport bdk-newport] - Newport BDK (used as Secondary Program Loader) ([https://github.com/Gateworks/bdk-newport/subscription watch)]
    126  * [https://github.com/Gateworks/atf-newport atf-newport] - Newport ATF (ARM Trusted Firmware) ([https://github.com/Gateworks/atf-newport/subscription watch)]
    127  * [https://github.com/Gateworks/openwrt openwrt] - Gateworks OpenWrt ([https://github.com/Gateworks/openwrt/subscription watch)]
    128 
    129 
    130 [=#images]
    131 == Pre-built Firmware Images ==
    132 The [https://github.com/Gateworks/uboot-newport images-newport] !GitHub repository hosts various pre-built firmware images used for Newport:
    133  * [https://github.com/Gateworks/images-newport/raw/master/gsc_630x.txt GSC firmware image]
    134  * [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)
    135  * 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
    136  * Download xenial-newport.img.gz from [https://github.com/Gateworks/images-newport/releases/latest latest Newport Ubuntu release] - Compressed Disk Image containing Firmware and Ubuntu 16.04 Xenial
    137  * Download openwrt-newport.img.gz from [http://dev.gateworks.com/newport/openwrt/openwrt-newport.img.gz latest Newport OpenWrt build] - Compressed Disk Image containing Firmware and OpenWrt
    138  * [http://dev.gateworks.com/newport/ubuntu/xenial/latest/xenial-newport.tar.xz xenial-newport.tar.xz] - Compressed TAR archive of Ubuntu 16.04 Xenial arm64 root filesystem
    139 
    140 
    141 [=#build]
    142 == Building BSP from source ==
    143 
    144 Pre-built images are available above.
    145 
    146 Below are instructions for building all of the bootloader components and Linux kernel. This does not include Ubuntu or any other operating systems.
    147 
    148 The Gateworks Newport Board Support Package uses the Google {{{repo}}} tool to manage multiple code repositories.
    149 
    150 The following pre-requisites are needed to build the Newport BSP:
    151  * Linux Development host (desktop or laptop computer) (Ubuntu 16.04 is used by Gateworks and tested)
    152  * Python 2.x (required by the 'repo' tool)
    153  * Git (used for source code repositories)
    154 
    155 To obtain the code:
    156  1. Get repo tool (download latest version of tool and put it in your path)
    157 {{{#!bash
    158 mkdir $HOME/.bin/
    159 echo "PATH=\$PATH:$HOME/.bin/repo" >> $HOME/.profile
    160 curl https://storage.googleapis.com/git-repo-downloads/repo > $HOME/.bin/repo
    161 chmod a+x $HOME/.bin/repo
    162 }}}
    163  1. Initialize repo (fetch the repo manifest)
    164 {{{#!bash
    165 mkdir $HOME/newport
    166 cd $HOME/newport
    167 repo init -u https://github.com/Gateworks/manifest-newport.git
    168 }}}
    169  1. Sync repositories (repeat this when you want to fetch the latest code updates)
    170 {{{#!bash
    171 repo sync
    172 }}}
    173   * This will fetch/update the source repos described [#source above]. The first time it can take several minutes depending on your Internet connection and will take approximately ~2.5GB of disk space
    174  1. Setup build environment (repeat this each time you open shell)
    175 {{{#!bash
    176 source newport/setup-environment
    177 }}}
    178  1. Build desired targets and images for example:
    179 {{{#!bash
    180 make -j8 openwrt-image # build openwrt-newport.img.gz
    181 }}}
    182 
    183 The build targets supported by the Newport BSP include:
    184   * **firmware-image** - builds 'firmware-newport.img': 16MB [wiki:newport/boot Boot Firmware] which includes the BDK/ATF/U-Boot and Device-Tree images - (takes about 2 mins on a modern development system).
    185   * **kernel_image** - builds linux-newport.tar.xz - A compressed tarball of the kernel (boot/Image) and kernel modules (lib/modules/*) which can be used on top of any compatible root filesystem
    186   * **ubuntu-image** - builds ubuntu-newport.img.gz: A Compressed Disk Image which includes the 16MB [wiki:newport/boot Boot Firmware] (BDK/ATF/U-Boot and Device-Tree images) as well as the Kenrel and Ubuntu root filesystem
    187   * **openwrt-image** - builds openwrt-newport.img.gz: A Compressed Disk Image which includes the 16MB [wiki:newport/boot Boot Firmware] (BDK/ATF/U-Boot and Device-Tree images) as well as the OpenWrt Kenrel and root filesystem
    188 
    189 The resulting images can be installed to boot media (see [#firmware-update below])
    190 
    191 
    192 [=#kernel]
    193 === Building or modifying the Linux Kernel ===
    194 The Gateworks Newport BSP instructions [#bsp above] create an environment for building the Linux kernel among other targets.
    195 
    196 Here are some additional instructions for common actions (make sure you have installed the BSP and setup your shell environment as specified above):
    197  * Modify Kernel configuration (enabling modules etc):
    198 {{{#!bash
    199 cd linux
    200 make newport_defconfig # start with the Newport kernel configuration
    201 make menuconfig # modify as desired
    202 make # build Image and modules
    203 }}}
    204  * Build kernel tarball:
    205 {{{#!bash
    206 cd linux
    207 make # build Image and modules
    208 mkdir -p install/boot # create install and install/boot directories
    209 cp arch/arm64/boot/Image install/boot # copy kernel Image
    210 make INSTALL_MOD_PATH=install modules_install # install modules
    211 tar -cvJf /tftpboot/newport/linux-newport.tar.xz --numeric-owner -C install . # create tarball
    212 }}}
    213 
    214 While the resulting kernel modules must be placed on the root filesystem the kernel image must be placed in a partition readable by the U-Boot Bootloader. Therefore placing the kernel within the root filesystem as above does not work if you use a filesystem that U-Boot does not natively support (like F2FS or BTRFS for example). U-Boot only supports FAT and EXT (and UBI for NAND devices) natively.
    215 
    216 
    217 === Building Ubuntu Operating System - rootfs ===
    218 This is not part of the Gateworks BSP described above.
    219 
    220 Information for building Ubuntu rootfs can be found here: [wiki:newport/ubuntu]
    221106
    222107