Skip to content
Academia.
ELEmbedded LinuxT550077101 · Fall 2026
CourseFall 2026

Friday · 12:00–16:00 · Odense U174

Embedded Linux Platforms, Raspberry Pi, Services, and Automation

Lecture 02: This lecture introduces embedded Linux platforms with a focus on Raspberry Pi, boot architecture, device trees, storage and power-loss risks, provisioning, secure remote administration, systemd services, configuration, secrets, state, logs, time, scheduling, deployment, updates, health, watchdogs, recovery, and managed service operation. The lecture emphasizes reproducible configuration, least privilege, durable state, observable services, and recoverable deployment.

Learning objectives

✓By the end of this module, students should be able to:
✓• decide when an embedded Linux computer, microcontroller, or hybrid architecture is appropriate;
✓• identify the major components and interfaces of a Raspberry Pi-class platform;
✓• explain the boot chain, device tree, storage layout, and consequences of sudden power loss;
✓• provision a target securely and administer it using SSH key-based host verification;
✓• deploy an application under a dedicated identity and supervised systemd service, with evidence;
✓• separate application code, configuration, secrets, mutable state, and logs;
✓• design installation, update, rollback, time synchronization, health checking, and recovery;
✓• apply least privilege and bounded resource usage; and
✓• collect convincing evidence that a deployed executable or service survives realistic faults.
Block 112:00–12:50concept

Block 1 · 12:00–12:50 · Architecture

CHAPTER 2

Embedded Linux Platforms, Raspberry
Pi, Services, and Automation

Learning objectives
By the end of this module, students should be able to:
  • decide when an embedded Linux computer, microcontroller, or hybrid architecture is appropriate;
  • identify the major components and interfaces of a Raspberry Pi-class platform;
  • explain the boot chain, device tree, storage layout, and consequences of sudden power loss;
  • provision a target securely and administer it using SSH keys and host verification;
  • deploy an application under a dedicated identity and supervise it with systemd;
  • separate application code, configuration, secrets, mutable state, and logs;
  • design installation, update, rollback, time synchronization, health checking, and recovery; and
  • collect convincing evidence that a deployed embedded service survives realistic faults.
The central engineering question
The question is not simply, “Can this program run on a Raspberry Pi?” Many applications can, provided their architecture, operating-system interfaces, and dependencies are compatible. The engineering question is: “Can this system boot, communicate, perform useful work, protect its data, recover from expected faults, and be maintained throughout its intended life?” This module treats the Raspberry Pi as a complete managed computer rather than a development board running an accidental collection of scripts.

2.1  What Makes a Computer an Embedded Linux Platform?

An embedded system is a computing system integrated into a larger product or process and designed for a defined function. The adjective embedded describes purpose and constraints, not physical size. An industrial gateway inside a greenhouse, a vision computer on a mobile robot, and a building controller may all be embedded Linux systems.

An embedded Linux platform normally combines a system-on-chip, volatile memory, nonvolatile storage, power regulation, clocks, and communication and I/O interfaces. Linux is selected when the application benefits from process isolation, virtual memory, mature networking, file systems, security mechanisms, remote administration, rich libraries, and rapid software development.

Linux does not remove resource constraints. CPU load, RAM, storage endurance, startup time, thermal behavior, energy consumption, and network availability remain finite. General-purpose Linux also does not automatically provide hard real-time guarantees.

Embedded Linux single-board computer GPIO / peripheral signals SoC CPU + GPU RAM Display Camera USB Ethernet Power Power input Storage microSD / flash Functional layout; connector positions depend on the board.
Figure 2.1.  Conceptual hardware resources and external interfaces of a Raspberry Pi-class embedded Linux computer. Connector positions and available interfaces vary by model.

2.2  Selecting Between Linux, a Microcontroller, and a Hybrid Design

