Embedded Linux + Yocto Interview Questions

PART 1 – Embedded Linux Fundamentals

Beginner

  1. What is Embedded Linux?
  2. What is the difference between Linux and Embedded Linux?
  3. What are the major components of an Embedded Linux system?
  4. What is a Linux distribution?
  5. What is a BSP?
  6. What is a bootloader?
  7. What is a kernel?
  8. What is a root filesystem?
  9. What is a device tree?
  10. What is a cross compiler?
  11. What is cross compilation?
  12. What is a toolchain?
  13. What are GCC, binutils and glibc?
  14. What is an architecture-specific toolchain?
  15. What is the difference between host, target and build machine?
  16. What is an embedded target?
  17. What is /boot?
  18. What is /etc?
  19. What is /dev?
  20. What is /proc?
  21. What is /sys?
  22. What is /tmp?
  23. What is /var?
  24. What is /usr?
  25. What is /lib?
  26. What happens when Linux boots?
  27. What is the Linux boot sequence?
  28. What is firmware?
  29. What is hardware initialization?
  30. What is a console?
  31. What is a serial console?
  32. What is UART?
  33. Why is UART commonly used for debugging embedded Linux?
  34. What is SSH?
  35. What is Telnet?
  36. SSH vs Telnet?
  37. What is BusyBox?
  38. Why is BusyBox commonly used in Embedded Linux?
  39. What is init?
  40. What is PID 1?
  41. What is systemd?
  42. systemd vs SysVinit?
  43. What is a daemon?
  44. What is a service?
  45. What is a shell?
  46. What is Bash?
  47. What is a process?
  48. What is a thread?
  49. Process vs thread?
  50. What is a signal?

PART 2 – Embedded Linux Architecture

  1. Explain the complete Embedded Linux architecture.
  2. Explain:
Application
     ↓
Libraries
     ↓
System Calls
     ↓
Linux Kernel
     ↓
Device Drivers
     ↓
Hardware
  1. What happens when an application calls open()?
  2. What happens when an application calls read()?
  3. What happens when an application calls write()?
  4. What is a system call?
  5. Why can’t user applications directly access hardware?
  6. User space vs kernel space?
  7. What is privilege level?
  8. What is kernel mode?
  9. What is user mode?
  10. How does an application communicate with a driver?
  11. What is /dev?
  12. How are device nodes created?
  13. What is udev?
  14. What is devtmpfs?
  15. What is sysfs?
  16. What is procfs?
  17. What is debugfs?
  18. What is tmpfs?
  19. What is initramfs?
  20. initramfs vs root filesystem?
  21. What is NFS root filesystem?
  22. Why use NFS during embedded development?
  23. What is a read-only root filesystem?
  24. Why would an embedded system use a read-only rootfs?

PART 3 – Boot Process

Extremely Important

  1. Explain the Embedded Linux boot sequence from power-on to application.

Expected:

Power ON
   ↓
ROM / Boot ROM
   ↓
Bootloader
   ↓
Hardware initialization
   ↓
Load Kernel
   ↓
Load Device Tree
   ↓
Kernel initialization
   ↓
Mount root filesystem
   ↓
Start PID 1
   ↓
Start services
   ↓
Application
  1. What is Boot ROM?
  2. What is SPL?
  3. What is U-Boot?
  4. Why is U-Boot commonly used?
  5. U-Boot vs BIOS?
  6. What is UEFI?
  7. U-Boot vs UEFI?
  8. What is SPL?
  9. Why do we need SPL?
  10. What is bootcmd?
  11. What is bootargs?
  12. What is printenv?
  13. What is setenv?
  14. What is saveenv?
  15. What is bootm?
  16. What is booti?
  17. What is bootz?
  18. What is kernel image Image?
  19. Image vs zImage?
  20. What is uImage?
  21. Image vs uImage?
  22. What is FIT image?
  23. What is extlinux.conf?
  24. What is kernel command line?
  25. How does the kernel receive boot arguments?
  26. What is:
console=ttyS0,115200
  1. What is:
root=/dev/mmcblk0p2
  1. What is:
rootwait
  1. What is:
rw
  1. What is:
ro
  1. What happens if root filesystem cannot be mounted?
  2. What is kernel panic?
  3. How do you debug a kernel boot failure?

PART 4 – Linux Kernel Basics

  1. What is the Linux kernel?
  2. Monolithic kernel vs microkernel?
  3. Why is Linux called a monolithic kernel?
  4. What is a modular kernel?
  5. What is a kernel module?
  6. Built-in driver vs loadable module?
  7. What is:
insmod
  1. What is:
