Changes between Version 34 and Version 35 of OpenWrt/building


Ignore:
Timestamp:
03/17/2023 11:44:40 PM (20 months ago)
Author:
Tim Harvey
Comment:

added 23.03 build instructions

Legend:

Unmodified
Added
Removed
Modified
  • OpenWrt/building

    v34 v35  
    11[[PageOutline]]
    22
    3 = Building OpenWrt for Gateworks Products =
     3= Building OpenWrt for Gateworks Products
    44Gateworks uses the OpenWrt Linux Distribution for its Board Support Package (BSP). From time to time, Gateworks may have patches against upstream OpenWrt to support some features which have not made it upstream or perhaps are not suitable for upstream OpenWrt. Additionally Gateworks provides a Makefile wrapper around OpenWrt to aid in pinning versions of Opensource tree's to versions that Gateworks has tested with.  Please do not allow this to dissuade you from building mainline OpenWrt, particularly if being current is of importance.  There are only a small number of features you will find in Gateworks-OpenWrt that do not exist in mainline, generally related to the GSC.   
    55
     
    77
    88[=#branches]
    9 == OpenWrt BSP Branches ==
    10 The Gateworks OpenWrt repository consist of a snapshot of upstream OpenWrt at specific points, with a few additional patches added on top that either had not made it upstream by that time, or add a gateworks directory consisting of Gateworks tested config files and JTAG flash image creation scripts. The repository can be found on the [https://github.com/Gateworks/openwrt Gateworks ​GitHub openwrt page].
     9== OpenWrt BSP Branches
     10The Gateworks OpenWrt repository consist of a snapshot of upstream OpenWrt at specific points, with a few additional patches added on top that have not made it upstream yet. Additionally a gateworks directory consisting of various Gateworks tested openwrt config files and flash image creation scripts. The repository can be found on the [https://github.com/Gateworks/openwrt Gateworks ​GitHub openwrt page].
    1111
    1212Our branch naming policy is as follows:
     
    1717
    1818Our ​http://github.com/Gateworks/openwrt repository branches currently include:
     19 * '''Gateworks 23.03 !OpenWrt Release'''
     20  - Is the latest OpenWrt software from Gateworks (**recommended**)
     21  - Latest build: ​http://dev.gateworks.com/openwrt/23.03/
     22    * Please view the .manifest file per target to inspect installed packages + their respective versions
     23  - Based on OpenWrt master branch
     24    * Linux 5.15.98
     25    * Wireless drivers from linux backports-6.1-rc8
     26    * busybox-1.36.0
     27    * gcc-12.2.0
     28    * binutils-2.37
     29  - General:
     30    * Added Venice support
     31    * Updated kernel and drivers
     32  - Venice:
     33    * squashfs+f2fs overlay for sysupgrade/factory-reset support
     34  - Newport:
     35    * squashfs+f2fs overlay for sysupgrade/factory-reset support
     36  - Ventana:
     37    * squashfs+ubifs and squashfs+f2fs overlay for sysupgrade/factory-reset support
     38  - revision log: ​https://github.com/Gateworks/openwrt/commits/23.03
    1939 * '''Gateworks 20.06 !OpenWrt Release'''
    20   - Is the latest OpenWrt software from Gateworks (**recommended**)
    2140  - Latest build: ​http://dev.gateworks.com/openwrt/20.06/
    2241    * Please view the .manifest file per target to inspect installed packages + their respective versions
     
    3049  - General:
    3150    * Added Gateworks System Controller drivers
    32     * dropped laguna support
     51    * dropped Laguna support
    3352    * dropped GW16083 support
    3453  - Newport:
    35     * Bump to linux 5.4.45 Kernel from 4.14.13
    3654    * squashfs+f2fs overlay for sysupgrade/factory-reset support
    3755  - Ventana:
    38     * Bump to linux 5.4.45 Kernel from 4.4.0
    39   - log: ​https://github.com/Gateworks/openwrt/commits/20.06
    40 
    41 
    42 == Revision Log ==
    43 You can see a revision history using the Github web interface:
    44  * [https://github.com/Gateworks/openwrt/commits/20.06 20.06]
    45 
    46 
    47 == OpenWrt BSP Pre-Built Binaries ==
     56    * squashfs+ubifs and squashfs+f2fs overlay for sysupgrade/factory-reset support
     57  - revision log: ​https://github.com/Gateworks/openwrt/commits/20.06
     58
     59
     60== OpenWrt BSP Pre-Built Binaries
    4861To get an already built image to flash onto the SBC, please visit the following:
     62 * [http://dev.gateworks.com/venice/images/  Venice OpenWrt Pre-Built Image]
    4963 * [http://dev.gateworks.com/newport/images/  Newport OpenWrt Pre-Built Image]
    5064 * [http://dev.gateworks.com/ventana/images/ Ventana OpenWrt Pre-Built Images]
    5165
    5266
    53 == Building Pre-Requisites ==
    54 
     67== Building Pre-Requisites
    5568These instructions require having a desktop or laptop computer with Ubuntu installed to compile Gateworks OpenWrt.
    5669
     
    8396
    8497
    85 == Downloaded Source Files ==
     98== Downloaded Source Files
    8699OpenWrt uses a Linux build system called {{{buildroot}}}. Like all Linux build systems it consists of recipes that go through the process of fetching, patching, compiling, packaging various applications. The 'fetching' process involves downloading source tarballs from the Internet (which is why an Internet connection is required). OpenWrt will fetch all sources into the 'dl' directory in the OpenWrt tree (ie 14.08/dl from the Gateworks directory). To avoid downloading sources each time you do a clean build it is recommended that you create a static location on your development host to store downloaded packages and symlink this to the dl directory. The Gateworks Makefile which fetches OpenWrt and patches it, will create this link for you if the {{{/usr/src/dl}}} directory exists on your development host, so if you create that and make it writable by your development user all downloads will go there automatically and be able to be used for subsequent builds. This not only helps reduce build time but it can also help if a package's source isn't available because of a site or mirror being down.
    87100
    88101
    89 == Step by Step Instructions ==
     102== Step by Step Instructions
    90103Video: [https://youtu.be/cnObX6tErhw]
    91104
    921051. Getting Source Code:
    93106 * There are multiple code branches (see above for recommended branch per product), please checkout the one you prefer with the following commands:
    94   - Gateworks 20-06 branch
    95 {{{#!bash
    96 git clone https://github.com/Gateworks/openwrt/ gateworks-openwrt -b 20.06
     107  - Gateworks 23.03 branch
     108{{{#!bash
     109git clone https://github.com/Gateworks/openwrt/ gateworks-openwrt -b 23.03
    97110cd gateworks-openwrt
    98111}}}
     
    100113
    1011142. Building:
    102  * Our OpenWrt Git repository has a 'gateworks' directory added consisting of a Makefile providing targets that aim to simplify the entire process of:
    103   - using a (per target) Gateworks provided .config file
    104   - producing JTAG binary images compatible with the Gateworks JTAG dongle
    105  * Once the branch has been checked out from the ​Gateworks !GitHub account, you are ready to build. The Gateworks Makefile provides the following targets:
    106   - all : Build both Newport (octeontx) and Ventana (imx6)
    107   - octeontx : build BSP for the octeontx target (Newport product family)
    108   - imx6 : build BSP for the imx6 target (Ventana product family)
    109   - images : build binary flash images (suitable for JTAG flashing) for supported product families
    110   - dirclean : remove all downloaded and built directories
    111   - Examples:
    112    - In order to build the octeontx target for the Newport product family, the following steps would occur:
     115 * 23.03:
     116  - To build OpenWrt for a specific target device you perform the following steps:
     117{{{#!bash
     118# optional; create a smylink to dl dir for shared downloads
     119ln -s /usr/src/dl .
     120# update package feeds
     121./scripts/feeds update -a
     122./scripts/feeds install -a
     123# (optional) start with an example config
     124cp gateworks/configs/ventana/diffconfig .config
     125make defconfig
     126# select target and/or customize config
     127make menuconfig
     128# build
     129make -j8 V=s
     130}}}
     131  - For Venice you can use gateworks/configs/venice/diffconfig as a starting point
     132  - For Newport you can use gateworks/configs/newport/diffconfig as a starting point
     133  - For Ventana you can use gateworks/configs/ventana/diffconfig as a starting point
     134 * 20.06:
     135  - Our OpenWrt Git repository has a 'gateworks' directory added consisting of a Makefile providing targets that aim to simplify the entire process of:
     136   - using a (per target) Gateworks provided .config file
     137   - producing JTAG binary images compatible with the Gateworks JTAG dongle
     138  - Once the branch has been checked out from the ​Gateworks !GitHub account, you are ready to build. The Gateworks Makefile provides the following targets:
     139   - all : Build both Newport (octeontx) and Ventana (imx6)
     140   - octeontx : build BSP for the octeontx target (Newport product family)
     141   - imx6 : build BSP for the imx6 target (Ventana product family)
     142   - images : build binary flash images (suitable for JTAG flashing) for supported product families
     143   - dirclean : remove all downloaded and built directories
     144   - Examples:
     145    - In order to build the octeontx target for the Newport product family, the following steps would occur:
    113146{{{#!bash
    114147# Build the octeontx target, using the configuration from gateworks/configs/octeontx/.config.
     
    116149make -C gateworks/ octeontx
    117150}}}
    118    - In order to build the imx6 target for the Ventana product family, the following steps would occur:
     151    - In order to build the imx6 target for the Ventana product family, the following steps would occur:
    119152{{{#!bash
    120153# Build the imx6 target, using the configuration from gateworks/configs/imx6/.config.
     
    122155make -C gateworks/ imx6
    123156}}}
    124   - The build process will take some time depending on your Internet connection and host system. On an Intel Quad Core @ 3.10GHz the build takes a couple of hours to build all product families and takes appx 15GB of disk space.
     157   - The build process will take some time depending on your Internet connection and host system. On an Intel Quad Core @ 3.10GHz the build takes a couple of hours to build all product families and takes appx 15GB of disk space.
    125158 
    126159
     
    139172
    140173
    141 == Building JTAG Binary File ==
     174== Building JTAG Binary File
    142175For the Gateworks 20.06 BSP JTAG binaries are built for Ventana NAND Flash:
    143176 * gateworks/images/ventana_large.bin
     
    145178
    146179
    147 == Building MMC Disk Image ==
    148 
     180== Building MMC Disk Image
    149181If you wish to create an MMC 'disk image' for Ventana boards that boot from eMMC or microSD:
    150182{{{#!bash
     
    188220
    189221
    190 == Customizing ==
     222== Customizing
    191223Video: https://youtu.be/HHhT6z0J5TU
    192224
     
    200232
    201233
    202 == Updating to Latest Gateworks Source ==
     234== Updating to Latest Gateworks Source
    203235The steps to update your current project to the latest Gateworks patches varies depending on the branch you're trying to update. Please see the below two sections that help to detail this out. However, please note that using Git is the most developer friendly.
    204236
     
    225257
    226258
    227 == Troubleshooting Build Failures ==
     259== Troubleshooting Build Failures
    228260One of the most commonly occurring errors that we have run into are source URL's disappearing which causes the source files to not be there during build-time. To help alleviate this, Gateworks has put up source tarballs at [http://dev.gateworks.com/sources ​our development site]. Our build environment takes advantage of this by uploading files for feeds that we require and automatically selecting them if all other options fail. In general, it will 1: look for the tarball locally; 2: try the original source URL; and 3: try [http://dev.gateworks.com/sources our ​dev] site. Below are other issues that may crop up:
    229261 1. **Finding an Error** - Often the error will be 'reported' at the end of the build. However, the error will have actually occurred earlier on. Scroll up in the logs and look for an error. Typically it is from a package or dependency that was not able to be downloaded.
     
    234266}}}
    235267
    236 == More OpenWrt Information ==
    237 
     268== More OpenWrt Information
    238269For more information about OpenWrt see: [[TitleIndex(OpenWrt)]]