Version 2 (modified by 19 months ago) ( diff ) | ,
---|
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:
- Malibu Flashing Instructions for updating from U-Boot or Linux
- JTAG instructions for updating Boot Firmware
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:
- bsp-malibu - Malibu BSP support scripts and Makefile (watch)
- atf-malibu - ARM Trusted Firmware (watch)
- mv_ddr-malibu - Marvell DDR configuration (watch)
- uboot-malibu - Malibu Bootloader (watch)
- linux-malibu - Malibu Linux Kernel (watch)
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:
- 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
- Setup build environment (*repeat this each time you open a shell*)
source setup-environment
- 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