modprobe
  1. insmod vs modprobe?
  2. What is:
lsmod
  1. What is:
rmmod
  1. What is:
modinfo
  1. What is /lib/modules/<kernel-version>?
  2. What is EXPORT_SYMBOL()?
  3. EXPORT_SYMBOL vs EXPORT_SYMBOL_GPL?
  4. What is kernel configuration?
  5. What is .config?
  6. What is defconfig?
  7. What is menuconfig?
  8. What is:
make menuconfig
  1. What is:
make defconfig
  1. What is Kconfig?
  2. What is Kbuild?
  3. Kconfig vs Kbuild?

PART 5 – Linux Device Tree

Must Know

  1. What is Device Tree?
  2. Why was Device Tree introduced?
  3. What problem does Device Tree solve?
  4. What is DTS?
  5. What is DTSI?
  6. DTS vs DTSI?
  7. What is DTB?
  8. DTS → DTB conversion?
  9. What is Device Tree Compiler?
  10. What is:
dtc
  1. Explain a Device Tree node.
  2. What is compatible?
  3. What is reg?
  4. What is interrupts?
  5. What is clocks?
  6. What is clock-names?
  7. What is gpio?
  8. What is gpio-controller?
  9. What is status = "okay"?
  10. What does:
status = "disabled";

mean?

  1. What are phandles?
  2. What is &uart0?
  3. What is Device Tree overlay?
  4. What is aliases?
  5. What is chosen node?
  6. What is the memory node?
  7. How does a driver match with Device Tree?
  8. Explain:
compatible → driver matching → probe()
  1. How do you debug Device Tree issues?

PART 6 – Linux Device Drivers

  1. What is a device driver?
  2. Why do we need drivers?
  3. Character vs block vs network driver?
  4. What is a character device?
  5. What is a block device?
  6. What is a network device?
  7. What is major number?
  8. What is minor number?
  9. What is dev_t?
  10. What is struct file_operations?
  11. Explain:
open()
read()
write()
ioctl()
mmap()
poll()
release()
  1. What is copy_to_user()?
  2. What is copy_from_user()?
  3. Why can’t we directly dereference a user-space pointer?
  4. What is kmalloc()?
  5. What is kzalloc()?
  6. What is vmalloc()?
  7. kmalloc() vs vmalloc()?
  8. What is GFP_KERNEL?
  9. What is GFP_ATOMIC?
  10. GFP_KERNEL vs GFP_ATOMIC?
  11. What is devm_*()?
  12. Why use devm-managed resources?
  13. What is probe()?
  14. What is remove()?
  15. What is driver binding?
  16. What is driver unbinding?
  17. What is platform driver?
  18. What is platform device?
  19. Why are platform drivers commonly used in SoC systems?
  20. What is platform_driver?
  21. What is platform_device?
  22. What is platform_get_resource()?
  23. What is devm_ioremap_resource()?
  24. What is ioremap()?
  25. What is MMIO?
  26. MMIO vs port I/O?

PART 7 – Interrupts

  1. What is an interrupt?
  2. Hardware interrupt vs software interrupt?
  3. What is IRQ?
  4. What is IRQ number?
  5. What is ISR?
  6. What is interrupt handler?
  7. What is request_irq()?
  8. What is free_irq()?
  9. What is threaded IRQ?
  10. Hard IRQ vs threaded IRQ?
  11. What can you do inside an ISR?
  12. What should you NOT do inside an ISR?
  13. Why can’t you sleep in interrupt context?
  14. What is interrupt context?
  15. What is process context?
  16. What is bottom half?
  17. What is top half?
  18. What is tasklet?
  19. What is workqueue?
  20. Tasklet vs workqueue?
  21. What is softirq?
  22. Softirq vs tasklet?
  23. What is interrupt affinity?
  24. What is interrupt storm?
  25. What is shared IRQ?
  26. What is edge-triggered interrupt?
  27. What is level-triggered interrupt?

PART 8 – Synchronization

  1. Why is synchronization required?
  2. What is race condition?
  3. What is critical section?
  4. What is mutex?
  5. What is semaphore?
  6. What is spinlock?
  7. Mutex vs spinlock?
  8. Binary semaphore vs mutex?
  9. What is read-write lock?
  10. What is atomic operation?
  11. What is atomic_t?
  12. What is memory barrier?
  13. Why are memory barriers required?
  14. What is deadlock?
  15. What are the conditions for deadlock?
  16. What is priority inversion?
  17. How can priority inversion be handled?
  18. Can mutex be used in interrupt context?
  19. Can spinlock be used in process context?
  20. What happens if you sleep while holding a spinlock?

