RPI with Yocto

Find my pi

  1. Use ifconfig to find my dev machine ip
  2. use nmap to scan the computers on my network.

jumpnow

prebuilt image

First I am going to load the prebuilt image.

  1. Downloaded.
  2. Extracted using xz.
  3. Copy to sdcard using dd.

This image is a whopping 2Gb! I think I am going to go straight to building my own with Yocto.

Yocto using meta-ngenetzky

Setup Yocto build Environment

After cloning meta-ngenetzky, I am able to execute ‘bitbake.sh’ to create a workspace for Yocto and then I’m dropped inside the container. Currently the script is configured to create a shared downloads and sstate-cache directories.

./scripts/bitbake.sh /data/ngenetzky/workspace-0

After it clones the required projects (using repo) I am able to initalize the build environment and start the first build.

source ./yocto/poky/oe-init-build-env ./build
bitbake core-image-minimal

Lower space requirements

I am using a very small ssd, and so I decided to modify the script to mount the downloads and sstate-cache from my external harddrive.

Configure Environment for building for RPI.

I have created a “group” in the manifests for “rpi”, which allows the projects required for the meta-raspberrypi to be added easily. Next I created a new “project” inside my repo, which allows me to customize the local.conf and bblayers.conf files for a particular project.

meta-raspberrypi Quick Start

  1. source poky/oe-init-build-env rpi-build
  2. Add this layer to bblayers.conf and the dependencies above
  3. Set MACHINE in local.conf to one of the supported boards
  4. bitbake rpi-hwup-image
  5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
  6. Boot your RPI.
Avatar
Nathan Genetzky
Senior Software Engineer

Software Engineer by Day, Electronic Hobbyist by Night.

Next
Previous

Related