RPI with Yocto
Find my pi
- Use ifconfig to find my dev machine ip
- use nmap to scan the computers on my network.
jumpnow
prebuilt image
First I am going to load the prebuilt image.
- Downloaded.
- Extracted using xz.
- 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
- github.com/NGenetzky/meta-ngenetzky
- github.com/NGenetzky/yocto-manifests
- github.com/crops/poky-container
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
- source poky/oe-init-build-env rpi-build
- Add this layer to bblayers.conf and the dependencies above
- Set MACHINE in local.conf to one of the supported boards
- bitbake rpi-hwup-image
- dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
- Boot your RPI.