A microcontroller normally executes firmware directly or under a small real-time operating system. It offers fast startup, low power, direct peripheral access, and more predictable timing. An embedded Linux computer offers much greater software capability at the cost of complexity, boot time, power, and a larger failure and security surface.
Criterion Linux single-board
computer
Microcontroller
Execution modelProtected processes, threads, services, virtual memoryFirmware loop, interrupts, or RTOS tasks
TimingGeneral-purpose scheduling; real-time improvements are possible but require designOften suitable for deterministic sampling and control
StartupCommonly secondsCommonly milliseconds
PowerModerate to high, with meaningful idle consumptionVery low to moderate; deep sleep often available
StorageFile systems and large removable or soldered storageInternal flash and limited external storage
NetworkingMature TCP/IP, TLS, VPN, web, database, and messaging softwareLightweight stacks with tighter memory limits
DevelopmentCompilers, interpreters, packages, containers, remote toolsCross-compilation, flashing, debugging, hardware-focused libraries
Failure scopeIndividual processes can be isolated and restartedA firmware fault may stop the complete node
Typical roleGateway, UI, vision, analytics, storage, orchestrationSampling, motor control, watchdogs, low-power sensing
Many professional systems use a hybrid architecture: a microcontroller maintains time-critical sensing, actuation, watchdog, or emergency behavior, while Linux provides networking, storage, user interfaces, high-level planning, and updates. The interface between them must define framing, units, ranges, timeouts, sequence numbers, and safe behavior when communication disappears. A microcontroller does not become a safety controller merely by being separate from Linux; the hardware, firmware, diagnostics, and independence of any safety function must be justified for the application.
A practical selection method
Begin with requirements, not a favorite board. Quantify sampling rate, worst-case response time, boot deadline, energy budget, interfaces, environmental range, local storage, computational load, communication, update strategy, expected service life, and unit volume. Then select the least complex architecture that satisfies those requirements with adequate margin.

2.3  Raspberry Pi as a Teaching and Prototyping Platform

The Raspberry Pi family is useful because it combines an ARM-based processor, Linux support, removable or onboard storage, USB, Ethernet or wireless networking, display and camera interfaces, and a GPIO header. Exact features and electrical limits depend on the model and revision; students must consult the official documentation for the board actually used [20].

Important design concerns include:

  • Power quality: undervoltage can produce resets, throttling, peripheral failure, or storage corruption.
  • Logic levels: GPIO is not tolerant of arbitrary industrial or 5 V signals; use proper level shifting, isolation, and drivers.
  • Thermal conditions: sustained CPU load may reduce performance unless heat is removed.
  • Storage: consumer microSD cards have finite write endurance and uncertain power-loss behavior.
  • Mechanical integration: exposed connectors and boards need strain relief, enclosure, airflow, and environmental protection.
  • Lifecycle: prototypes may depend on products or software releases that are unsuitable for long-term deployment.
Engineering caution
The GPIO header is a logic interface, not a power actuator interface. Never connect a motor, relay coil, solenoid, high-current lamp, industrial voltage, or unknown sensor output directly to a GPIO pin. Use a suitable driver, flyback protection, shared reference or galvanic isolation as required, and verify the electrical specification before wiring.
Block 213:00–13:50content

Block 2 · 13:00–13:50 · Files and permissions

2.4  The Boot Chain and the Device Tree

A simplified boot sequence is:

  1. processor-internal boot code selects a boot source;
  2. platform firmware initializes essential hardware;
  3. firmware or a bootloader loads the kernel, device tree, and optional initial RAM file system;
  4. the kernel initializes memory, scheduling, drivers, and file systems;
  5. the root file system becomes available;
  6. the kernel starts process ID 1, commonly systemd; and
  7. dependencies, services, login facilities, and the application are started.
Processor boot ROM Firmware or bootloader Kernel + device tree optional initial RAM file system Root file system + process ID 1 Services, networking and application Earlier stages prepare the next stage Conceptual sequence; board models and firmware differ.
Figure 2.2.  Conceptual embedded Linux boot chain. The exact Raspberry Pi sequence varies by model and firmware generation.
Unlike USB, many board-level devices cannot announce themselves dynamically. The device tree describes hardware topology to the kernel: compatible device, bus address, interrupt, clock, GPIO assignment, and enabled state. A device-tree overlay modifies part of this description for a board configuration. The device tree does not normally contain application logic; it allows an appropriate driver to bind to described hardware.
Boot diagnosis should establish the failed stage. A missing boot display, kernel panic, unavailable root file system, failed service, and broken application are different failures. Useful evidence includes firmware indicators, serial console output, dmesg, journalctl -b, systemd-analyze, and systemctl --failed.

