Tutorial: Mixtile's BSP Layer


#1

Dear developers,

We will be providing you the Board Support Package (BSP) for the Mixtile Hub. BSP is the layer of software that defines how to support a particular hardware device. You’ll be able to add machine-specific customization and recipes to support the hardware features like kernel config, drivers. Once you have made changes to this layer, you can use it to build your customized Linux-based system for the hub.

Please Note

  • This tutorial is only for experienced embedded developers.
  • Mixtile is not reliable for any damages you caused to your hub or computer
  • Initial build takes a long time. Even longer if you’re using a virtual machine

What you will need for this tutorial

  • Computer with Linux distribution, for example Ubuntu
  • Mixtile Hub
  • microSD card

Let’s get started

Step 1: Clone the source to a new directory
    • Create source directory for the download file
      mkdir -p ~/mixtile/sources
    • Go into source directory
      cd /mixtile/sources
    • Clone the Mixtile layer with git
      git clone https://github.com/mixtile/mixtilehub-distro.git
Step 2: Update the necessary sub modules
    • The line below will automatically clone the required layers (openembedded and poky), and update the bblayers and local configuration files
      git submodule update --init
Step 3: Initialize the build environment
    • While in the root directory of the source, run the following line
      . init-build-env

This script creates the Build Directory. After the script runs, your current directory is set to the build directory

Step 4: Build the image (This will take hours)
    • Use the BitBake to build the image
      bitbake mixtilehub-minimal

If you get an error, you may need to install the necessary tools listed on the screen.

Step 5: Flash image to SD card
    • Go back to mixtilehub-distro directory
    • Use the following line to create an sdcard with root partition
      sudo ./create-boot-sdcard.sh -d /dev/??? i mixtilehub-minimal

(??? is the port of your sd card. You can find your sdcard device using the command line ‘lsblk’)

Step 6: Boot the Hub from SD card
  • Open up your hub. There should be a slot for SD card

  • Open the SD card slot and insert the SD card to the Hub
  • Power up the board
  • ssh into the hub via
    ssh root@ *youripaddress*
  • Login is
    User: Root
    Password: (NONE)
  • Alternatively, you can login via Serial
    Serial settings is: 115200n8

Terms for reference

Yocto Project: An open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture. (Flexible framework: Re-use your software stack with future devices. New hardware platform: Just update one line in a config file and rebuild. Variety: Access to large collection of application developing tools such as Eclipse plugin, testing, debug, performance tools, etc)

Poky: Yocto Project’s reference system composed of a collection of tools and metadata (BitBake tool, Metadata)

BitBake: Poky’s build engine/system. Bitbake is a scheduler and execution machine which parses instructions (recipes) and configuration data.

Metadata: The meta data is used to construct a Linux distribution, contained in the files that the build system parses when building an image. It includes recipes, configuration files, and other information. OpenEmbedded Core metadata is an important set of validated metadata. A recipe is a set of instructions for building packages.

Image: A binary form of a Linux distribution (OS) inserted onto a device

Board Support Package (BSP): A BSP is a collection of information that defines how to support a particular hardware device, set of devices, or hardware platform. The BSP includes information about the hardware features present on the device and kernel configuration information along with any additional hardware drivers required. The BSP also lists any additional software components required in addition to a generic Linux software stack for both essential and optional platform features.

Known Issues

  • WIFI/BT doesn’t work.
  • GPU doesn’t work.

Tools/Packages required

  • git: For cloning the required repositories
    sudo apt install git
  • g++: GNU C++ Compiler
    sudo apt install g++
  • gawk: GNU awk utility interprets special-purpose programming languages to handle simple data-reformatting jobs
    sudo apt install gawk
  • make: A tool that controls the generation of executables and other non-source files of a program from its source files
    sudo apt install make
  • makeinfo: A tool that translate texinfo documents
    sudo apt-get install texinfo