PART 9 – Linux Memory Management

  1. What is virtual memory?
  2. Physical vs virtual address?
  3. What is MMU?
  4. What is page?
  5. What is page table?
  6. What is TLB?
  7. What is page fault?
  8. Minor vs major page fault?
  9. What is kernel virtual address?
  10. What is user virtual address?
  11. What is DMA?
  12. What is DMA mapping?
  13. What is cache coherency?
  14. What is coherent DMA?
  15. Streaming DMA vs coherent DMA?
  16. What is CMA?
  17. What is reserved memory?
  18. What is memory fragmentation?
  19. What is slab allocator?
  20. SLAB vs SLUB?
  21. What is page allocator?

PART 10 – Linux System Programming

  1. What is a process?
  2. What is PID?
  3. What is PPID?
  4. What is fork()?
  5. What is exec()?
  6. fork() vs exec()?
  7. What is wait()?
  8. What is waitpid()?
  9. What is zombie process?
  10. What is orphan process?
  11. What is daemon process?
  12. What is exit()?
  13. What is _exit()?
  14. exit() vs _exit()?
  15. What is IPC?
  16. Types of IPC?
  17. Pipe?
  18. Named pipe?
  19. Message queue?
  20. Shared memory?
  21. Semaphore?
  22. Socket?
  23. Signal?
  24. Shared memory vs pipe?
  25. Message queue vs shared memory?
  26. What is POSIX?
  27. POSIX threads?
  28. What is pthread_create()?
  29. What is pthread_join()?
  30. What is pthread_mutex?
  31. What is condition variable?
  32. What is thread scheduling?

PART 11 – Linux Networking

  1. What is socket?
  2. TCP vs UDP?
  3. What is IP address?
  4. MAC address vs IP address?
  5. What is ARP?
  6. What is DHCP?
  7. What is DNS?
  8. What is routing?
  9. What is gateway?
  10. What is subnet mask?
  11. What is loopback?
  12. What is Ethernet?
  13. What is CAN?
  14. What is SocketCAN?
  15. How do you bring up an interface?
  16. Explain:
ip link
ip addr
ip route
  1. How do you capture packets?
  2. What is tcpdump?
  3. What is ethtool?
  4. How do you debug network connectivity?

PART 12 – Linux Debugging

  1. How do you debug an Embedded Linux application?
  2. How do you debug a kernel crash?
  3. What is dmesg?
  4. What is journalctl?
  5. What is strace?
  6. What is ltrace?
  7. What is GDB?
  8. GDB vs KGDB?
  9. What is core dump?
  10. How do you analyze a core dump?
  11. What is gdbserver?
  12. How do you remotely debug an embedded application?
  13. What is perf?
  14. What is ftrace?
  15. What is trace-cmd?
  16. What is printk?
  17. printk vs pr_info/pr_err?
  18. What is dynamic debug?
  19. What is lockdep?
  20. What is KASAN?
  21. What is KCSAN?
  22. What is kmemleak?
  23. How do you debug memory leaks?
  24. How do you debug CPU utilization?
  25. How do you debug high boot time?
  26. How do you debug random kernel crashes?

PART 13 – Linux Build System

  1. What is a Linux kernel build?
  2. What is Makefile?
  3. What is recursive Make?
  4. What is cross compilation?
  5. What is ARCH?
  6. What is CROSS_COMPILE?

Example:

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
  1. What is toolchain prefix?
  2. What is sysroot?
  3. What is libc?
  4. glibc vs musl?
  5. glibc vs uClibc?
  6. What is static linking?
  7. What is dynamic linking?
  8. Static vs dynamic linking?
  9. What is ELF?
  10. What is executable?
  11. What is shared library?
  12. What is .so?
  13. What is .a?
  14. What is linker?
  15. What is loader?
  16. What is ld.so?

PART 14 – Yocto Fundamentals

Most Important for Yocto Interviews

  1. What is Yocto Project?
  2. Is Yocto an operating system?
  1. What does Yocto provide?
  2. What is OpenEmbedded?
  3. Yocto vs OpenEmbedded?
  4. What is Poky?
  5. Is Poky the Yocto Project?
  6. What is BitBake?
  7. What is a recipe?
  8. What is .bb file?
  9. What is .bbappend?
  10. What is .inc file?
  11. What is layer?
  12. What is metadata?
  13. What is machine configuration?
  14. What is distro configuration?
  15. What is image recipe?
  16. What is package recipe?
  17. What is packagegroup?
  18. What is BSP layer?
  19. What is application layer?
  20. What is distro layer?
  21. What is meta layer?
  22. Why is Yocto layer-based?

