Embedded Linux on i.MX6ULL

From First Boot to First Driver — The Raw Approach

An explanatory, mainline-first guide to bringing up embedded Linux on the i.MX6ULL. Built for the MCU engineer who wants to understand every byte, not just bitbake build.

Versions targeted throughout the book

  • Linux kernel: v6.6 LTS (current driver APIs and DTS paths)

  • U-Boot: v2026.04 (or latest at time of read; SPL/FIT examples stable since v2024)

  • GCC/binutils: 13.x for the cross-toolchain

  • Buildroot: 2026.02; Yocto: scarthgap (5.0) / kirkstone (4.0)

If you build against a different kernel, two known divergences matter most: (1) device-tree files for i.MX moved from arch/arm/boot/dts/ to arch/arm/boot/dts/nxp/imx/ in v6.5, and (2) several driver APIs changed between v6.3 and v6.11 (i2c_driver.probe lost its second arg in v6.3; class_create lost its THIS_MODULE arg in v6.4; i2c_driver.remove / platform_driver.remove return void since v6.11). All snippets in this book follow the v6.6 conventions.


What this is

A first-principles embedded Linux book in progress, aimed at engineers who already write firmware for microcontrollers and want to take the same first-principles approach to Linux. We build the entire stack by hand — bare-metal startup, U-Boot from source, mainline Linux, hand-built root filesystem, every driver subsystem — before adopting any framework that hides what just happened.

The target board is the i.MX6ULL on the Point Atom MINI (or ALPHA — both work; pin assignments are noted where they differ). Every chapter explains the pattern — pin lookups, register layouts, kernel APIs — that transfers to any i.MX6ULL board, and most patterns transfer to any Cortex-A Linux SoC.

Approach

  • Mainline-first. We use current mainline U-Boot and Linux throughout. The 5–10 hours saved up front by adopting a vendor fork is paid back many times over the life of a product as security fixes, new toolchains, and modern features (DT bindings YAML validation, FIT image overlays, PREEMPT_RT in mainline, Rust-for-Linux) become reachable.

  • Explanatory, not procedural. Every chapter follows the same seven-section template: What / Why / How / Focus / Lab / Pitfalls / Going deeper. Reading a chapter, you should always know which paragraph answers which question.

  • Hand-built where it teaches. Our own bare-metal stack (Part II), our own image-builder (Ch 11), our own cross-toolchain (Ch 122). Tools become productivity wins only after you can do without them.

  • Production-grade where it matters. Watchdog, runtime PM, PREEMPT_RT real-time, secure boot, OTA, mainline patch-submission, CI/CD — these chapters appear because real products require them, not because the dev board does.

  • Virtualization without magic. Part IX is drafted as a buildable advanced path: QEMU first, Xen next, then real i.MX6ULL constraints, Jailhouse in QEMU ARM64, and STM32MP1 Linux+RTOS where the hardware makes that split useful.

Reading order

  1. Start with Chapter 1 — Preface for the philosophy and the 7-section chapter template (What / Why / How / Focus / Lab / Pitfalls / Going deeper).

  2. Then Chapter 2 — What “Embedded Linux” actually is for the vocabulary.

  3. Follow Part I and Part II in order — they build on each other and the labs assume prior chapters.

  4. Part VI’s driver chapters are mostly sibling-independent — pick the subsystem you need; the rest can wait.

The full Table of Contents gives the chapter list, dependency graph, and what each Part covers.

Status

Part

Chapters

Status

Part I — Foundations

8

✅ Drafted

Part II — Bare-metal i.MX6ULL

10 + 3 supplementary (18A–C)

✅ Drafted

Part III — U-Boot, deeply

6 + 2 supplementary (22A, 23A)

✅ Drafted

Part IV — The Kernel

6 + 2 supplementary (27A, 30A)

✅ Drafted

Part V — Root filesystem & user space

5 + 3 supplementary (35A–C)

✅ Drafted

Part VI — Driver development

20 + 14 supplementary

✅ Drafted (Ch 36–55I + all insertions)

Part VII — Device cookbook (v1.3, new)

54 chapters (Ch 64–117)

✅ Drafted

Part VIII — Debug, production, advanced

9 + 5 supplementary

✅ Drafted

Part IX — Applied virtualization

13 chapters (Ch 127–139)

Drafted, lab validation pending

Total

131 numbered + 29 supplementary = 160

Full draft; Part IX lab validation pending

Hardware

  • Board: Point Atom (正点原子) i.MX6ULL MINI (or ALPHA — both work; the boards differ in onboard peripherals)

  • SoC: NXP i.MX6ULL, Cortex-A7 @ 696 MHz

  • DRAM: 512 MiB DDR3L

  • Boot media: SD card / eMMC

  • Debug: UART1 over USB-serial (CP2102 / CH340), optional JTAG via FT2232H or J-Link

Host

  • OS: Native Linux (Ubuntu 22.04 LTS recommended)

  • Toolchains: project-local Arm GNU Toolchains under ~/imx6ull/toolchains/: arm-none-linux-gnueabihf- for Linux and arm-none-eabi- for bare metal

  • Tools: TFTP server, NFS server, picocom, uuu / imx_usb_loader for USB-OTG flashing

License

  • Book prose (this site): CC-BY-SA-4.0 (tentative — finalized before public release)

  • Companion code (in code/ of the repository): MIT OR Apache-2.0, with GPL-2.0-only for kernel-module chapters where required

Contributing & errata

This is a work in progress. If you spot an error or have suggestions:

  • Errata: open an issue on the GitHub repository.

  • Pull requests for typos, broken links, and clarifications are welcome.

  • Substantive changes — please open an issue first to discuss.


Continue to Chapter 1 — Preface