2.5  Storage, File Systems, and Power-Loss Risk

Embedded storage experiences repeated logs, database updates, package operations, temporary files, and application state changes. Flash storage wears at erase-block level and depends on a controller for wear leveling. A reported file write may still reside in caches. Sudden power removal can therefore lose recent data or leave application and file-system state inconsistent.

Common mitigations include:

  • a regulated supply with adequate transient current and undervoltage monitoring;
  • controlled shutdown and sufficient hold-up energy where required;
  • industrial or high-endurance storage selected for the write workload;
  • a read-only root file system with a writable data area or overlay;
  • journaling, though journaling does not guarantee application-level transaction correctness;
  • bounded logging and rotation rather than uncontrolled file growth;
  • atomic visibility: write and validate a temporary file on the destination file system, then rename it;
  • application transactions, checksums, sequence numbers, and recovery tests; and
  • separation of replaceable software, configuration, durable data, and disposable cache.

For durable file replacement on Linux, flush application buffers, synchronize the temporary file with fsync(), rename it on the same file system, and synchronize the containing directory. Check and handle errors at each step; atomic name replacement alone does not make data durable [6]. The sync command synchronizes buffered file-system writes, but cannot repair an inadequate power architecture or guarantee behavior of every storage controller. Reliability claims must be established through repeated fault testing, not assumed from the file-system name.

2.6  Provisioning and Establishing a Known Baseline

Provisioning converts a generic operating-system image into an identifiable, secure, and maintainable node. Record the image source and checksum, distribution release, architecture, hostname, account policy, network configuration, enabled services, package changes, application revision, and recovery method.

An initial checklist should include:

  1. verify image authenticity and write it using a trusted tool;
  2. boot with a known power supply and inspect undervoltage or thermal warnings;
  3. change default credentials and remove unused accounts;
  4. set a unique hostname and document how the address is assigned;
  5. update deliberately and record the resulting software versions;
  6. enable only required interfaces and services;
  7. configure time synchronization and timezone policy;
  8. establish key-based administrative access;
  9. create the application identity and directories; and
  10. capture a baseline before deploying project software.

Fleet devices require unique identity. Cloning an image can accidentally clone host keys, machine identifiers, credentials, and static addresses. A reusable image should generate or inject unique material during first boot or controlled enrollment.

2.7  SSH and Secure Remote Administration

SSH provides an encrypted channel for login, command execution, and file transfer. In public-key authentication, the client proves possession of a private key; the server stores the corresponding public key. The private key must remain protected. A passphrase reduces harm if the key file is stolen.

The server also proves its identity using a host key [18]. On first connection, the client has no automatic proof that the displayed fingerprint belongs to the intended node. Verify the fingerprint through a trusted channel. Blindly accepting changed host keys defeats protection against impersonation and may conceal that a device was reinstalled.

Listing 2.1. Key-based remote administration
 1ssh-keygen -t ed25519 -C "eml-laptop"
 2ssh-copy-id student@eml-node.local
 3ssh student@eml-node.local
 4
 5# Inspect the server from an authorized account
 6sudo systemctl status ssh
 7sudo sshd -t
 8ss -lntp
 9journalctl -u ssh --since today

Harden remote access according to risk: restrict network exposure, prefer keys, disable unused accounts and authentication methods, apply least privilege, protect keys, keep software supported, and preserve auditable logs. Do not disable host-key checking merely to make automation convenient. Use managed known-host data instead.

Useful transfer methods include scp, sftp, and rsync over SSH. For repeatable deployment, verify the destination, preserve an application release identifier, and avoid overwriting the only known-good release.

2.8  Applications, Processes, Daemons, and Services

