



















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This exam replicates the challenges of building custom embedded Linux distributions using the Yocto Project. Candidates complete tasks involving bitbake recipes, layers, BSP creation, cross-compilation, image customization, kernel configuration, and board bring-up. It evaluates understanding of Yocto architecture, build optimization, patch workflows, and embedded debugging. Realistic exercises include creating custom images, modifying metadata, testing builds on hardware/emulators, and troubleshooting dependency issues to ensure reliable embedded Linux deployments.
Typology: Exams
1 / 91
This page cannot be seen from the preview
Don't miss anything!




















































































Question 1. Which component is responsible for initializing hardware before the Linux kernel starts? A) Bootloader B) Kernel C) Initramfs D) Systemd Answer: A Explanation: The bootloader (e.g., U-Boot) runs first, sets up CPU registers, loads the kernel into memory, and may pass device tree information before handing control to the kernel. Question 2. In Yocto terminology, what does the term “recipe” refer to? A) A list of hardware drivers B) A script that builds a specific package C) A configuration file for the kernel D) A pre‑compiled binary image Answer: B Explanation: A recipe (.bb file) contains the metadata and instructions needed by BitBake to fetch, configure, compile, and package a software component. Question 3. What is the primary purpose of the OpenEmbedded‑Core layer (meta‑oe)? A) Provide board‑specific bootloader files B) Supply a collection of common recipes and classes used by many builds C) Host the Yocto Project web interface D) Generate the final root filesystem image Answer: B
Explanation: meta‑oe contains a wide set of reusable recipes (e.g., libraries, tools) and classes that are hardware‑agnostic, forming the core of most Yocto builds. Question 4. Which Yocto Project release introduced the “buildhistory” feature? A) Jethro B) Kirkstone C) Dunfell D) Morty Answer: C Explanation: The buildhistory feature, which records detailed build statistics and differences between builds, was added in the Dunfell release (2020). Question 5. What does the variable “MACHINE” control in a Yocto build configuration? A) The host compiler version B) The target architecture and board definition C) The preferred package manager (rpm, ipk, deb) D) The license compliance mode Answer: B Explanation: MACHINE selects the target hardware (CPU, board, device tree) and determines which BSP layer and kernel configuration are used. Question 6. Which BitBake task is responsible for creating the final deployable root filesystem image? A) do_compile B) do_install C) do_rootfs
B) IMAGE_INSTALL =+ "package1" C) IMAGE_INSTALL += "package1" D) IMAGE_INSTALL = "package1" Answer: C Explanation: The “+=” operator appends a space‑separated entry to IMAGE_INSTALL while preserving existing values. Question 10. Which command displays the value of a BitBake variable for a given recipe? A) bitbake - e
A) Provide a graphical user interface for the build system B) Supply board‑specific configuration, kernel, and device tree files C) Manage license compliance reports D) Compile the SDK for host development Answer: B Explanation: A Board Support Package (BSP) layer contains the hardware‑specific metadata needed to build images for a particular board (e.g., bootloader, kernel config, device tree). Question 13. Which class is automatically inherited by recipes that build software using the GNU Autotools build system? A) cmake.bbclass B) autotools.bbclass C) pkgconfig.bbclass D) meson.bbclass Answer: B Explanation: autotools.bbclass provides standard tasks (do_configure, do_compile, etc.) and variables for packages that use the Autotools “configure && make” workflow. Question 14. In the Yocto SDK, what does the “populate_sdk” task generate? A) The final root filesystem image B) A cross‑compilation toolchain and sysroot for host developers C) Kernel modules for the target board D) A compressed tarball of all source code used in the build Answer: B Explanation: populate_sdk creates an SDK containing the cross‑compiler, headers, libraries, and environment scripts so developers can build applications on the host.
Explanation: Editing the kernel .config directly in the layer root is not a standard practice; kernel configuration is usually handled via .cfg fragments or menuconfig. Question 18. In Yocto, what does the variable “DISTRO_FEATURES” control? A) The list of host tools required for building B) Optional high‑level features (e.g., systemd, x11, bluetooth) that affect the image composition C) The set of supported target machines D) The location of the download cache Answer: B Explanation: DISTRO_FEATURES enables or disables optional components and functionalities across the entire distribution, influencing recipe selections and image features. Question 19. Which BitBake task is executed first in the normal build flow of a recipe? A) do_configure B) do_fetch C) do_compile D) do_install Answer: B Explanation: do_fetch retrieves source archives before any other tasks; it is the initial step in the task dependency chain. Question 20. What is the function of the “wic” utility in Yocto? A) Create a compressed tarball of the SDK B) Generate a bootable disk image with partition tables and filesystems C) Perform static code analysis on recipes D) Manage license compliance reports
Answer: B Explanation: wic (WIC Image Creator) builds full disk images (e.g., .wic, .iso) with specified partitions, filesystems, and bootloader data, suitable for flashing to SD cards or USB drives. Question 21. Which of the following is a correct way to add a custom kernel configuration fragment? A) Place a .cfg file in meta‑yourlayer/recipes‑kernel/linux/linux‑yourkernel.cfg B) Add the fragment to the “KERNEL_CONFIG_FRAGMENTS” variable in your layer’s conf file C) Edit the main kernel .config directly in the source directory D) Use “bitbake - c configkernel” command Answer: B Explanation: KERNEL_CONFIG_FRAGMENTS allows you to list .cfg files that BitBake will merge into the final kernel configuration during the do_configure task. Question 22. In Yocto, what does the “LICENSE” variable in a recipe specify? A) The preferred package manager for the built package B) The open‑source license(s) governing the upstream source code C) The list of hardware drivers required by the package D) The location of the source tarball Answer: B Explanation: LICENSE declares the licensing terms of the upstream software, enabling Yocto’s license compliance checks. Question 23. Which of the following is a typical benefit of using the “rm_work.bbclass”? A) Faster builds by re‑using previously compiled objects B) Reduced disk usage by deleting work directories after successful builds
Question 26. Which of the following tools is commonly used to generate a device tree source (DTS) file for a new board? A) mkimage B) dtc (Device Tree Compiler) C) u-boot-tools D) yocto-bsp Answer: B Explanation: dtc compiles .dts source files into binary .dtb blobs used by the kernel; developers edit .dts files to describe hardware. Question 27. In Yocto, what does the “PREFERRED_PROVIDER” variable control? A) The default compiler version for the build host B) Which recipe should satisfy a virtual package name (e.g., virtual/bootloader) C) The order in which layers are parsed D) The location of the download cache Answer: B Explanation: PREFERRED_PROVIDER selects a concrete recipe to provide a virtual package, ensuring deterministic builds when multiple providers exist. Question 28. Which of the following statements about the “cve-check.bbclass” is correct? A) It automatically patches source code for known CVEs during the build B) It generates a report of known CVEs affecting the packages in the image C) It disables the use of any package with a CVE D) It replaces the default license checker in Yocto Answer: B
Explanation: cve-check.bbclass queries the NVD database and produces a list of CVEs applicable to the built packages, helping maintain security awareness. Question 29. What is the effect of setting “INHERIT += "buildhistory"" in local.conf? A) Enables automatic generation of a web‑based build report after each build B) Turns on incremental compilation of recipes C) Forces all packages to be built as static libraries D) Disables the sstate cache to save disk space Answer: A Explanation: Adding the buildhistory class records detailed information about each build, which can be visualized via the Toaster web interface. Question 30. Which of the following is a common reason for a BitBake task to be skipped with the status “Skipped (already done)”? A) The task failed previously and was marked as ignored B) The task’s output already exists in the sstate cache and is up‑to‑date C) The recipe does not define that task D) The user manually disabled the task in local.conf Answer: B Explanation: BitBake checks the sstate cache; if a task’s output is present and its inputs have not changed, the task is considered complete and is skipped. Question 31. When using QEMU to test a Yocto image, which command starts the emulation for an x86_64 image? A) runqemu qemux86- 64 B) bitbake core-image-minimal - c qemu C) qemu-system-x86_64 - kernel bzImage - append “root=/dev/vda”
Answer: A Explanation: PACKAGE_CLASSES lists the supported package formats (e.g., “package_rpm”, “package_ipk”, “package_deb”); the first entry determines the default manager. Question 35. In Yocto, what does the “do_populate_sysroot” task accomplish? A) Installs the final root filesystem on the target board B) Copies compiled libraries and headers into a sysroot used for cross‑compiling dependent recipes C) Generates the bootloader image for the target D) Packs the SDK into a tarball for distribution Answer: B Explanation: do_populate_sysroot assembles the target’s headers, libraries, and development files into a sysroot that other recipes use during their own builds. Question 36. Which of the following is a valid way to add a new source repository to a recipe? A) SRC_URI = "git://github.com/user/project.git;protocol=ssh" B) SOURCE = "https://example.com/source.tar.gz" C) FETCH_URI = "ftp://example.com/source.tar.bz2" D) DOWNLOAD = "http://example.com/source.zip" Answer: A Explanation: SRC_URI specifies where BitBake should fetch source code; it supports git, http, https, ftp, and other protocols with optional parameters.
Question 37. What does the “inherit autotools” line do inside a .bb file? A) It adds support for building with CMake B) It pulls in the autotools.bbclass, providing standard configure/make tasks C) It automatically generates a license file for the recipe D) It enables kernel module compilation for the recipe Answer: B Explanation: “inherit autotools” imports the autotools class, which defines do_configure, do_compile, and other tasks for Autotools‑based projects. Question 38. Which of the following is a typical use case for the “archiver.bbclass”? A) To create source tarballs of the entire Yocto build for archival B) To compress the final root filesystem into a zip file C) To generate a signed binary package for OTA updates D) To produce a reproducible ISO image for the target Answer: A Explanation: archiver.bbclass provides functionality for creating source archives (e.g., .tar.gz) of the build artifacts, useful for backup or distribution. Question 39. In the context of Yocto, what does “OE‑CORE” stand for? A) OpenEmbedded Core – the set of essential metadata and classes shared by Yocto B) Operating Environment Core – the runtime libraries on the target C) OpenEdge Community Repository – a third‑party layer D) Original Embedded Compiler – the default cross‑compiler toolchain Answer: A Explanation: OE‑CORE (OpenEmbedded Core) is the central collection of metadata, classes, and tools that both Yocto and OpenEmbedded depend on.
Answer: A Explanation: The canonical triplet format is
C) The package must be compiled with the host compiler D) The recipe provides a bootloader for multiple boards Answer: A Explanation: allarch.bbclass marks a recipe as architecture‑independent, allowing BitBake to skip cross‑compilation and reuse the same output for all MACHINE values. Question 46. In Yocto, which term describes a “virtual” package name that can be provided by multiple concrete recipes? A) PROVIDES B) RPROVIDES C) VIRTUAL_PACKAGE D) PREFERRED_PROVIDER Answer: A Explanation: The PROVIDES variable declares that a recipe satisfies a virtual package name, enabling other recipes to depend on “virtual/xyz” without caring about the actual provider. Question 47. Which of the following is NOT a standard Yocto image type? A) core-image-minimal B) core-image-sato C) core-image-qt D) core-image-ubuntu Answer: D Explanation: core-image-ubuntu does not exist in the standard Yocto distribution; the other three are predefined image recipes. Question 48. What is the purpose of the “do_image_complete” task?
Answer: A Explanation: Enabling “systemd” would cause systemd to be used as the init system; disabling it ensures BusyBox init is the default. Question 51. Which of the following statements about the “LICENSE_FLAGS” variable is true? A) It defines the compiler flags used when building the package B) It is used to tag recipes with special license restrictions (e.g., “commercial”) for filtering C) It indicates the set of features enabled in the kernel configuration D) It specifies the binary format of the generated package Answer: B Explanation: LICENSE_FLAGS can be set to values like “commercial” or “restricted” to allow downstream users to filter or exclude recipes based on licensing policies. Question 52. What is the effect of setting “INHERIT += "rm_work"" in a Yocto configuration? A) The build system will retain all intermediate work directories after a successful build B) Work directories will be automatically removed after each task completes successfully, saving space C) The recipe will be forced to rebuild on every invocation D) The sstate cache will be disabled for all recipes Answer: B Explanation: The rm_work class deletes the work directory after a task finishes without errors, reducing disk usage. Question 53. Which of the following is the correct command to rebuild only the kernel for a given machine?
A) bitbake virtual/kernel - c compile B) bitbake linux-yocto - c cleanall && bitbake linux-yocto C) bitbake - c rebuild virtual/kernel D) bitbake virtual/kernel - c configure - f Answer: B Explanation: The virtual/kernel alias points to the kernel recipe (commonly linux-yocto). Cleaning and then building forces a full kernel rebuild. Question 54. In Yocto, what does the “BB_NO_NETWORK” variable control? A) Whether BitBake is allowed to fetch source files from the network during a build B) Whether the target image will have network support at runtime C) The maximum number of parallel fetch tasks D) The inclusion of network‑related packages in the image Answer: A Explanation: Setting BB_NO_NETWORK=1 forces BitBake to use only locally cached sources, useful for offline or reproducible builds. Question 55. Which Yocto class provides the “do_package_qa” task that checks for missing files, bad permissions, and other packaging issues? A) package.bbclass B) image.bbclass C) rootfs.bbclass D) qa.bbclass Answer: A Explanation: package.bbclass defines do_package_qa, which runs quality assurance checks on the generated binary packages.