Creating the Yocto/OE environment

Now that we have developed the main application, what remains for us is to integrate it with our Yocto RPI environment.

Modifying the image

The first step consists of integrating the nodejs package (located at meta-openembedded/meta-oe/recipes-devtools/nodejs) with the Raspberry Pi environment. For this, we have to add the following line to raspberry-pack-image:

# Base this image on core-image-minimal 
include recipes-core/images/core-image-minimal.bb 
DESCRIPTION = "Image for raspberry-pi" 
IMAGE_FEATURES += "ssh-server-dropbear splash" 
# Include modules in rootfs 
IMAGE_INSTALL += " \ 
    kernel-modules \ 
    gpio-packt    \ 
    i2c-tools    \ 
    spitools    \ 
    nunchuck    \ 
    v4l-utils    \ 
    nodejs    \     
"

We have now integrated nodejs with our Poky distro. ...

Get Yocto for Raspberry Pi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.