PART 15 – Yocto Architecture

  1. Explain Yocto architecture.
BitBake
   ↓
Metadata
   ↓
Recipes
   ↓
Classes
   ↓
Configuration
   ↓
Tasks
   ↓
Packages
   ↓
Root Filesystem
   ↓
Image
  1. What is metadata?
  2. What is BitBake datastore?
  3. What is parsing?
  4. What is task execution?
  5. What is dependency resolution?
  6. What is package generation?
  7. What is image generation?
  8. What is deploy directory?
  9. What is tmp?
  10. What is downloads?
  11. What is sstate-cache?
  12. What is buildhistory?
  13. What is conf/local.conf?
  14. What is conf/bblayers.conf?
  15. What is MACHINE?
  16. What is DISTRO?
  17. What is TARGET_ARCH?
  18. What is TARGET_SYS?
  19. What is BUILD_SYS?
  20. What is HOST_SYS?

PART 16 – Yocto Recipes

  1. Explain a basic Yocto recipe.
  2. What is:
SUMMARY
DESCRIPTION
LICENSE
LIC_FILES_CHKSUM
SRC_URI
SRCREV
S
PV
PR
  1. What is SRC_URI?
  2. What is SRCREV?
  3. What is PV?
  4. What is PR?
  5. What is WORKDIR?
  6. What is S?
  7. What is B?
  8. What is D?
  9. What is DEPLOYDIR?
  10. What is ${bindir}?
  11. What is ${libdir}?
  12. What is ${sysconfdir}?
  13. What is ${datadir}?
  14. What is ${includedir}?

PART 17 – Yocto Tasks

  1. What is a BitBake task?
  2. What is do_fetch?
  3. What is do_unpack?
  4. What is do_patch?
  5. What is do_configure?
  6. What is do_compile?
  7. What is do_install?
  8. What is do_package?
  9. What is do_package_write_*?
  10. What is do_rootfs?
  11. What is do_image?
  12. What is do_image_complete?
  13. Explain the complete recipe build flow.
do_fetch
 ↓
do_unpack
 ↓
do_patch
 ↓
do_configure
 ↓
do_compile
 ↓
do_install
 ↓
do_package
 ↓
do_package_write
  1. What is task dependency?
  2. How do you add dependency between tasks?
  3. What is addtask?
  4. What is task ordering?
  5. What is before?
  6. What is after?

PART 18 – Yocto Variables

  1. What is variable expansion?
  2. Difference between:
=
?=
??=
:=
  1. What is immediate expansion?
  2. What is lazy expansion?
  3. Difference:
FOO = "abc"
FOO := "abc"
  1. What is:
${@python-expression}
  1. What is OVERRIDES?
  2. What is override syntax?
  3. Explain:
VAR:${MACHINE}
  1. What is append?
  2. What is prepend?
  3. Difference between:
VAR:append = " abc"
VAR += "abc"
  1. What is DISTRO_FEATURES?
  2. What is MACHINE_FEATURES?
  3. What is IMAGE_FEATURES?
  4. What is EXTRA_IMAGE_FEATURES?
  5. What is PACKAGECONFIG?
  6. What is DEPENDS?
  7. What is RDEPENDS?
  8. What is RRECOMMENDS?
  9. DEPENDS vs RDEPENDS?
  10. RDEPENDS vs RRECOMMENDS?

PART 19 -Yocto Dependencies

  1. What does DEPENDS mean?
  2. What does RDEPENDS mean?
  3. What happens if a library is missing during compilation?
  4. What happens if a runtime library is missing?
  5. Why can a package exist but its dependency still be missing?
  6. What is sysroot in Yocto?
  7. What is recipe-specific sysroot?
  8. What is staging?
  9. Why shouldn’t you manually modify Yocto sysroot?
  10. How does BitBake know where dependencies are?

PART 20 – Yocto Classes

  1. What is a Yocto class?
  2. What is .bbclass?
  3. What is inherit?
  4. What is inherit cmake?
  5. What is inherit meson?
  6. What is inherit autotools?
  7. What is inherit pkgconfig?
  8. What is inherit systemd?
  9. What is inherit module?
  10. What is inherit kernel?
  11. What is inherit externalsrc?
  12. What is inherit cmake doing internally?
  13. When would you use externalsrc?

