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¶
- Read Bootlin Embedded Linux Slides (free)
- Download slides
- Focus on: cross-compilation, root filesystem, bootloaders, kernel basics
-
Time: ~8 hours of reading
-
Understand the Boot Process
- ROM → SPL/MLO → U-Boot → Kernel → Init → Userspace
- Device Trees: what they are and why they exist
-
Linux Kernel Basics
- Kernel vs userspace
- Kernel modules
/procand/sysfilesystems- KernelNewbies
Phase 2: Yocto Fundamentals (Week 3-4)¶
Goal: Understand the Yocto build system¶
- Bootlin Yocto Training (free)
- Download slides
- Download labs
- Covers: BitBake, recipes, layers, images, SDK
-
Time: ~16 hours
-
Key Concepts to Master
- BitBake: tasks, recipes (.bb), append files (.bbappend)
- Layers: what they are, priority, dependencies
- Variables:
MACHINE,DISTRO,IMAGE_INSTALL, overrides - Classes:
inherit,core-image,autotools,cmake -
Shared state cache and reproducibility
-
Official Documentation Deep Dive
- Yocto Quick Build
- Development Tasks Manual
- Variable Glossary
Phase 3: Hands-On with QEMU (Week 5)¶
Goal: Build and run without hardware¶
-
Build for QEMU ARM
-
Exercises
- Add a package to the image (
IMAGE_INSTALL:append) - Create a simple "hello world" recipe
- Use
devtool addto create a recipe from source - Modify the kernel config with
devtool modify virtual/kernel -
Build and test an SDK:
bitbake -c populate_sdk core-image-minimal -
Debugging Skills
bitbake -e <recipe>new_textexamine variable expansionbitbake -c devshell <recipe>new_textinteractive shell in build envbitbake-layers show-layersnew_textverify layer setupbitbake -DDD <recipe>new_textverbose debug output
Phase 4: Real Hardware - BeagleBone Black (Week 6-7)¶
Goal: Deploy to physical hardware¶
-
Follow the Getting Started Guide for BeagleBone Black
-
Understand the Machine Configuration
- Read machine-configs.md
- Study
meta-garg/conf/machine/beaglebone-black.conf -
Understand: DEFAULTTUNE, KERNEL_DEVICETREE, UBOOT_MACHINE
-
Exercises
- Boot the minimal image via SD card
- Connect via serial console (115200 baud)
- SSH into the board over Ethernet
- Add a custom systemd service
- Toggle a GPIO from userspace
-
Read an I2C sensor with
i2c-tools -
Kernel Customization
- Add a kernel module to the build
- Modify the device tree to enable a peripheral
- Use kernel fragments (
.cfgfiles)
Phase 5: Raspberry Pi 5 (Week 8)¶
Goal: Work with a different BSP¶
-
Build for RPi5 using the manifest and configs in this repo
-
Compare BSP Differences
- Different bootloader flow (RPi firmware → U-Boot → kernel)
- Different device tree structure
-
WiFi/BT firmware requirements
-
Exercises
- Enable WiFi with
wpa_supplicantor NetworkManager - Set up Bluetooth
- Use the camera interface (if available)
- Configure HDMI output
Phase 6: Custom Distribution (Week 9-10)¶
Goal: Create production-quality images¶
- Study
garg-distro.conf - Understand DISTRO_FEATURES
- systemd vs sysvinit
-
Package management (ipk, deb, rpm)
-
Advanced Topics
- Create a custom packagegroup
- Implement an update mechanism (SWUpdate, RAUC, or Mender)
- Set up read-only rootfs with overlay
- Implement secure boot chain
-
Optimize boot time (< 5 seconds)
-
Production Hardening
- Remove
debug-tweaks - Set up user accounts and passwords
- Enable SELinux or AppArmor
- Configure firewall rules
- 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
kasfor reproducible build configurations - Implement automated testing with LAVA or pytest
Linaro & Arm Ecosystem¶
- Linaro Connect recordings new_textDeep technical talks
- Arm Architecture Reference Manual new_textISA details
- Trusted Firmware new_textSecure boot
Performance & Optimization¶
- Boot time optimization (Bootlin training)
- Runtime profiling with
perf - Memory optimization for constrained devices
- Kernel size reduction
Recommended Reading Order¶
| 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
devtoolnew_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_DIRandSSTATE_DIRnew_textsaves hours on rebuilds