A process is a running program. A daemon is a long-lived background process. A service is the useful function managed as an operational unit. Starting an application with python app.py & does not provide robust startup ordering, identity control, logging, restart limits, or boot integration.

systemd organizes work into units. A service unit declares how a process is started, under which identity, with which dependencies and restart policy. Unit files are configuration, so keep them in version control and validate them.

Listing 2.2. A supervised acquisition service
 1[Unit]
 2Description=EML environmental acquisition service
 3After=local-fs.target
 4StartLimitIntervalSec=120s
 5StartLimitBurst=5
 6
 7[Service]
 8Type=simple
 9User=eml-sensor
10Group=eml-sensor
11WorkingDirectory=/opt/eml/current
12EnvironmentFile=/etc/eml-sensor/environment
13ExecStart=/opt/eml/current/bin/acquire
14Restart=on-failure
15RestartSec=5s
16TimeoutStopSec=20s
17UMask=0027
18NoNewPrivileges=true
19PrivateTmp=true
20ProtectSystem=strict
21ProtectHome=true
22StateDirectory=eml-sensor
23StateDirectoryMode=0750
24LogsDirectory=eml-sensor
25LogsDirectoryMode=0750
26
27[Install]
28WantedBy=multi-user.target
The unit runs under a dedicated account and creates appropriately owned state and log directories. These directories remain writable with ProtectSystem=strict; the executable release and configuration remain protected. Create the account, install the foreground executable, and supply the required environment file before starting the service. Store credentials through a restricted file or systemd credentials rather than treating environment variables as a secret store. Add only the device groups required by the actual sensor interface. Unit start-rate limits belong in [Unit], while process and directory settings belong in [Service] [13].
Offline acquisition does not require a network-startup dependency. If a program must wait for initial network configuration, it usually needs both Wants=network-online.target and After=network-online.target, together with the appropriate wait-online service. Ordering alone does not activate the target. None of these settings guarantees that a remote server is reachable or that connectivity persists [14].
Listing 2.3. Installing and inspecting the service
 1sudo systemd-analyze verify /etc/systemd/system/eml-sensor.service
 2sudo systemctl daemon-reload
 3sudo systemctl enable --now eml-sensor.service
 4systemctl status eml-sensor.service
 5journalctl -u eml-sensor.service -f
 6systemctl show eml-sensor.service -p ActiveState -p SubState -p NRestarts
enable configures boot-time dependency links; start changes current runtime state. They are not synonyms. After editing a unit file, use daemon-reload; restarting only the process does not make systemd reread changed unit metadata.
Block 314:00–14:50content

Block 3 · 14:00–14:50 · Processes and services

2.9  Configuration, Secrets, State, and Logs

A maintainable application separates six concerns:

Concern Example location Design expectation
Executable release /opt/eml/releases/REVISION Versioned, replaceable, normally not writable by service
Configuration /etc/eml-sensor/ Validated, reviewed, protected from accidental change
Secrets Restricted file or secret manager Minimum access; never embedded in source or logs
Durable state /var/lib/eml-sensor/ Backed up or recoverable; transactional where needed
Logs Journal or /var/log/eml-sensor/ Bounded, timestamped, useful for diagnosis
Runtime state /run/eml-sensor/ Volatile sockets, locks, and process state

Configuration should be checked before the application begins useful work. Reject unknown units, impossible ranges, malformed addresses, missing files, and mutually inconsistent options. A default is safe only if its consequences are understood. Credentials should not appear in command-line arguments because other users or diagnostic tools may expose them.

Logs should communicate events and context rather than produce noise. Include timestamp, severity, component, event, and relevant identifiers. Avoid secrets and unnecessary personal data. Rate-limit repeated errors. Logging every high-rate sensor sample into the system journal may exhaust storage; measurement data and operational logs have different purposes.

2.10  Time, Scheduling, and Data Integrity

Correct time supports certificate validation, event ordering, scheduled work, distributed logs, and incident reconstruction. Linux distinguishes system time from a hardware real-time clock, and wall-clock time from monotonic time. Wall time can jump when corrected; monotonic time is suitable for durations and timeouts.