PART 21 – Yocto Layers

  1. What is a Yocto layer?
  2. Why create a custom layer?
  3. How do you create a layer?
  4. What does bitbake-layers create-layer do?
  5. What is BBLAYERS?
  6. What is BBFILE_COLLECTIONS?
  7. What is BBFILE_PATTERN?
  8. What is BBFILE_PRIORITY?
  9. What is layer priority?
  10. What happens if two layers contain the same recipe?
  11. Which recipe gets selected?
  12. How does .bbappend work across layers?
  13. How do you check available layers?
  14. How do you check recipe providers?
  15. Explain:
bitbake-layers show-layers
bitbake-layers show-recipes
bitbake-layers show-appends

PART 22 – Yocto Image Creation

  1. What is an image recipe?
  2. What is:
IMAGE_INSTALL
  1. What is:
CORE_IMAGE_EXTRA_INSTALL
  1. Difference between IMAGE_INSTALL and CORE_IMAGE_EXTRA_INSTALL?
  2. What is IMAGE_FEATURES?
  3. What is EXTRA_IMAGE_FEATURES?
  4. How do you add an application to an image?
  5. How do you add a package?
  6. How do you remove a package?
  7. How do you add SSH server?
  8. How do you create a custom image?
  9. What is:
inherit core-image
  1. How do you create a minimal image?
  2. How do you create a development image?

PART 23 – Yocto Package Management

  1. What is a package?
  2. What is package manager?
  3. Yocto package formats?
  4. RPM vs DEB vs IPK?
  5. What is PACKAGE_CLASSES?
  6. What is IMAGE_PKGTYPE?
  7. What is package splitting?
  8. Why does one recipe produce multiple packages?
  9. What is:
PN
PN-dev
PN-dbg
PN-staticdev
  1. What is ${PN}?
  2. What is ${PN}-dev?
  3. What is ${PN}-dbg?
  4. What is FILES:${PN}?
  5. What is FILES:${PN}-dev?

PART 24 – Yocto Kernel

  1. How is Linux kernel built in Yocto?
  2. What is linux-yocto?
  3. What is a kernel recipe?
  4. How do you customize the kernel?
  5. How do you add a kernel configuration?
  6. What is kernel fragment?
  7. What is .cfg fragment?
  8. How do you add a kernel patch?
  9. How do you modify Device Tree using Yocto?
  10. How do you add a new DTS file?
  11. How do you configure kernel options?
  12. What is:
KERNEL_DEVICETREE
  1. What is:
KERNEL_FEATURES
  1. How do you verify the kernel configuration?
  2. Where is the built kernel located?

PART 25 – Yocto Device Tree

  1. How do you modify Device Tree in Yocto?
  2. Where do Device Tree sources live?
  3. How do you add custom DTS?
  4. How do you add a Device Tree patch?
  5. How do you enable a peripheral?
  6. How do you disable a peripheral?
  7. How does a Yocto kernel recipe find DTS files?
  8. How do you debug Device Tree compilation?
  9. How do you verify the DTB inside the final image?

PART 26 – Yocto Debugging

  1. BitBake recipe compilation fails. How do you debug?
  2. What is:
bitbake -c clean
  1. What is:
bitbake -c cleansstate
  1. clean vs cleansstate?
  2. What is:
bitbake -c cleanall
  1. cleanall vs cleansstate?
  2. What is:
bitbake -e
  1. How do you find the final value of a variable?
  2. How do you find why a variable has a particular value?
  3. What is:
bitbake -g
  1. How do you inspect dependency graph?
  2. What is:
bitbake -c devshell
  1. What is log.do_compile?
  2. What is run.do_compile?
  3. Where do you find task logs?
  4. How do you debug missing header files?
  5. How do you debug missing libraries?
  6. How do you debug cannot find -lxxx?
  7. How do you debug QA errors?
  8. What is do_package_qa?

PART 27 – Yocto QA Errors

  1. What is Yocto QA?
  2. What is:
installed-vs-shipped
  1. What is:
file-rdeps
  1. What is:
dev-so
  1. What is:
already-stripped
  1. What is:
buildpaths
  1. What is:
compile-host-path
  1. What is:
rpaths
  1. What is:
invalid-pkgconfig
  1. What is:
libdir
  1. What is:
arch
  1. Why shouldn’t QA errors simply be disabled?
  2. When would you use INSANE_SKIP?

PART 28 – Yocto sstate and Downloads

  1. What is sstate?
  2. Why is sstate important?
  3. What is SSTATE_DIR?
  4. What is DL_DIR?
  5. Why does Yocto download source separately?
  6. How does Yocto avoid rebuilding everything?
  7. What is shared state cache?
  8. What causes sstate invalidation?
  9. What is hash equivalence?
  10. What is BitBake signature?
  11. What is task hash?
  12. What happens when a task’s inputs change?

