[[PageOutline]] = Venice Board Support Package (BSP) 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. 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. * [#kernel Gateworks Venice Linux Kernel] * [wiki:venice/boot Gateworks Venice Boot Firmware] [=#images] == BSP Pre-Built Firmware Images Pre-built firmware images can be found on http://dev.gateworks.com/venice. A sampling includes: * ''' Entire Board Software (recommended), including boot firmware, bootloader, OS, kernel, etc: ''' * [http://dev.gateworks.com/venice/images/ Venice Images] - Compressed Disk Image containing Firmware and kernel and OS ( .img.gz files ) * Ubuntu version details are available [wiki:venice/ubuntu here] * ''' Venice GSC ''' * [http://dev.gateworks.com/venice/images/ GSC firmware images] * '''Only Boot Firmware ''' * [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) * '''Only Venice Kernel ''' * [http://dev.gateworks.com/venice/kernel/linux-venice.tar.xz linux-venice.tar.xz] - Compressed TAR archive of pre-built Linux kernel ''' Installation ''' instructions are at the following URL: [wiki:/venice/firmware Venice Flashing Instructions] [=#source] == BSP Source Code 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]. The following !GitHub repos are used for Venice: * [https://github.com/Gateworks/bsp-venice] - Venice BSP support scripts and Makefile ([https://github.com/Gateworks/bsp-venice/subscription watch]) * [https://github.com/Gateworks/manifest-venice] - Venice BSP repo Manifest ([https://github.com/Gateworks/manifest-venice/subscription watch]) * [https://github.com/Gateworks/uboot-venice uboot-venice] - Venice Bootloader ([https://github.com/Gateworks/uboot-venice/subscription watch)] * [https://github.com/Gateworks/linux-venice linux-venice] - Venice Linux Kernel ([https://github.com/Gateworks/linux-venice/subscription watch)] [=#build] == Building the BSP from source 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]. The Gateworks Venice Board Support Package uses the Google {{{repo}}} tool to manage multiple code repositories. The following pre-requisites are needed to build the Venice BSP: * Linux Development host (desktop or laptop computer) (Ubuntu 16.04 is used by Gateworks and tested) * Python 2.x (required by the 'repo' tool) * Git (used for source code repositories) * repo (used to manage multiple git repos) Installing pre-requisites: {{{#!bash sudo apt-get install build-essential git python repo libssl-dev ncurses-dev kmod }}} To obtain the code: 1. Initialize repo (fetch the repo manifest) {{{#!bash mkdir $HOME/venice cd $HOME/venice repo init -u https://github.com/Gateworks/manifest-venice.git }}} 1. Sync repositories (repeat this when you want to fetch the latest code updates) {{{#!bash repo sync }}} * 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 1. Setup build environment (***repeat this each time you open a shell***) {{{#!bash source setup-environment }}} 1. Build desired software target as defined below. For example: {{{#!bash make -j8 ubuntu-image # build focal-venice.img.gz }}} [=#kernel] === Modifying the stand-alone Linux Kernel The Gateworks Venice BSP instructions [#build above] create an environment for building the Linux kernel among other targets. Some additional instructions for common actions (make sure you have already installed the BSP and setup your shell environment as specified above): * Make standard Gateworks Venice kernel with Gateworks venice_defconfig {{{#!bash make linux # first build the kernel with the standard venice_defconfig }}} * Modify Kernel configuration (enabling modules etc): {{{#!bash make kernel_menuconfig # this will do a 'make menuconfig; make savedefconfig' in the kernel directory }}} - your modified defconfig is now in linux/defconfig if you want to save it away somewhere * copy your modified defconfig over the venice_defconfig (because 'make kernel_image' will always revert to venice_defconfig) {{{#!bash cp linux/.config linux/arch/arm64/configs/venice_defconfig }}} * Build kernel tarball: {{{#!bash make kernel_image # builds the kernel and modules and tarball }}} * Build new disk image using the updated kernel tarball: {{{#!bash make ubuntu-image }}}