At boot, a board without a reliable hardware clock may temporarily believe an old date. Applications should represent whether timestamps are synchronized and avoid silently treating uncertain time as valid. Inspect with:

1timedatectl status
2date --iso-8601=seconds
3systemctl status systemd-timesyncd
4journalctl -u systemd-timesyncd --since today

Use a systemd timer or a deliberate scheduler for periodic administrative work. A continuously running acquisition service should usually control its own sampling schedule using monotonic timing rather than repeatedly starting from cron. Prevent overlapping jobs when execution may exceed the interval.

2.11  Deployment, Updates, and Rollback

Manual copying is acceptable for a first experiment but becomes unreliable when several devices or students are involved. A deployment procedure should identify the intended target, verify prerequisites, install a versioned release, validate configuration, restart safely, perform a health check, and preserve a rollback path.

A practical release layout is:

1/opt/eml/releases/2026-09-06-a1b2c3d/
2/opt/eml/releases/2026-09-13-d4e5f6a/
3/opt/eml/current -> /opt/eml/releases/2026-09-13-d4e5f6a/

Replacing the active symbolic link with a prepared link using a same-file-system rename makes the release switch atomic. A remove-then-create sequence leaves a gap and is not an atomic switch. Rollback must preserve a compatible previous executable, configuration, data schema, permissions, and service definition. If an update irreversibly migrates stored data, replacing the executable alone is not a rollback.

Desired-state automation
Automation is strongest when it describes the desired result and can be run repeatedly. “Ensure this directory exists with this owner” is safer than a sequence that assumes a specific initial state. Scripts, configuration-management tools, container definitions, and image-building systems can all support this principle, but only if inputs and versions are controlled.

2.12  Health, Watchdogs, and Recovery

A process may exist while producing no useful result. Liveness asks whether the component is making progress and should remain running. Readiness asks whether it can currently accept useful work. A service can be live but not ready, for example while waiting for a sensor or reconnecting to a broker.

Health evidence can include:

  • timestamp and sequence number of the last valid measurement;
  • ability to open and communicate with the required device;
  • backlog depth and age of the oldest unsent record;
  • available disk space and writable data partition;
  • successful completion of an application self-test; and
  • externally observed output, not only an internal “healthy” flag.

Restart policy must match failure semantics. Restarting after an unexpected software exit is reasonable. Rapidly restarting with invalid configuration can create a loop that fills logs and hides the root cause. Apply backoff and start limits, expose the persistent failure, and define when human intervention is required.

A hardware watchdog can reset a completely unresponsive machine, but a reset is not proof of recovery. The system must return to a safe state, preserve diagnostic evidence, and avoid repeatedly actuating hardware during a reboot loop.

2.13  Guided Laboratory: Deploy a Managed Raspberry Pi Service

Laboratory objective
Provision or identify a Linux target, deploy a small acquisition application as a restricted service, and demonstrate controlled behavior during process, configuration, network, and power-cycle tests. The goal is not merely to make the program run once; it is to create evidence that the deployment is repeatable and recoverable.
Sensor or data source Acquisition service Durable queue systemd supervision Journal and health evidence start / status events Persist work, supervise execution, and keep evidence of failures.
Figure 2.3.  A managed embedded application separates acquisition, durable state, supervision, and operational evidence.
Part A — platform baseline.  Record board model, architecture, distribution, kernel, storage, power or thermal warnings, enabled interfaces, addresses, routes, time state, and failed services. State which facts come from commands and which come from documentation.
Part B — secure access.  Configure SSH key authentication. Record and independently verify the host fingerprint. Demonstrate login without copying the private key to the target. Identify the network boundary from which SSH is reachable.
Part C — application identity.  Create a dedicated non-login service account. Install the executable under /opt/eml, configuration under /etc/eml-sensor, and writable state under /var/lib/eml-sensor. Explain every owner and mode.
Part D — supervision.  Install and verify the systemd unit. Enable and start it, follow its logs, confirm its identity, and record restart count and active state. Demonstrate that it starts after reboot.
Part E — fault tests.  Test at least the following: terminate the process, provide invalid input, remove network connectivity, make the remote endpoint unavailable, fill a bounded test data area, and power-cycle using the laboratory’s approved method. Define the expected safe behavior before each test.
Part F — recovery.  Deploy a second identifiable release, perform a health check, and return to the first release. Confirm which configuration and state were preserved.
Portfolio evidence
Include the platform-selection argument, boot and service architecture, verified SSH approach, directory and permission table, complete unit file, release identifier, configuration validation, health definition, fault-test matrix, selected logs, restart and reboot evidence, and a demonstrated rollback. Explain why each item supports a claim rather than merely showing activity.
Block 415:00–15:50exercise

