Changes between Initial Version and Version 1 of malibu/bsp


Ignore:
Timestamp:
04/18/2023 05:18:47 PM (18 months ago)
Author:
Tim Harvey
Comment:

initial page

Legend:

Unmodified
Added
Removed
Modified
  • malibu/bsp

    v1 v1  
     1[[PageOutline]]
     2
     3= Malibu Board Support Package (BSP)
     4Gateworks provides a Board Support Package (BSP) for the Malibu product family which provides source code and an easy mechanism to build different images.
     5
     6The 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.
     7
     8
     9[=#images]
     10== BSP Pre-Built Firmware Images
     11
     12Pre-built firmware images can be found on http://dev.gateworks.com/malibu/images.
     13
     14Installation instructions:
     15 - [wiki:/malibu/firmware Malibu Flashing Instructions for updating from U-Boot or Linux]
     16 - [wiki:jtag_instructions JTAG instructions for updating Boot Firmware]
     17
     18
     19[=#source]
     20== BSP Source Code
     21Source 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].
     22
     23The following !GitHub repos are used for Malibu:
     24 * [https://github.com/Gateworks/bsp-malibu bsp-malibu] - Malibu BSP support scripts and Makefile  ([https://github.com/Gateworks/bsp-malibu/subscription watch])
     25 * [https://github.com/Gateworks/atf-malibu atf-malibu] - ARM Trusted Firmware ([https://github.com/Gateworks/atf-malibu/subscription watch)]
     26 * [https://github.com/Gateworks/mv_ddr-malibu mv_ddr-malibu] - Marvell DDR configuration
     27 ([https://github.com/Gateworks/mv_ddr-malibu/subscription watch)]
     28 * [https://github.com/Gateworks/uboot-malibu uboot-malibu] - Malibu Bootloader ([https://github.com/Gateworks/uboot-malibu/subscription watch)]
     29 * [https://github.com/Gateworks/linux-malibu linux-malibu] - Malibu Linux Kernel ([https://github.com/Gateworks/linux-malibu/subscription watch)]
     30
     31
     32[=#build]
     33== Building the BSP from source
     34Below are instructions for building the entire BSP, which includes all of the bootloader components, Linux kernel, and Ubuntu.  Pre-built images are available [#images above].
     35
     36The following pre-requisites are needed to build the Malibu BSP:
     37 * Linux Development host (desktop or laptop computer) (Ubuntu is used by Gateworks and tested)
     38 * Git (used for source code repositories)
     39
     40Installing pre-requisites:
     41{{{#!bash
     42# install packages
     43sudo apt update
     44sudo apt install build-essential git
     45sudo apt install wget bison flex libssl-dev libncurses-dev bc ncurses-dev liblzo2-dev lzop cpio rsync e2tools fdisk
     46sudo apt install gcc-aarch64-linux-gnu
     47# configure git
     48git config --global user.email "you@example.com"
     49git config --global user.name "Your Name"
     50git config --global color.ui true
     51}}}
     52
     53To obtain the code:
     54 1. Clone repo (fetch the repo manifest) '''Note the --recurse-submodules option which instructs git to pull the submodules'''
     55
     56{{{#!bash
     57git clone --recurse-submodules https://github.com/Gateworks/bsp-malibu.git
     58cd bsp-malibu
     59}}}
     60 1. Setup build environment (***repeat this each time you open a shell***)
     61{{{#!bash
     62source setup-environment
     63}}}
     64 1. Build desired software target as defined below. For example:
     65{{{#!bash
     66make -j8 ubuntu-image
     67}}}
     68
     69The following build targets are useful:
     70 - firmware-image: builds boot firmware:
     71  * firmware-malibu-gw8901-jtag.bin - JTAG image
     72  * firmware-malibu-gw8901.bin - for updating boot firmware only (no U-Boot env) from Linux/U-Boot
     73  * firmware-malibu-gw8901.img - for updating boot firmware and U-Boot env from Linux/U-Boot
     74  * malibu.env.bin - U-Boot environment
     75 - kernel_image: builds linux-malibu.tar.xz kernel tarball containing modules and boot dir with kernel/dtb/script
     76 - jammy-malibu.ext4: builds ext4 filesystem containing ubuntu rootfs plus gateworks kernel
     77 - ubuntu-image: builds ubuntu disk image including partition table and ext4 fs
     78
     79
     80[=#kernel]
     81=== Modifying the stand-alone Linux Kernel
     82The Gateworks Malibu BSP instructions [#build above] create an environment for building the Linux kernel among other targets.
     83
     84Some additional instructions for common actions (make sure you have already installed the BSP and setup your shell environment as specified above):
     85 * Make standard Gateworks Malibu kernel with Gateworks malibu_linux_defconfig
     86{{{#!bash
     87make linux # first build the kernel with the standard malibu_linux_defconfig
     88}}}
     89 * Modify Kernel configuration (enabling modules etc):
     90{{{#!bash
     91make -C linux menuconfig # make your changes
     92make -C linux savedefconfig # create a minimal 'defconfig' file in the linux kernel dir
     93diff linux/defconfig linux/arch/arm64/configs/malibu_linux_defconfig # show diffs (optional)
     94cp linux/defconfig linux/arch/arm64/configs/malibu_linux_defconfig . # copy the modified defconfig
     95}}}
     96 * Build kernel tarball:
     97{{{#!bash
     98make uboot # builds uboot, a requirement to build the kernel and modules and tarball
     99make kernel_image # builds the kernel and modules and tarball
     100}}}
     101 * Build new disk image using the updated kernel tarball:
     102{{{#!bash
     103make ubuntu-image
     104}}}