Roadmaps / BeagleBone / Phase 1
Phase 1 of 4 · Study weeks 1-4
Board, boot chain and a measured baseline
This phase lets you boot, debug and recover the board, and it tells you how badly plain Linux handles timing, so Phase 3 has a number to beat. Start here: Bootlin's Embedded Linux labs for the BeagleBone Black (bootlin.com/doc/training).
Topics every week
- Week 18 h
- AM335x block diagram
- flash the Debian 13 IoT image from beagleboard.org/distros with the
v6.12kernel (the RT package exists only for 6.12, so use 6.12 for every checkpoint) - serial console at 115200 baud
- USB and Ethernet access
Hand inBoot log captured over serial, and a one-page board map (which pins, which buses, which are 3.3 V)
- Week 28 h
- Boot chain: ROM, SPL (
MLO), U-Boot, kernel and device tree, init uEnv.txt- the boot button
- recovery from a bad card
Hand inAn annotated boot log with a timestamp for each stage, and a recovery drill you timed
- Boot chain: ROM, SPL (
- Week 38 h
- GPIO from user space with libgpiod v2 (v1 tools differ)
- the image's default pin multiplexing and
gpioinfo(overlays come in Week 5) - edge events and their timestamps
- why sysfs GPIO is deprecated
Hand inA C program that toggles one pin and a second pin that reads it back by jumper wire, with kernel timestamps
- Week 48 h
- Latency measurement:
cyclictest,stress-ng, histograms - stock kernel against the RT kernel package
- mean against worst case
Hand inBaseline report with your written prediction beside the result, and Checkpoint 1
- Latency measurement:
Practice projects
- Boot-time budget. Cut the time from power to a login prompt by 30% on your image without removing the services you need. Done when a timestamped table shows the before and after for each stage and the saving is at least 30%.
- Recovery card. Build a microSD card that restores a known-good eMMC image with one button press. Done when, after you back up the eMMC image, you corrupt the eMMC on purpose and the card restores it with no keyboard.
- Edge-latency histogram. Capture 100,000 edge timestamps and plot the delay histogram. Done when the plot and the raw data are in the repository and the script flags any delay over 2 ms.
GitHub repos to study
Last commits checked 22 Nov 2026, from shallow clones.
| Repo | What to read | Week |
|---|---|---|
| beagleboard/docs.beagleboard.io (last commit Apr 2026) | boards/beaglebone/black and books/beaglebone-cookbook | 1 |
| RobertCNelson/omap-image-builder (Nov 2026) | configs/ recipe for the Debian 13 image: how an image is assembled | 2 |
| brgl/libgpiod (Nov 2026) | tools/ and examples/: how edge events and timestamps work | 3 |
| RobertCNelson/bb-kernel (Nov 2026) | Branches am33x-v6.12 and am33x-rt-v6.12, and build_kernel.sh | 4 |
Milestone checkpoint
Build the baseline harness (Checkpoint 1 in the table above). One program toggles a pin at 1 kHz. A second path records every edge on the looped-back input with its kernel timestamp. A script turns the timestamps into p50, p99 and max, and flags any interval over 1 ms (twice the 500 µs edge interval). Run it idle, loaded on the stock kernel, and loaded on the RT kernel, with the CPU governor fixed at performance for all runs (the default governor changes the clock and confounds the result). Install the RT kernel with the matching bbb.io-kernel-*-bone-rt package and select it in /boot/uEnv.txt. Done when the Checkpoint 1 row passes. Evidence: raw timestamp files, the report, and ADR-1 on how you chose the load profile.
The RT kernel on this board comes from a patch set carried in the Beagle kernel tree. Mainline PREEMPT_RT arrived in Linux 6.12 for x86, 64-bit Arm and RISC-V, and for 32-bit Arm only in Linux 7.1 (released mid-June 2026; the code landed in 7.1-rc1 in April), so the AM335x is a late case. Say in the report which kernel you ran. Ten minutes is a screening test: a maximum over 1.2 million intervals says nothing about an event that happens once a day. Report the sample count and say what the test cannot show; the 24-hour soak in Checkpoint 4 extends it.
Check yourself
Answer each question in your head first, then open it to check.
What runs between power-on and
initon this board, and which stage loads which?The ROM code loads SPL (MLO) from the boot device chosen by the boot pins and button. SPL starts U-Boot, which loads the kernel and device tree, and the kernel startsinit.Why is the maximum latency more useful than the mean for a real-time design?
A deadline is missed by the worst case, not the average. One late event can scrap a part.Why did the kernel move away from sysfs GPIO, and what do edge events give you instead?
The character-device interface replaced sysfs for race and permission reasons. Edge events deliver a timestamp taken in the kernel, not in your thread.Give two reasons a real-time thread can still miss a deadline on an RT kernel.
Page faults (unless memory is locked), priority inversion, a driver that holds a lock or disables interrupts for long, or an interrupt handler that is not threaded.Which header voltages are safe for a signal from a 5 V sensor, and what do you do about it?
None directly: the pins are 3.3 V and not 5 V tolerant. Use a level shifter or a voltage divider rated for the signal speed.