Block 4 · 15:00–15:50 · Investigation laboratory

2.14  Self-Assessment and Job-Interview Preparation

These questions assess Module 2 and prepare students for embedded Linux, IoT, robotics, DevOps, and systems-engineering interviews. Strong answers state assumptions, compare alternatives, and describe evidence. Attempt the questions before reading the answer key.

Questions

Q1.  Give three requirements that favor embedded Linux and three that favor a microcontroller.

Q2.  Why might a mobile robot use both a Raspberry Pi and a microcontroller?

Q3.  Describe the boot path from power-on to a supervised application.

Q4.  What problem does the device tree solve, and why is it especially important for board-level hardware?

Q5.  Why can sudden power loss corrupt more than the file most recently written?

Q6.  Compare a read-only root file system, journaling, atomic file replacement, and application transactions. What different risks do they address?

Q7.  Explain public-key authentication and SSH host-key verification. Which keys must remain secret?

Q8.  A deployment script disables SSH host-key checking. What risk has been introduced, and what is the better approach?

Q9.  Why should an application service use a dedicated account instead of root?

Q10.  Explain the difference between systemctl start, enable, restart, and daemon-reload.

Q11.  What does After=network-online.target guarantee, and what does it not guarantee?

Q12.  Why might Restart=always be harmful for an application with invalid configuration?

Q13.  Distinguish liveness, readiness, and useful externally observed behavior.

Q14.  Where should executable code, configuration, secrets, durable state, runtime state, and logs normally be kept, and why separate them?

Q15.  Why can incorrect time break TLS and make field diagnosis difficult?

Q16.  Design a rollback method for a service whose new version changes the database schema.

Q17.  A service is reported as active, but no measurements reach the server. Give a disciplined diagnostic plan.

Q18.  Which evidence would convince you that a Raspberry Pi deployment can recover from realistic power and network interruptions?

Answers and discussion

A1.  Linux is favored by complex networking, large libraries, protected processes, storage, remote administration, or high-level applications. A microcontroller is favored by strict timing, very low power, instant startup, simple dedicated control, or tight cost and memory limits. Requirements must be quantified.

A2.  The microcontroller can maintain deterministic sensing, motor control, and watchdog behavior, while the Pi performs vision, planning, storage, networking, UI, and updates. Any claimed safety function or safe shutdown path requires separate engineering justification. The communication failure mode between them must be explicitly safe.

A3.  Processor boot code starts firmware or a bootloader, which loads the kernel and device description. The kernel initializes resources and mounts the root file system, starts PID 1, and systemd activates dependencies and the application service.

A4.  Board-level buses cannot always enumerate attached devices. The device tree tells the kernel which compatible device exists at which bus address and with which interrupt, clock, GPIO, and status, allowing a driver to bind correctly.

A5.  Application data, directory metadata, allocation structures, journals, and controller-internal flash mapping may all have outstanding writes. Cached or reordered writes can leave mutually inconsistent state.

A6.  A read-only root reduces uncontrolled system writes; journaling helps restore file-system metadata consistency; atomic replacement prevents readers from observing partial replacement files but needs synchronization for crash durability; transactions preserve application-level invariants across related data. None alone solves every layer.

A7.  The client proves possession of its private key; the server holds the authorized public key. The server proves identity with its private host key; the client records or verifies the host public-key fingerprint. Both private keys remain secret.

A8.  The client can be tricked into authenticating to an impostor. Maintain verified known-host records, distribute fingerprints through a trusted channel, and handle legitimate device replacement explicitly.