PART 29 — Yocto SDK

  1. What is Yocto SDK?
  2. Why use an SDK?
  3. What is extensible SDK?
  4. Standard SDK vs eSDK?
  5. How do you generate an SDK?
  6. What is:
bitbake <image> -c populate_sdk
  1. What is:
populate_sdk_ext
  1. What is cross-development SDK?
  2. How do you compile an application using Yocto SDK?
  3. What is sysroot inside SDK?

PART 30 – Yocto Multiconfig

  1. What is multiconfig?
  2. Why use multiconfig?
  3. How can you build multiple machines?
  4. How can you build host and target components?
  5. What is:
BBMULTICONFIG
  1. How does dependency work across multiconfigs?

PART 31 – Yocto Reproducibility

  1. What is reproducible build?
  2. Why are reproducible builds important?
  3. What causes non-reproducibility?
  4. How does Yocto support reproducible builds?
  5. What is build timestamp?
  6. What is source timestamp?
  7. How do you investigate differences between two images?

PART 32 – Yocto Licensing

  1. How does Yocto handle licenses?
  2. What is LICENSE?
  3. What is LIC_FILES_CHKSUM?
  4. Why is LIC_FILES_CHKSUM required?
  5. What happens if license checksum changes?
  6. What is INCOMPATIBLE_LICENSE?
  7. How do you exclude GPL packages?
  8. How do you handle commercial packages?

PART 33 – Yocto Security

  1. How do you secure an Embedded Linux image?
  2. How do you enable secure boot?
  3. What is verified boot?
  4. What is measured boot?
  5. Secure boot vs verified boot?
  6. What is TPM?
  7. What is dm-verity?
  8. What is read-only rootfs?
  9. What is signed package?
  10. How do you reduce attack surface?
  11. Why should unnecessary services be removed?
  12. How do you disable root login?
  13. How do you disable password-based SSH?

PART 34 – Yocto OTA

  1. What is OTA update?
  2. How would you implement OTA for Embedded Linux?
  3. What is A/B update?
  4. Why use dual root filesystem?
  5. What happens if update fails?
  6. What is rollback?
  7. What is RAUC?
  8. What is SWUpdate?
  9. What is Mender?
  10. How would you design a reliable OTA system?
  11. How do you prevent bricking during OTA?

PART 35 – Yocto Performance

  1. Why is Yocto build slow?
  2. How do you reduce build time?
  3. How does sstate improve build performance?
  4. How does parallelism work?
  5. What is:
BB_NUMBER_THREADS
  1. What is:
PARALLEL_MAKE
  1. What is network caching?
  2. How do you optimize CI Yocto builds?
  3. What is shared sstate server?
  4. What is source mirror?

PART 36 – Advanced BitBake

  1. What is BitBake’s dependency resolver?
  2. How does BitBake determine task execution order?
  3. What is task signature?
  4. What is task hash?
  5. What is stamp?
  6. What is stamp-based execution?
  7. What is fakeroot?
  8. Why does Yocto use fakeroot/pseudo?
  9. What is pseudo?
  10. Why is do_install executed under fakeroot?
  11. What is BB_TASK_NICE_LEVEL?
  12. What is BB_TASK_IONICE_LEVEL?
  13. What is BB_NO_NETWORK?
  14. What is BB_FETCH_PREMIRRORONLY?
  15. What is PREMIRRORS?
  16. What is MIRRORS?

PART 37 – Yocto Advanced Recipe Questions

  1. How do you write a recipe for a Git project?
  2. How do you specify Git branch?
  3. How do you specify commit?
  4. What is:
SRC_URI = "git://..."
SRCREV = "..."
  1. What is ${AUTOREV}?
  2. Why should AUTOREV generally be avoided in production?
  3. How do you apply a patch?
  4. How do you add multiple patches?
  5. How do you disable a patch?
  6. How do you override recipe variables?
  7. How do you create machine-specific configuration?
  8. How do you create distro-specific configuration?
  9. How do you make a recipe machine-specific?
  10. How do you make a package architecture-independent?

PART 38 – CMake + Yocto

  1. How do you build a CMake project using Yocto?
  2. What is:
inherit cmake
  1. What is EXTRA_OECMAKE?
  2. How does Yocto pass compiler information to CMake?
  3. How do you pass CMake options?
  4. How do you install binaries from CMake?
  5. How do you handle external dependencies?
  6. How do you debug CMake cross-compilation?

PART 39 – Autotools + Yocto

  1. What is Autotools?
  2. What is:
configure
Makefile
automake
autoconf
  1. What is:
