Adding Your Own Recipe to Ref-OS-IoT

It is possible to create your own Yocto recipes from scratch and add them to the image. This section describes the required steps to add a hello_world C program to our image. The GNU hello_world is a real project that you can download from

The Ref-OS-IoT will not allow new recipes to be part of the build unless SUPPORTED_RECIPES_CHECK is properly handled.


Perform one of the following three methods to successfully customize your recipe:

  1. Disable the check with SUPPORTED_RECIPES_CHECK = "" in local.conf.


  1. Create a new file which lists the unsupported recipes and extend SUPPORTED_RECIPES:

       SUPPORTED_RECIPES_append = " <path>/recipes-supported-by-me.txt"


  1. Add the unsupported recipes to ./meta-ref-os-iot/conf/distro/distro-include/ref-os-supported-recipes.txt file.

Create Your Own Recipe for Hello

 For example: as meta-ref-os-iot/recipes-support/hello/


    DESCRIPTION = "GNU Helloworld application"
    LICENSE = "GPLv3+"
    LIC_FILES_CHKSUM ="file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
    SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"
    SRC_URI[md5sum] = "fc01b05c7f943d3c42124942a2a9bb3a"
    inherit autotools gettext

Include hello in the image by adding the following line to the full image conf for the compute module as follows:

In file meta-ref-os-iot/meta-edison/recipes-core/images/

          IMAGE_INSTALL_append = "\
         hello \


In file meta-ref-os-iot/recipes-image/image/

     IMAGE_INSTALL_append = "\
         hello \

You can now build the image following the instructions in OS_build_process.

Add an Intel IOT RefKit Recipe to Ref-OS-IoT

Syslog is a standard method of adding system log. Syslog is not included in the Ref-OS-IoT by default. But it can be enabled as follows.

In file meta-ref-os-iot/meta-edison/recipes-core/images/

     IMAGE_INSTALL_append = "\
         sysklogd \

In file meta-ref-os-iot/conf/distro/distro-include/ref-os-supported-recipes.txt add



Disable SUPPORTED_RECIPES_CHECK as instructed in Supported Recipes Check.

Build and flash the image. Default configuration will start syslogd upon booting. Syslogd can be manually started with command:

systemctl start syslogd.service

Compile and run the sample program to test syslog.

#include <stdio.h>
#include <unistd.h>
#include <syslog.h>
int main(void) {
 openlog("slog", LOG_PID|LOG_CONS, LOG_USER);
 syslog(LOG_INFO, "Hello from ref-os-iot syslog… ");
 return 0;

Add Robot OS (ROS) to Ref-OS-IoT

Robot OS (ROS – see features are supported by Ref-OS-IoT but not included in the official image by default. These can be included in your own build of Ref-OS-IoT by making the following changes to build/conf/local.conf before building the image:



Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.