Share E-Book
Scan to open this page

Scan with your phone to open this page

AuthorGiometti R.

No description

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on guide for embedded developers who want to move beyond stock Yocto images and learn to customize every layer—from the build environment and BitBake internals to recipes and kernel configuration—using real i.MX8MP hardware examples. 【Book Arc】 - **Opening (~0%–10%)**: Sets up the physical and logical environment—serial console access via Minicom, chroot setup for root filesystem work, and the first BitBake build. This stage solves the "how do I even start" problem with concrete commands and expected outputs. - **Early (~10%–23%)**: Moves into source management with `repo`, explains the layer structure (meta-poky, meta-freescale, meta-imx, etc.), and walks through the core configuration files: `local.conf`, `bblayers.conf`, and `distro.conf`. This is where you learn what the build system actually reads and why. - **Early-to-Middle (~23%–39%)**: Introduces the essential toolset—`bitbake-layers` for inspecting overlays and appends, and `devtool` for creating workspaces, modifying recipes, and deploying to live targets. The devshell workflow for patching code (like fixing a `devmem2` warning) is a highlight. - **Middle (~39%–48%)**: Dives into BitBake internals: variable expansion rules (`$VAR` vs `${VAR}`), Python inline functions, `bb.utils.contains()`, and the difference between immediate (`:=`) and lazy (`=`) assignment. This is the "aha" chapter for understanding why recipes behave the way they do. - **Late (~48%–end)**: Focuses on recipes themselves—naming conventions (`name_version.bb`), how `PN` and `PV` are derived, and the structure of recipe directories with patches and source files. The vsftpd example shows a complete, real-world recipe layout. 【Key Takeaways】 - **Serial console and chroot are the first practical skills** (Opening): You need Minicom for device access and a properly configured `schroot` (with bind mounts for `/proc`, `/sys`, `/dev`, `/home`, `/tmp`) to manipulate root filesystems safely. This is the foundation for all later debugging. - **The build environment is driven by three key config files** (Early): `local.conf` (machine, distro, TMPDIR), `bblayers.conf` (which layers are active), and `distro.conf` (distribution features). Understanding these means you can predict and control what BitBake does. - **`repo` is essential for managing multi-layer source trees** (Early): The `repo status` and `repo diff` commands reveal exactly what's modified or deleted across all layers—critical when you're tracking custom changes against upstream. - **`devtool` is the fastest path to recipe modification** (Early-to-Middle): It auto-creates a workspace, generates `.bbappend` files, and lets you edit source in place. The `devtool status` output shows exactly where your changes live, and `deploy-target`/`undeploy-target` push changes to live hardware. - **BitBake variable expansion is subtle and shell-dependent** (Middle): `${VAR}` is expanded by BitBake, while `$VAR` is left for the shell—this distinction causes real bugs. Use `bitbake <recipe> -e | grep 'VAR='` to inspect actual values. - **Inline Python gives BitBake its power** (Middle): Functions like `d.getVar()` and `bb.utils.contains()` let you compute variable values dynamically. The `:=` immediate assignment is required when reading environment variables via `BB_ORIGENV`, or you'll get errors. - **Recipe filenames encode identity** (Late): `name_version.bb` determines `PN` and `PV` automatically. Git-tracked projects use `name_git.bb` since they lack release versions. Hyphens are allowed in names but not versions—this is a hard parsing rule. 【Reading Tips】 - **Skim the first 10% if you're experienced**: The serial console and chroot setup is standard embedded practice. Jump ahead to the layer configuration and `repo` sections if you already have a working build host. - **Deep-read the BitBake internals chapter (around 40–48%)**: This is the intellectual core of the book. Work through the `cy-test` recipe examples yourself—they're small but reveal how variable expansion and Python functions actually behave. - **Use the devtool chapter as a reference, not a cover-to-cover read**: The command outputs are verbose. Focus on the workflow: create workspace → modify source → rebuild → deploy. Come back when you need a specific subcommand. - **Pay attention to the warning messages during builds**: The book explicitly notes that GPLv2 license warnings are non-fatal. Learning to distinguish "safe" warnings from real errors will save you hours of panic. - **The vsftpd recipe example (late) is worth studying**: It shows a complete, real recipe with patches and source layout. Use it as a template for your own custom recipes. 【Coverage Limits】 The excerpts do not cover kernel configuration, U-Boot customization, or package group management in detail—these topics are likely in later chapters not included in this sample. The guide focuses on the build environment, BitBake, and recipe fundamentals.
Excerpt 1
r to get access to the serial console. In our case, we use the very popular serial communication program called Minicom, as reported below: $ minicom -o -c o...
View in text
Excerpt 2
ENSE = "MIT" inherit core-image IMAGE_ROOTFS_SIZE ?= "8192" IMAGE_ROOTFS_EXTRA_SPACE:append = "{@bb.utils.contains$("DISTRO_FEATURES ", "systemd", " + 4096",...
View in text
Excerpt 3
t 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] 120 | sprintf(fmt_str, "Read at address 0x%%08lX (%%p): 0x%%0%dlX \n", 2*data_size); Now we can f...
View in text
Excerpt 4
ke InTernals 5.2.3 Prepending, Appending, and Redefinition As per variable, we can append, prepend, or completely redefine a task. And we can easily explain...
View in text
Excerpt 5
ation directory, and then it moves generated files into D. The do_install task is defined as shown below: addtask install after do_compile do_install[dirs] =...
View in text
Excerpt 6
C) at 20C Reset cause: POR Model: CY board i.MX8MPlus iCore DRAM: 4 GiB Core: 56 devices, 21 uclasses, devicetree: separate MMC: FSL_SDHC: 1, FSL_SDHC: 2 Yes...
View in text
Excerpt 7
fy these as desired -PV = "1.5.0+git${SRCPV}" -SRCREV = "v1.5.0" +LOG2CB_VERSION = "1.5.0" +PV = "${LOG2CB_VERSION}+git${SRCPV}" +SRCREV = "v${LOG2CB_VERSION...
View in text
Excerpt 8
build Python modules from PyPI, the Python Package Index. By default it determines the PyPI package name based upon BPN (stripping the “python-” or “python3-...
View in text
Tags
AI categories
LinuxBackendCode
Publish Year: 2025
Language: English
File Format: PDF
File Size: 17.0 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…