wiki:malibu/bsp

Version 4 (modified by Ron Eisworth, 19 months ago) ( diff )

Updated malibu-bsp git link

Malibu Board Support Package (BSP)

Gateworks provides a Board Support Package (BSP) for the Malibu product family which provides source code and an easy mechanism to build different images.

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 using the bsp Makefile as a guide.

BSP Pre-Built Firmware Images

Pre-built firmware images can be found on http://dev.gateworks.com/malibu/images.

Installation instructions:

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 here.

The following GitHub repos are used for Malibu:

Building the BSP from source

Below are instructions for building the entire BSP, which includes all of the bootloader components, Linux kernel, and Ubuntu. Pre-built images are available above.

The following pre-requisites are needed to build the Malibu BSP:

  • Linux Development host (desktop or laptop computer) (Ubuntu is used by Gateworks and tested)
  • Git (used for source code repositories)

Installing pre-requisites:

# install packages
sudo apt update
sudo apt install build-essential git
sudo apt install wget bison flex libssl-dev libncurses-dev bc ncurses-dev liblzo2-dev lzop cpio rsync e2tools fdisk
sudo apt install gcc-aarch64-linux-gnu
# configure git
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global color.ui true

To obtain the code:

  1. Clone repo (fetch the repo manifest) Note the --recurse-submodules option which instructs git to pull the submodules
git clone --recurse-submodules https://github.com/Gateworks/malibu-bsp.git
cd bsp-malibu
  • A github account is required. If the command line prompt during the git clone requests user name and password, it may be required to use the username as your git user name and the password is the custom generated token here: https://github.com/settings/tokens
  1. Setup build environment (*repeat this each time you open a shell*)
    source setup-environment
    
  2. Build desired software target as defined below. For example:
    make -j8 ubuntu-image
    

The following build targets are useful:

  • firmware-image: builds boot firmware:
    • firmware-malibu-gw8901-jtag.bin - JTAG image
    • firmware-malibu-gw8901.bin - for updating boot firmware only (no U-Boot env) from Linux/U-Boot
    • firmware-malibu-gw8901.img - for updating boot firmware and U-Boot env from Linux/U-Boot
    • malibu.env.bin - U-Boot environment
  • kernel_image: builds linux-malibu.tar.xz kernel tarball containing modules and boot dir with kernel/dtb/script
  • jammy-malibu.ext4: builds ext4 filesystem containing ubuntu rootfs plus gateworks kernel
  • ubuntu-image: builds ubuntu disk image including partition table and ext4 fs

Modifying the stand-alone Linux Kernel

The Gateworks Malibu BSP instructions 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 Malibu kernel with Gateworks malibu_linux_defconfig
    make linux # first build the kernel with the standard malibu_linux_defconfig
    
  • Modify Kernel configuration (enabling modules etc):
    make -C linux menuconfig # make your changes
    make -C linux savedefconfig # create a minimal 'defconfig' file in the linux kernel dir
    diff linux/defconfig linux/arch/arm64/configs/malibu_linux_defconfig # show diffs (optional)
    cp linux/defconfig linux/arch/arm64/configs/malibu_linux_defconfig . # copy the modified defconfig
    
  • Build kernel tarball:
    make uboot # builds uboot, a requirement to build the kernel and modules and tarball
    make kernel_image # builds the kernel and modules and tarball
    
  • Build new disk image using the updated kernel tarball:
    make ubuntu-image
    
Note: See TracWiki for help on using the wiki.