A9.  A dedicated account limits readable files, writable directories, devices, and damage after compromise. Root defeats much of the operating system’s containment. Grant only the specific groups, capabilities, or paths required.

A10.  start launches the current unit; enable configures boot-time activation; restart stops and starts the service; daemon-reload makes systemd reread changed unit definitions. Enabling does not necessarily start immediately.

A11.  It orders startup after the target if that target is activated. It does not pull the target into the startup transaction; use an appropriate dependency such as Wants=network-online.target when needed. The network manager and wait-online configuration define what online means. It does not guarantee DNS, Internet access, a broker, credentials, or permanent connectivity. Applications still need reconnection behavior.

A12.  A permanent configuration fault can cause rapid restart loops, log growth, load, and obscured evidence. Use validation, backoff, start limits, and a visible failed state.

A13.  Liveness means the component is progressing; readiness means it can currently serve useful work; external behavior confirms that the intended result is actually observed. A process can satisfy a weak internal check while output is stale or blocked downstream.

A14.  Code belongs in a protected versioned release, configuration under system policy, secrets under narrower protection, durable state in a writable persistent location, runtime state in volatile /run, and operational logs in the journal or bounded log storage. Separation improves permissions, upgrades, backup, diagnosis, and rollback.

A15.  Certificates are valid only within time intervals, and distributed records require a credible ordering. Bad time can reject secure connections, reorder events, and make causes appear after effects. Record synchronization status and use monotonic time for durations.

A16.  Preserve a compatible database snapshot or design a reversible migration; version both schema and software; stop or quiesce writers; test forward and backward migration; switch releases atomically; health-check; and define the point after which rollback requires data restoration rather than executable replacement.

A17.  Check whether new local measurements exist and are timely; inspect service logs and restart count; verify sensor/device access; inspect queue depth; check address, route, DNS, and time; test transport and TLS; verify endpoint, credentials, and authorization; inspect server receipt; and compare timestamps and identifiers across layers.

A18.  Evidence should include repeated controlled power interruption tests, file-system and application integrity checks, successful automatic boot and service start, bounded data loss defined in advance, offline buffering, reconnection and backlog delivery, restart limits, preserved logs or counters, and successful rollback. One successful reboot is not a reliability demonstration.

Chapter summary
An embedded Linux computer is a managed system, not simply a board that runs code. Good engineering begins with justified platform selection and continues through boot understanding, electrical and storage awareness, secure provisioning, restricted service identities, declarative supervision, structured configuration and logs, credible time, versioned deployment, health evidence, and tested recovery. These practices create the dependable foundation required by later work with sensors, MQTT, LoRaWAN, ROS 2, containers, and distributed edge systems.

Summary

This lecture develops a practical engineering approach to embedded Linux systems using Raspberry Pi-class platforms. Students examine platform selection, boot and device-tree concepts, storage and power-loss risks, secure provisioning, SSH administration, systemd services, configuration and secrets, logging, time and scheduling, deployment, updates, rollback, health checks, watchdogs, recovery, and managed service operation. The emphasis is on secure, reproducible, observable, and recoverable systems.

Course outline

What we will learn

From Linux foundations to physical interfaces, networking, security and a complete embedded system.

Linux foundationsKernel, users, processes and file systems
Command lineShells, scripting and automation
Embedded hardwareBoot, storage and device drivers
Physical I/OGPIO, sensors and actuators
Device busesUART, I²C and SPI
NetworkingTCP/IP, SSH and remote management
Distributed systemsMessage passing and cooperating nodes
Engineering practiceGit, testing, logging and deployment
SecurityLeast privilege, updates and secrets

Teaching method

Short introductions are followed by laboratory activities. Work is normally completed in teams of three. Each team develops an embedded Linux system; the examination portfolio is individual.

Project ideas

Applications you could build

Each project should begin with one reliable end-to-end function.

