Skip to content

Learning Path: Yocto Project & Embedded Linux

A structured path from beginner to proficient Yocto developer.


Phase 1: Foundations (Week 1-2)

Goal: Understand embedded Linux concepts

  1. Read Bootlin Embedded Linux Slides (free)
  2. Download slides
  3. Focus on: cross-compilation, root filesystem, bootloaders, kernel basics
  4. Time: ~8 hours of reading

  5. Understand the Boot Process

  6. ROM → SPL/MLO → U-Boot → Kernel → Init → Userspace
  7. Device Trees: what they are and why they exist
  8. Device Tree for Dummies (Bootlin)

  9. Linux Kernel Basics

  10. Kernel vs userspace
  11. Kernel modules
  12. /proc and /sys filesystems
  13. KernelNewbies

Phase 2: Yocto Fundamentals (Week 3-4)

Goal: Understand the Yocto build system

  1. Bootlin Yocto Training (free)
  2. Download slides
  3. Download labs
  4. Covers: BitBake, recipes, layers, images, SDK
  5. Time: ~16 hours

  6. Key Concepts to Master

  7. BitBake: tasks, recipes (.bb), append files (.bbappend)
  8. Layers: what they are, priority, dependencies
  9. Variables: MACHINE, DISTRO, IMAGE_INSTALL, overrides
  10. Classes: inherit, core-image, autotools, cmake
  11. Shared state cache and reproducibility

  12. Official Documentation Deep Dive

  13. Yocto Quick Build
  14. Development Tasks Manual
  15. Variable Glossary

Phase 3: Hands-On with QEMU (Week 5)

Goal: Build and run without hardware

  1. Build for QEMU ARM

    git clone -b scarthgap git://git.yoctoproject.org/poky
    source poky/oe-init-build-env build-qemu
    # Edit conf/local.conf: MACHINE = "qemuarm"
    bitbake core-image-minimal
    runqemu qemuarm
    

  2. Exercises

  3. Add a package to the image (IMAGE_INSTALL:append)
  4. Create a simple "hello world" recipe
  5. Use devtool add to create a recipe from source
  6. Modify the kernel config with devtool modify virtual/kernel
  7. Build and test an SDK: bitbake -c populate_sdk core-image-minimal

  8. Debugging Skills

  9. bitbake -e <recipe> new_textexamine variable expansion
  10. bitbake -c devshell <recipe> new_textinteractive shell in build env
  11. bitbake-layers show-layers new_textverify layer setup
  12. bitbake -DDD <recipe> new_textverbose debug output

Phase 4: Real Hardware - BeagleBone Black (Week 6-7)

Goal: Deploy to physical hardware

  1. Follow the Getting Started Guide for BeagleBone Black

  2. Understand the Machine Configuration

  3. Read machine-configs.md
  4. Study meta-garg/conf/machine/beaglebone-black.conf
  5. Understand: DEFAULTTUNE, KERNEL_DEVICETREE, UBOOT_MACHINE

  6. Exercises

  7. Boot the minimal image via SD card
  8. Connect via serial console (115200 baud)
  9. SSH into the board over Ethernet
  10. Add a custom systemd service
  11. Toggle a GPIO from userspace
  12. Read an I2C sensor with i2c-tools

  13. Kernel Customization

  14. Add a kernel module to the build
  15. Modify the device tree to enable a peripheral
  16. Use kernel fragments (.cfg files)

Phase 5: Raspberry Pi 5 (Week 8)

Goal: Work with a different BSP

  1. Build for RPi5 using the manifest and configs in this repo

  2. Compare BSP Differences

  3. Different bootloader flow (RPi firmware → U-Boot → kernel)
  4. Different device tree structure
  5. WiFi/BT firmware requirements

  6. Exercises

  7. Enable WiFi with wpa_supplicant or NetworkManager
  8. Set up Bluetooth
  9. Use the camera interface (if available)
  10. Configure HDMI output

Phase 6: Custom Distribution (Week 9-10)

Goal: Create production-quality images

  1. Study garg-distro.conf
  2. Understand DISTRO_FEATURES
  3. systemd vs sysvinit
  4. Package management (ipk, deb, rpm)

  5. Advanced Topics

  6. Create a custom packagegroup
  7. Implement an update mechanism (SWUpdate, RAUC, or Mender)
  8. Set up read-only rootfs with overlay
  9. Implement secure boot chain
  10. Optimize boot time (< 5 seconds)

  11. Production Hardening

  12. Remove debug-tweaks
  13. Set up user accounts and passwords
  14. Enable SELinux or AppArmor
  15. Configure firewall rules
  16. Sign packages and verify integrity

Phase 7: Advanced Topics (Ongoing)

Custom BSP Development

  • Write a machine configuration from scratch
  • Port U-Boot to a new board
  • Create device tree overlays

CI/CD for Embedded

  • Automate builds with Jenkins or GitLab CI
  • Use kas for reproducible build configurations
  • Implement automated testing with LAVA or pytest

Linaro & Arm Ecosystem

Performance & Optimization

  • Boot time optimization (Bootlin training)
  • Runtime profiling with perf
  • Memory optimization for constrained devices
  • Kernel size reduction

Priority Resource Time
1 Bootlin Yocto slides 16h
2 Yocto Quick Build (official) 2h
3 This repo's getting-started.md 4h
4 Bootlin Embedded Linux slides 8h
5 Yocto Dev Tasks Manual 8h
6 Linaro Connect talks (selected) 4h
7 Mastering Embedded Linux Programming (book) 20h

Key Takeaways

  • Start with QEMU new_textno hardware needed, fast iteration
  • Read the Bootlin materials new_textbest free training available
  • Use devtool new_textit's the modern workflow for recipe development
  • Understand variables and overrides new_textthis is 80% of Yocto debugging
  • Keep layers clean new_textnever modify upstream layers directly
  • Share DL_DIR and SSTATE_DIR new_textsaves hours on rebuilds