inherit autotools
  1. What is EXTRA_OECONF?
  2. What is oe_runconf?
  3. How does Yocto cross-compile Autotools projects?

PART 40 – Real Interview Troubleshooting

These are very high-value interview questions.

Scenario 1

Your application builds successfully on Ubuntu but fails in Yocto. Why?

Possible areas:

  • missing DEPENDS
  • incorrect sysroot
  • missing headers
  • missing pkg-config
  • wrong PACKAGECONFIG
  • host contamination
  • incorrect CMake configuration

Scenario 2

Your recipe compiles but binary is missing from the final image. Why?

Check:

do_install
FILES:${PN}
IMAGE_INSTALL
package split

Scenario 3

cannot find -lpulse

How would you debug?

Scenario 4

Header file exists on your host but Yocto cannot find it.

Why?

Scenario 5

Application works on Ubuntu but crashes on target.

How do you debug?

Scenario 6

Device Tree compiles but driver doesn’t probe.

What do you check?

compatible
status
reg
interrupts
clocks
GPIO
driver match
probe()

Scenario 7

Driver probes but hardware doesn’t work.

How do you debug?

Scenario 8

Kernel boots but root filesystem doesn’t mount.

What do you check?

Scenario 9

Kernel hangs during boot.

How do you debug?

Scenario 10

Yocto rebuilds everything after a small change.

Why?

Scenario 11

Yocto build suddenly becomes very slow.

What do you investigate?

Scenario 12

Image size is 1 GB. How do you reduce it?

Scenario 13

Target has only 128 MB RAM. How would you optimize Linux?

Scenario 14

Application has high CPU usage.

How do you investigate?

Scenario 15

System randomly freezes.

How do you debug?

PART 41 – Expert Embedded Linux Questions

Architecture

  1. Design an Embedded Linux boot architecture for a custom SoC.
  2. Design a production BSP.
  3. How would you structure a Yocto project for multiple products?
  4. How would you maintain multiple hardware revisions?
  5. How would you support multiple SoCs?
  6. How would you maintain multiple kernel versions?
  7. How would you maintain multiple product variants?
  8. How would you design a long-term-maintenance Yocto system?

PART 42 – Expert Yocto Project Architecture

  1. Design a custom Yocto layer architecture.

Example:

meta-company
├── conf
├── classes
├── recipes-core
├── recipes-kernel
├── recipes-bsp
├── recipes-app
├── recipes-multimedia
└── recipes-security
  1. Where should application recipes live?
  2. Where should BSP recipes live?
  3. Where should machine configuration live?
  4. Where should distro configuration live?
  5. How do you prevent vendor-layer modifications from affecting your product layer?
  6. How do you handle vendor BSP upgrades?
  7. How do you maintain custom patches?

PART 43 – Production Yocto

  1. How do you create a production image?
  2. Development image vs production image?
  3. How do you remove debugging tools from production?
  4. How do you disable SSH in production?
  5. How do you enable read-only rootfs?
  6. How do you configure watchdog?
  7. How do you configure system health monitoring?
  8. How do you recover from application crashes?
  9. How do you automatically restart services?
  10. How do you collect crash logs?
  11. How do you implement persistent logs?
  12. How do you reduce boot time?

PART 44 – Embedded Linux Audio + Yocto

Since audio is a common Embedded Linux area, these are particularly useful if your role involves ALSA/PulseAudio.

  1. What is ALSA?
  2. What is PulseAudio?
  3. ALSA vs PulseAudio?
  4. What is PipeWire?
  5. ALSA architecture?
  6. What is PCM?
  7. What is mixer?
  8. What is ALSA device?
  9. What is hardware device?
  10. What is aplay?
  11. What is arecord?
  12. What is amixer?
  13. What is alsactl?
  14. What is speaker-test?
  15. How do you debug audio playback?
  16. What causes sample-rate mismatch?
  17. What causes underrun?
  18. What causes overrun?
  19. What is buffer size?
  20. What is period size?
  21. How do you reduce audio latency?
  22. How would you package ALSA utilities using Yocto?
  23. How would you add PulseAudio to a Yocto image?
  24. How would you debug:
cannot find -lpulse
cannot find -lpulse-simple
  1. How do DEPENDS and RDEPENDS apply to an audio application?

PART 45 – Automotive Embedded Linux

