Changes between Version 34 and Version 35 of OpenWrt/building
- Timestamp:
- 03/17/2023 11:44:40 PM (20 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OpenWrt/building
v34 v35 1 1 [[PageOutline]] 2 2 3 = Building OpenWrt for Gateworks Products =3 = Building OpenWrt for Gateworks Products 4 4 Gateworks 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. 5 5 … … 7 7 8 8 [=#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 JTAGflash image creation scripts. The repository can be found on the [https://github.com/Gateworks/openwrt Gateworks GitHub openwrt page].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 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]. 11 11 12 12 Our branch naming policy is as follows: … … 17 17 18 18 Our 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 19 39 * '''Gateworks 20.06 !OpenWrt Release''' 20 - Is the latest OpenWrt software from Gateworks (**recommended**)21 40 - Latest build: http://dev.gateworks.com/openwrt/20.06/ 22 41 * Please view the .manifest file per target to inspect installed packages + their respective versions … … 30 49 - General: 31 50 * Added Gateworks System Controller drivers 32 * dropped laguna support51 * dropped Laguna support 33 52 * dropped GW16083 support 34 53 - Newport: 35 * Bump to linux 5.4.45 Kernel from 4.14.1336 54 * squashfs+f2fs overlay for sysupgrade/factory-reset support 37 55 - 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 48 61 To 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] 49 63 * [http://dev.gateworks.com/newport/images/ Newport OpenWrt Pre-Built Image] 50 64 * [http://dev.gateworks.com/ventana/images/ Ventana OpenWrt Pre-Built Images] 51 65 52 66 53 == Building Pre-Requisites == 54 67 == Building Pre-Requisites 55 68 These instructions require having a desktop or laptop computer with Ubuntu installed to compile Gateworks OpenWrt. 56 69 … … 83 96 84 97 85 == Downloaded Source Files ==98 == Downloaded Source Files 86 99 OpenWrt 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. 87 100 88 101 89 == Step by Step Instructions ==102 == Step by Step Instructions 90 103 Video: [https://youtu.be/cnObX6tErhw] 91 104 92 105 1. Getting Source Code: 93 106 * There are multiple code branches (see above for recommended branch per product), please checkout the one you prefer with the following commands: 94 - Gateworks 2 0-06branch95 {{{#!bash 96 git clone https://github.com/Gateworks/openwrt/ gateworks-openwrt -b 2 0.06107 - Gateworks 23.03 branch 108 {{{#!bash 109 git clone https://github.com/Gateworks/openwrt/ gateworks-openwrt -b 23.03 97 110 cd gateworks-openwrt 98 111 }}} … … 100 113 101 114 2. 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 119 ln -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 124 cp gateworks/configs/ventana/diffconfig .config 125 make defconfig 126 # select target and/or customize config 127 make menuconfig 128 # build 129 make -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: 113 146 {{{#!bash 114 147 # Build the octeontx target, using the configuration from gateworks/configs/octeontx/.config. … … 116 149 make -C gateworks/ octeontx 117 150 }}} 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: 119 152 {{{#!bash 120 153 # Build the imx6 target, using the configuration from gateworks/configs/imx6/.config. … … 122 155 make -C gateworks/ imx6 123 156 }}} 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. 125 158 126 159 … … 139 172 140 173 141 == Building JTAG Binary File ==174 == Building JTAG Binary File 142 175 For the Gateworks 20.06 BSP JTAG binaries are built for Ventana NAND Flash: 143 176 * gateworks/images/ventana_large.bin … … 145 178 146 179 147 == Building MMC Disk Image == 148 180 == Building MMC Disk Image 149 181 If you wish to create an MMC 'disk image' for Ventana boards that boot from eMMC or microSD: 150 182 {{{#!bash … … 188 220 189 221 190 == Customizing ==222 == Customizing 191 223 Video: https://youtu.be/HHhT6z0J5TU 192 224 … … 200 232 201 233 202 == Updating to Latest Gateworks Source ==234 == Updating to Latest Gateworks Source 203 235 The 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. 204 236 … … 225 257 226 258 227 == Troubleshooting Build Failures ==259 == Troubleshooting Build Failures 228 260 One 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: 229 261 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. … … 234 266 }}} 235 267 236 == More OpenWrt Information == 237 268 == More OpenWrt Information 238 269 For more information about OpenWrt see: [[TitleIndex(OpenWrt)]]