| 1 | [[PageOutline]] |
| 2 | |
| 3 | = Venice Board Support Package (BSP) |
| 4 | Gateworks provides a Board Support Package for Venice which provides source code and an easy mechanism to build different images, including a minimal Buildroot based distro as well as an Ubuntu based distro. |
| 5 | |
| 6 | The Gateworks BSP is the easiest comprehensive software process because it contains everything. If a deep dive, expert path is desired, each piece of the BSP (boot firmware, rootfs, kernel) can all be built separately. |
| 7 | |
| 8 | * [#kernel Gateworks Venice Linux Kernel] |
| 9 | * [wiki:venice/boot Gateworks Venice Boot Firmware] |
| 10 | |
| 11 | [=#images] |
| 12 | == BSP Pre-Built Firmware Images |
| 13 | |
| 14 | Pre-built firmware images can be found on http://dev.gateworks.com/venice. |
| 15 | |
| 16 | A sampling includes: |
| 17 | |
| 18 | * ''' Entire Board Software (recommended), including boot firmware, bootloader, OS, kernel, etc: ''' |
| 19 | * [http://dev.gateworks.com/venice/images/ Venice Images] - Compressed Disk Image containing Firmware and kernel and OS ( .img.gz files ) |
| 20 | * Ubuntu version details are available [wiki:venice/ubuntu here] |
| 21 | * ''' Venice GSC ''' |
| 22 | * [http://dev.gateworks.com/venice/images/ GSC firmware images] |
| 23 | * '''Only Boot Firmware ''' |
| 24 | * [http://dev.gateworks.com/venice/boot_firmware/flash.bin flash.bin] - Boot Firmware (everything up to and including the bootloader stored on the embedded FLASH boot device) (see [wiki:venice/boot venice/boot] for details) |
| 25 | * '''Only Venice Kernel ''' |
| 26 | * [http://dev.gateworks.com/venice/kernel/linux-venice.tar.xz linux-venice.tar.xz] - Compressed TAR archive of pre-built Linux kernel |
| 27 | |
| 28 | ''' Installation ''' instructions are at the following URL: [wiki:/venice/firmware Venice Flashing Instructions] |
| 29 | |
| 30 | |
| 31 | [=#source] |
| 32 | == BSP Source Code |
| 33 | 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]. |
| 34 | |
| 35 | The following !GitHub repos are used for Venice: |
| 36 | * [https://github.com/Gateworks/bsp-venice] - Venice BSP support scripts and Makefile ([https://github.com/Gateworks/bsp-venice/subscription watch]) |
| 37 | * [https://github.com/Gateworks/manifest-venice] - Venice BSP repo Manifest ([https://github.com/Gateworks/manifest-venice/subscription watch]) |
| 38 | * [https://github.com/Gateworks/uboot-venice uboot-venice] - Venice Bootloader ([https://github.com/Gateworks/uboot-venice/subscription watch)] |
| 39 | * [https://github.com/Gateworks/linux-venice linux-venice] - Venice Linux Kernel ([https://github.com/Gateworks/linux-venice/subscription watch)] |
| 40 | |
| 41 | |
| 42 | [=#build] |
| 43 | == Building the BSP from source |
| 44 | Below are instructions for building the entire BSP, which includes all of the bootloader components and Linux kernel and Ubuntu or OpenWrt. Pre-built images are available [#images above]. |
| 45 | |
| 46 | The Gateworks Venice Board Support Package uses the Google {{{repo}}} tool to manage multiple code repositories. |
| 47 | |
| 48 | The following pre-requisites are needed to build the Venice BSP: |
| 49 | * Linux Development host (desktop or laptop computer) (Ubuntu 16.04 is used by Gateworks and tested) |
| 50 | * Python 2.x (required by the 'repo' tool) |
| 51 | * Git (used for source code repositories) |
| 52 | * repo (used to manage multiple git repos) |
| 53 | |
| 54 | Installing pre-requisites: |
| 55 | {{{#!bash |
| 56 | sudo apt-get install build-essential git python repo libssl-dev ncurses-dev kmod |
| 57 | }}} |
| 58 | |
| 59 | To obtain the code: |
| 60 | 1. Initialize repo (fetch the repo manifest) |
| 61 | {{{#!bash |
| 62 | mkdir $HOME/venice |
| 63 | cd $HOME/venice |
| 64 | repo init -u https://github.com/Gateworks/manifest-venice.git |
| 65 | }}} |
| 66 | 1. Sync repositories (repeat this when you want to fetch the latest code updates) |
| 67 | {{{#!bash |
| 68 | repo sync |
| 69 | }}} |
| 70 | * 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 ~3GB of disk space |
| 71 | 1. Setup build environment (***repeat this each time you open a shell***) |
| 72 | {{{#!bash |
| 73 | source setup-environment |
| 74 | }}} |
| 75 | 1. Build desired software target as defined below. For example: |
| 76 | {{{#!bash |
| 77 | make -j8 ubuntu-image # build focal-venice.img.gz |
| 78 | }}} |
| 79 | |
| 80 | |
| 81 | |
| 82 | [=#kernel] |
| 83 | === Modifying the stand-alone Linux Kernel |
| 84 | The Gateworks Venice BSP instructions [#build above] create an environment for building the Linux kernel among other targets. |
| 85 | |
| 86 | Some additional instructions for common actions (make sure you have already installed the BSP and setup your shell environment as specified above): |
| 87 | * Make standard Gateworks Venice kernel with Gateworks venice_defconfig |
| 88 | {{{#!bash |
| 89 | make linux # first build the kernel with the standard venice_defconfig |
| 90 | }}} |
| 91 | * Modify Kernel configuration (enabling modules etc): |
| 92 | {{{#!bash |
| 93 | make kernel_menuconfig # this will do a 'make menuconfig; make savedefconfig' in the kernel directory |
| 94 | }}} |
| 95 | - your modified defconfig is now in linux/defconfig if you want to save it away somewhere |
| 96 | * copy your modified defconfig over the venice_defconfig (because 'make kernel_image' will always revert to venice_defconfig) |
| 97 | {{{#!bash |
| 98 | cp linux/.config linux/arch/arm64/configs/venice_defconfig |
| 99 | }}} |
| 100 | * Build kernel tarball: |
| 101 | {{{#!bash |
| 102 | make kernel_image # builds the kernel and modules and tarball |
| 103 | }}} |
| 104 | * Build new disk image using the updated kernel tarball: |
| 105 | {{{#!bash |
| 106 | make ubuntu-image |
| 107 | }}} |