Skip to content
@yocto-is-easy

yocto-is-easy

Yocto is easy

By Mykhailo Didur

Hi! That is my pet project, the goal of which to learn how Yocto works and what can I do with it.

Provided features

  • Support of custom request responce library (LRRP - Lightweight request-response library)
  • Custom RPC framework (MIDF - Mocto interface definition framework)
  • Util to observe other services' state
  • Support of DS18B20 temperature sensor
  • Remote test execution
  • Logging service with ring buffer
  • Support of plugin manager
  • Wifi service support
  • Support of initializing smart devices over serial(ESP32)

Build

⚠️ The developer may work after 6 p.m. by Kyiv until midight. So, the sources may be not buildable during development process.

  1. Get sources

We are using repo tool to manage all the yocto sources. As for the custom modules, they are placed on github and has been downloading during the Yocto build process.

How to install repo you can see here

Init the manifest:

repo init -u [email protected]:yocto-is-easy/manifest.git

Do the sync of sources:

repo sync
  1. Build docker image and run its container

Before doing this step it is recommended to include your user to the docker group.

It is created docker image to build Yocto without dependency to the development platform(Arch, Ubuntu, etc.)

From the top directory run:

source docker/env-setup.sh

Run the builder:

run.sh
  1. Set the target machine

In workdir/build/conf/local.conf change the MACHINE variable:

MACHINE ??= "raspberrypi3-64"

If you have a board of another version (like Raspberry Pi 4), so, set it.

  1. Build Yocto image

The project has several images:

  • mocto-image - release image
  • mocto-image-dbg - debug image(it includes tests for services and remote executor support)
bitbake mocto-image-dbg
  1. Flush image to SD card

SD card image is placed in the workdir/build/tmp/deploy/images/raspberrypi3-64

Use the following command to flush the image:

dd if=mocto-image-dbg-raspberrypi3-64.rpi-sdimg of=/your/sd-card/path
  1. Run Raspberry Pi

Put the card to your device, run it, connect over ssh and enjoy the result

Several commands to test image.

Check the states of services:

observe

result:

temp_check : online
test_service : online

Run one of available tests:

exec-local temp-check-tests

result:

Running main() from /home/build/workdir/build/workspace/googletest/googletest/src/gtest_main.cc
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from TempCheckTest
[ RUN      ] TempCheckTest.ok_temperature_format
[       OK ] TempCheckTest.ok_temperature_format (1647 ms)
[ RUN      ] TempCheckTest.get_temperature_time_1s
[       OK ] TempCheckTest.get_temperature_time_1s (832 ms)
[----------] 2 tests from TempCheckTest (2479 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test suite ran. (2479 ms total)
[  PASSED  ] 2 tests.

Run the client of temp-check-service (aka temp check client):

tcc

result:

Current temperature is: 22.437 C

Popular repositories Loading

  1. poky poky Public

    Python

  2. docker docker Public

    Dockerfile

  3. manifest manifest Public

  4. temp-check temp-check Public

    C++

  5. lrrp lrrp Public

    C++

  6. mocto-idf mocto-idf Public

    Mocto interface definition framework

    C++

Repositories

Showing 10 of 21 repositories
  • .github Public
    yocto-is-easy/.github’s past year of commit activity
    0 MIT 0 0 0 Updated May 27, 2024
  • mocto-packets Public
    yocto-is-easy/mocto-packets’s past year of commit activity
    0 0 0 0 Updated Apr 15, 2024
  • poky Public
    yocto-is-easy/poky’s past year of commit activity
    Python 0 0 0 0 Updated Apr 15, 2024
  • yocto-is-easy/temperature-humidity-device-plugin’s past year of commit activity
    C++ 0 0 0 0 Updated Apr 15, 2024
  • yocto-is-easy/demo-smart-device’s past year of commit activity
    C 0 0 0 0 Updated Apr 14, 2024
  • mocto-cli Public
    yocto-is-easy/mocto-cli’s past year of commit activity
    C++ 0 0 0 0 Updated Mar 15, 2024
  • yocto-is-easy/plugin-manager’s past year of commit activity
    C++ 0 0 0 0 Updated Mar 15, 2024
  • docker-apt-repo Public

    Docker base apt repository

    yocto-is-easy/docker-apt-repo’s past year of commit activity
    Dockerfile 0 MIT 0 0 0 Updated Feb 4, 2024
  • yocto-is-easy/i-plugin-manager’s past year of commit activity
    C++ 0 0 0 0 Updated Feb 4, 2024
  • mocto-idf Public

    Mocto interface definition framework

    yocto-is-easy/mocto-idf’s past year of commit activity
    C++ 0 0 0 0 Updated Nov 10, 2023

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…