Project

General

Profile

Building Root Filesystem 18.1

This guide covers the creation of the Critical Link provided Linux filesystem and SDK installation script for the MitySOM-5CSx Dev Kit.

Overview

If you are interested in building or maintaining your own Linux distribution from source for the MitySOM-5CSx family, there is a Yocto compatible meta layer for the module provided at https://support.criticallink.com/gitweb/?p=meta-cl-socfpga.git;a=summary.

The current branch of the Critical Link SOCFPGA is: Rocko
The recommended operating system for the build machine: Ubuntu 18.04

Pre-built Rocko toolchain: poky-glibc-x86_64-mitysom-image-base-cortexa9hf-neon-toolchain-2.4.4.sh

Note: Yocto can use around 50GB of space on the host machine.

Prerequisites

Packages

  • It is recommended that you use Ubuntu 18.04 with the following packages installed:
    sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev python curl libssl-dev bc python3 tig libncurses5-dev libncursesw5-dev
    

Docker

The actual build is executed within a preset docker container. You need to install the docker software package as outlined in the Docker Installation Guide on the docker website. Once you have docker installed, you need to fetch the docker container used for the build:

docker pull crops/poky:ubuntu-18.04

Setting up Yocto

Yocto is made up of multiple meta layers, these layers are stored in Git repositories. To get everything setup to build, these repositories will need to be cloned and a few config files will need to be copied over.

  1. Change into your local projects directory and clone the needed repositories.
    git clone -b rocko git://git.yoctoproject.org/poky
    cd poky
    git clone -b rocko git://git.openembedded.org/meta-openembedded
    git clone -b rocko git://git.yoctoproject.org/meta-ti
    git clone -b rocko git://support.criticallink.com/home/git/meta-cl-socfpga.git
    
  2. Launch the docker container interactively:
    docker run --rm -it -v `pwd`:/work --workdir=/work --tmpfs /opt/poky crops/poky:ubuntu-18.04 /bin/bash
    
  3. Source the Yocto environment. Note: The current directory will change from poky to poky/build.
    . ./oe-init-build-env
    
  4. Copy Critical Link's example configuration files into build/conf.
    cp ../meta-cl-socfpga/conf/bblayers.conf.sample conf/bblayers.conf
    cp ../meta-cl-socfpga/conf/local.conf.5cs conf/local.conf
    

Building the filesystem

The following steps will build the filesystem used in the MitySOM-5CSx Dev Kit.

  1. Open a terminal and change into the poky directory.
  2. Launch the docker container interactively:
    docker run --rm -it -v `pwd`:/work --workdir=/work --tmpfs /opt/poky crops/poky:ubuntu-18.04 /bin/bash
    
  3. Source the yocto environment. Note: The current directory will change from poky to poky/build.
    . ./oe-init-build-env
    
  4. Build the filesystem. Note: This will take a while. Typing CTRL+C at any point during the process will cause the process to finish its current tasks and exit. Running the command again will allow the process to continue from where it was stopped.
    bitbake mitysom-image-base
    
  5. The tarball of the filesystem can be found at tmp/deploy/images/mitysom-c5/mitysom-image-base-mitysom-c5.tar.gz.

Building the SDK installation script

The following steps will build the SDK installation script with the cross-compiler toolchain used in the MitySOM-5CSx Dev Kit.

  1. Open a terminal and change into the poky directory.
  2. Launch the docker container interactively:
    docker run --rm -it -v `pwd`:/work --workdir=/work --tmpfs /opt/poky crops/poky:ubuntu-18.04 /bin/bash
    
  3. Source the Yocto environment. Note: The current directory will change from poky to poky/build.
    . ./oe-init-build-env
    
  4. Build the SDK installation script. Note: This will take a while. Typing CTRL+C at any point during the process will cause the process to finish its current tasks and exit. Running the command again will allow the process to continue from where it was stopped.
    bitbake mitysom-image-base -c populate_sdk
    
  5. The SDK installation script can be found at tmp/deploy/sdk/poky-glibc-x86_64-mitysom-image-base-cortexa9hf-neon-toolchain-2.4.4.sh.

Changes from the Dora branch

The new meta-cl-socfpga layer was based off of the meta-mitysom-5csx layer. The name change is because the layer now also supports Critical Links' MitySOM-A10S, which uses the Intel Arria 10 SoC.

The notable changes to the layer are as follows:
  • Addition of the 4.9.78-ltsi kernel, which is the default now for the MitySOM-5CSx.
  • Change to build the kernel as a zImage instead of uImage.

Steps to switch back to older kernel format

It is still possible to configure the Rocko branch to build the 3.16 kernel and uImage. To do so, follow the above instructions for setting Yocto but after copying over the example local.conf, edit it and add the followings lines:

KERNEL_IMAGETYPE = "uImage" 
UBOOT_ENTRYPOINT = "0x00008000" 
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" 

LINUX_VERSION_SUFFIX = "" 
LINUX_VERSION = "3.16" 
KBRANCH = "socfpga-3.16" 

Related Articles

Go to top
Add picture from clipboard (Maximum size: 1 GB)