Automatic Raspberry Pi-based GPS trackerSample examination report available in PDF format
Environmental monitoring stationValidated sensing, local storage and dashboard
Energy monitoring systemMeasure, log and visualize equipment power use
Greenhouse automationClimate sensing, actuation and remote supervision
Field-robot telemetryLocation, operating state, measurements and faults
LoRaWAN sensor networkField nodes, TTN integration and private cloud
Intelligent irrigationSensing, decisions, valves and safe failure handling
Multi-node IoT gatewayProtocol translation, buffering and secure forwarding
ROS 2 communication systemDistributed nodes, QoS and service integration
Edge-AI monitoring systemLocal inference, measured performance and safe fallback

A complete project should demonstrate

NeedA clear user and purpose
Physical interfaceA sensor, actuator or device
Linux integrationPrograms, scripts or services
CommunicationA justified data-exchange method
ReliabilityLogging and failure handling
EvidenceTests, results and reflection

Contractor and client roles

Project groups

Each group develops a project for one client group and evaluates the project received from another contractor group.

Contractor

Heros

ProjectProject 01
Delivers to
Client not assigned
Receives from
Contractor not assigned

Fridays · four 50-minute slots · Odense

Fall 2026 lecture plan

The SDU timetable remains authoritative for dates, times and rooms.

Project progression

Project ideas and proposals begin in Module 1 and evolve throughout the course. Module 10 is the formal integration, architecture and verification review; Modules 11–12 complete implementation, demonstration and individual portfolio evidence.

Lecture 02 · participation

Student questions

Questions remain hidden until the student is called. Model answers are revealed separately.

Instructor classroom view

The roster, answers, attendance and participation records are available only to the authorized primary owner after sign-in.

Instructor sign in

Definitions

Essential course vocabulary

Plain-language definitions for the technical terms used throughout the course.

TermDefinitionExample
ActuatorA device that produces a physical action.Motor, valve, relay or fan
BootThe sequence that starts the hardware, kernel, services and applications.Starting an embedded computer
CLIA text interface that accepts commands.Windows Terminal or a Linux terminal
CommandAn instruction interpreted by a shell.pwd, ls or Get-Location
Device driverSoftware through which the operating system communicates with hardware.GPIO or camera driver
DirectoryA named container for files and other directories./home/student/eml
DistributionA complete operating system built around the Linux kernel.Ubuntu or Debian
Embedded systemA computer integrated into a larger product for a defined purpose.Greenhouse controller
File systemThe structure used to name, store and retrieve files.ext4
GPIOA configurable digital input or output pin.Reading a switch
I²CA two-signal serial bus for peripherals.Environmental sensor
KernelThe privileged core managing memory, processors, devices and processes.Linux kernel
MQTTA lightweight publish/subscribe messaging protocol.Sending sensor data
ProcessA running instance of a program.A data logger
PWMRapid switching used to control average power or a signal duty cycle.Motor speed
RootThe privileged Linux user or the top directory, depending on context.Administrative access
ScriptA file containing commands that automate work.A backup script
SensorA device that converts a physical quantity into data.Temperature sensor
ServiceA background program providing an ongoing function.SSH server
ShellA program that interprets commands and starts programs.Bash or PowerShell
SPIA synchronous bus commonly used for fast peripherals.Display or converter
SSHEncrypted remote command-line access.Managing a Raspberry Pi
TCP/IPThe principal protocol family used across computer networks.Device-to-server communication
UARTAn asynchronous serial interface.Debug console
User spaceThe environment where ordinary programs run outside the kernel.Application software
Version controlA system that records and manages file changes.Git

Official examination information · EKA T550077102

Individual portfolio examination

Form

Portfolio

Individual presentation portfolio submitted at semester end.

Grade

7-point scale

No second examiner.

Weighting

No split published

No separate written-exam or coursework percentages are stated.

Re-examination

Same form

Same form as the ordinary examination.

Team project and individual assessment

The team project creates practical evidence, but each student is assessed individually through the presentation portfolio. Classroom participation points support engagement and do not form part of the official grade.

Document from the beginning

  • Your own decisions and identifiable contribution
  • Commands, code, configuration and version history
  • Tests, results, failures and improvements
  • Reflection on trade-offs and learning

People and course systems

Contacts and official links