1.1. Introduction

1.1.1. References

Important

The labs use the Bootlin Embedded Linux training slides as reference material

  • Bootlin slides, chapter: Introduction to Embedded Linux
  • Bootlin slides, chapter: Embedded Linux Development

1.1.2. Hardware for Labs

  • Development board (Raspberry Pi 3, Banana Pi M2+, …)
  • Power supply
  • USB to UART TTL cable
  • Housing for board

1.1.3. Terminology

Host System
Workstation where development and cross compiling is done
Target System
The embedded target

1.1.4. Host Tools and Libraries

  • fdisk: Partitioning tool
  • gcc: GNU C compiler (package build-essential)
  • git: Software version control software
  • kpartx: Tool to create device maps from partition tables
  • libncurses5-dev: Needed to run kconfig for Buildroot
  • minicom: Terminal emulator
  • mkfs: Tool to create a filesystem
  • qemu: Emulation tool
  • ssh: Secure Shell
  • vim: Command line text editor

1.1.5. Conventions & Host Set Up

  • Debian (or any Debian based distribution) works best
  • No GUI environment needed (!)
  • Default shell: bash
  • Directory set up:
Directory Shell variable Description
/home/user/dev/ ${DEV_PATH} main development directory
/home/user/dev/dl ${DL_PATH} downloads directory
/home/user/dev/staging ${STAGING_PATH} target rootfs staging directory
/home/user/dev/linux ${LINUX_PATH} kernel source directory
/home/user/dev/buildroot ${BR_PATH} Buildroot source directory
/home/user/dev/mnt ${MNT_PATH} mountpoints directory

1.1.6. Programming Rules

  • All code produced shall follow the Linux Coding Style [link]
  • All code provided for review shall compile (at least)
  • All code delivered must be uploaded to git repo.

1.1.7. Warnings

Important

  • When removing the SD card from a target, always first power off the target. Otherwise the SD card might get damaged.
  • Disable automounting volumes on the host system. Otherwise formatting the SD card does not work when filesystems of the SD card are mounted.
  • If the target has on board flash (eMMC), make sure it is erased. The only bootable source for the labs should be the SD card.

1.1.8. Not Covered (yet)

  • Building cross-compilation toolchain with crosstool-ng
  • NFS mounting the root filesystem
  • Patching the kernel sources
  • Raw flash filesystems
  • Audio and video subsystems
  • Real time Linux
  • Remote application debugging