Search code examples
embedded-linuxyocto

What kind of practical projects can I do to learn Yocto


I have started learning Yocto through Chris Simond’s book, and reached a level at which I don’t know what can I do with this knowledge in practice.

Any advice on real projects where I can exercise and apply what I learn?


Solution

  • Yocto is for creating custom embedded Linux distributions.

    And custom Linux distributions are dedicated for embedded boards (RPI, iMX, BBB, etc) (You can also build for x86)

    With Yocto you can work on two sides: Software and BSP

    1. Software:
    • Develop recipes for new projects to integrate them into your image.
    • Create custom classes to manage the project recipes
    • Create custom DISTRO for the project
    • Create custom images and packagegroups
    • etc
    1. BSP:
    • You work on Linux kernel recipe to add drivers, DTS, etc
      • Create an out-of-tree driver recipe
      • Create an in-tree driver patch
      • Work with defconfig and fragments
      • etc
    • You work on U-boot recipe to add drivers, DTS, etc
      • If you have new board, you add a complete board support
    • etc

    It is basically related to hardware.

    If you manage to have an embedded board then you can set a project idea and start the practice.

    For example:

    Hardware: RaspberryPi (All the integrated HW components are supported)

    Add-Ons:

    • Externel I²C/SPI sensor
    • USB CAN/Network peripheral
    • etc

    Idea:

    • Work on the Linux recipe to add a config fragment for the new components
    • Learn about the Linux subsystems to develop drivers for them (This is the core of Embedded Linux job)
    • Develop a simple QT5 application for the sensors data
    • Work with meta-qt5 and qt5 images, recipes and classes.
    • Develop your own recipe for the QT5 application
    • Develop your own Yocto distro
    • Since you added new HW components, you can add your new MACHINE based on RPI

    Finally, you will find your self did a lot about Yocto (Classes, images, DISTRO, MACHINE, packagegroups, patches, bbappends, new layers, recipes, etc)

    If you don't have an embedded board, you can work on the Software part with QEMU with x86 or any supported architecture in QEMU. Then, you create images, new recipes, and try to create a full image and dirstro according to your needs.

    NOTE

    • You can work with SDKs for the drivers/qt5 cross compilation
    • Use repo or kas for your project's layers collection or for pipelines auto generation