For automotive roles, prepare these too:

  1. What is Automotive Linux?
  2. Embedded Linux vs Automotive Linux?
  3. What is Automotive Grade Linux?
  4. What is Android Automotive?
  5. Embedded Linux vs Android Automotive?
  6. What is QNX?
  7. Linux vs QNX?
  8. What is AUTOSAR?
  9. AUTOSAR Classic vs Adaptive?
  10. Linux vs AUTOSAR Adaptive?
  11. What is CAN?
  12. CAN FD?
  13. What is SOME/IP?
  14. What is DDS?
  15. What is Ethernet AVB?
  16. What is TSN?
  17. What is ECU?
  18. What is IVI?
  19. What is infotainment system?
  20. What is gateway ECU?
  21. What is ADAS?
  22. What is functional safety?
  23. What is ISO 26262?
  24. What is ASIL?
  25. What is cybersecurity in automotive Linux?

PART 46 — Extremely Important “Explain Your Project” Questions

These often matter more than theoretical questions.

Be ready to answer:

  1. Explain your Embedded Linux project.
  2. Explain your Yocto project.
  3. Why did you use Yocto?
  4. Why not build the Linux system manually?
  5. What BSP did you use?
  6. Which machine did you use?
  7. Which Linux kernel version?
  8. Which Yocto release?
  9. Which layers did you use?
  10. Did you create a custom layer?
  11. Did you write recipes?
  12. Did you modify the kernel?
  13. Did you modify Device Tree?
  14. Did you write a driver?
  15. How did you debug the driver?
  16. How did you debug Yocto builds?
  17. How did you reduce build time?
  18. How did you reduce image size?
  19. How did you add an application to the image?
  20. How did you add a systemd service?
  21. How did you configure networking?
  22. How did you configure audio?
  23. How did you debug boot issues?
  24. What was the hardest bug you solved?
  25. What performance optimization did you make?
  26. What was your contribution personally?
  27. What would you improve in the project?

PART 47 – Must-Know Commands

You should be comfortable explaining these without memorizing blindly.

Linux

ps
top
htop
free
df
du
mount
lsblk
fdisk
dmesg
journalctl
systemctl
ip
ss
ping
route
ethtool
tcpdump
strace
lsof
find
grep
awk
sed
cat
less
hexdump
dd
chmod
chown
ln
scp
ssh

Kernel

uname
lsmod
modprobe
insmod
rmmod
modinfo
dmesg
sysctl

Yocto

source oe-init-build-env
bitbake
bitbake-layers
devtool
recipetool
oe-pkgdata-util

Especially:

bitbake -e
bitbake -c clean
bitbake -c cleansstate
bitbake -c devshell
bitbake -c menuconfig
bitbake -c compile
bitbake -c install
bitbake-layers show-layers
bitbake-layers show-recipes
bitbake-layers show-appends

PART 48 – 20 Questions You Absolutely Must Master

If you have limited preparation time, do not skip these:

  1. Explain complete Embedded Linux boot process.
  2. Explain Yocto architecture.
  3. Yocto vs Buildroot.
  4. Yocto vs OpenEmbedded vs Poky vs BitBake.
  5. What is a recipe?
  6. What is a Yocto layer?
  7. .bb vs .bbappend?
  8. DEPENDS vs RDEPENDS?
  9. Explain BitBake task flow.
  10. How do you add an application to a Yocto image?
  11. How do you customize the Linux kernel using Yocto?
  12. How do you modify Device Tree using Yocto?
  13. How do you debug a failed Yocto recipe?
  14. How do you debug cannot find -lxxx?
  15. What is sstate cache?
  16. What is sysroot?
  17. How does Device Tree bind to a driver?
  18. How do you debug a driver that doesn’t probe?
  19. How do you debug a Linux kernel boot failure?
  20. Explain your complete Embedded Linux/Yocto project end-to-end.

Final Interview Preparation Structure

Recommend preparing in this order:

                    EMBEDDED LINUX
                          │
          ┌───────────────┴────────────────┐
          │                                │
       LINUX                           YOCTO
          │                                │
   ┌──────┼───────┐              ┌─────────┼─────────┐
   │      │       │              │         │         │
 Boot   Kernel  System          BitBake   Recipes   Layers
   │      │       │              │         │         │
 UBoot Drivers  IPC             Tasks   Packages   BSP
   │      │       │              │         │         │
 DT   Interrupts Processes      Variables  Image   Machine
   │      │       │              │         │         │
   └──────┼───────┘              └─────────┼─────────┘
          │                                │
          └──────────────┬─────────────────┘
                         │
                    DEBUGGING
                         │
             ┌───────────┼───────────┐
             │           │           │
           GDB         ftrace      strace
             │           │           │
           KGDB        perf       dmesg
                         │
                    PRODUCTION
                         │
              ┌──────────┼──────────┐
              │          │          │
           Security     OTA       Performance

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *