Knowledge Test Score Board
— · 0%
Work through the questions below — your score updates as you go.
Keep going · grade bands mapped to DCU's honours scale
Only your first attempt at each question counts toward this score. Reload the page to reset.
This page contains 12 interactive knowledge checks covering the material in Chapter 2: gateway hardware options and the 40-pin header budget, power brownouts and PoE, embedded Linux distributions and kernel architecture, headless networking (nmcli, serial, and USB gadget mode), the Raspberry Pi EEPROM and U-Boot boot chains, systemd services and timers, least-privilege permissions (udev and Linux capabilities), NAND flash wear and fstab, and gateway timekeeping.
Please remember that some of the quizzes have more than one correct answer , and you must select every correct option to score. The options in each quiz are similar in length, so take your time to evaluate each one.
Good luck.
Derek.
Concept Match
Match the gateway platform or feature to its description derekmolloy.ie Drag each definition into its matching concept slot, then click Submit. Tap × to return a placed card to the pool.
HAT ID EEPROM (pins 27 and 28)
Definition Pool
I²C memory at address 0x50 that the firmware reads at boot to identify a HAT and load its Devicetree overlay.
DIN-rail industrial gateway built around a Compute Module 5, powered from 24 V DC, running a PREEMPT_RT kernel.
Quad-core Cortex-A76 (BCM2712) board whose 40-pin header is driven by the RP1 I/O controller over PCIe.
Board that pairs a Qualcomm QRB2210 processor running Debian with an STM32U585 microcontroller running Zephyr.
Quad-core Cortex-A72 (BCM2711) board whose header peripherals are on the SoC itself, with no battery-backed RTC.
Submit
vcgencmd get_throttled returns throttled=0x50005 on a Raspberry Pi 4. Which of the following statements are correct? derekmolloy.ie
Under-voltage and throttling have both occurred since the board booted.
The supply is below about 4.63 V now, and the CPU is being throttled now.
The soft temperature limit is active, so the board needs better cooling.
The value is normal for a Pi 4 that is powered from a 3 A USB-C supply. Submit Answer
Which of the following statements about powering and wiring a gateway are correct? derekmolloy.ie
PoE power is a common-mode voltage on the pairs, taken from the transformer centre taps.
An 802.3af/at switch detects a 25 kΩ signature before it applies 48 V to the cable.
A 5 V sensor output can drive a GPIO pin directly if the current is kept below 8 mA.
A powered USB hub that back-feeds 5 V can keep the Pi partly powered after unplugging. Submit Answer
Which of the following statements about the Linux kernel and embedded Linux distributions are correct? derekmolloy.ie
A Buildroot image is updated in the field with apt, one package at a time.
sudo rpi-update is the routine way to install tested security updates.
In a microkernel such as QNX, drivers run as separate user-space processes.
Linux drivers run in kernel space and can be loaded at runtime as .ko modules. Submit Answer
A new Raspberry Pi 4 gateway on Raspberry Pi OS (Trixie) will not join the campus Wi-Fi, which uses 802.1X. Which method gives you a login prompt without any working network? derekmolloy.ie
A 3.3 V USB-to-TTL serial adapter on pins 6, 8 and 10 at 115200 8N1
A wpa_supplicant.conf file copied onto the boot partition of the card
SSH to rpi.local from a laptop that is on the campus Wi-Fi network
A port-forwarding rule for TCP port 22 on the campus Wi-Fi router Submit Answer
Which of the following statements about the Raspberry Pi and BeagleBone boot chains are correct? derekmolloy.ie
On the BeagleBone, MLO runs from internal SRAM and sets up the DDR3 memory.
On the Pi 4 and Pi 5, the second-stage bootloader is in an on-board SPI EEPROM.
The Pi firmware reads config.txt and applies overlays before the kernel starts.
The kernel finds I²C and SPI devices by scanning each bus when it boots. Submit Answer
You edit ExecStart= in /etc/systemd/system/sensor-logger.service while the service is running. What do you run so that the service uses the new line? derekmolloy.ie
sudo systemctl daemon-reload, then sudo systemctl restart sensor-logger
sudo systemctl reload sensor-logger, which makes systemd reread the unit
sudo systemctl isolate multi-user.target, which restarts every service
sudo systemctl enable --now sensor-logger, which parses the unit again Submit Answer
Concept Match
Match the permission mechanism to its purpose derekmolloy.ie Drag each definition into its matching concept slot, then click Submit. Tap × to return a placed card to the pool.
Hardware groups (gpio, i2c, spi, dialout)
udev rules (/etc/udev/rules.d/)
AmbientCapabilities= in a unit
Sticky bit (1777 on /tmp)
Definition Pool
Gives a non-root service one named privilege, such as binding to a port below 1024.
Let an unprivileged service account open device nodes such as /dev/i2c-1 without running as root.
The permission bits that are removed whenever a process creates a new file or directory.
Lets any user create files in a shared directory, but not delete files that other users own.
Set the group, the mode or a fixed symlink for a device when the kernel reports an event for it.
Submit
A gateway web server must bind to TCP port 80 and runs as a systemd service with NoNewPrivileges=true. Which of the following statements are correct? derekmolloy.ie
setcap on the binary is enough, because NoNewPrivileges keeps file capabilities.
A setuid-root binary would give an attacker full root if the server had a bug.
AmbientCapabilities=CAP_NET_BIND_SERVICE in the unit gives it that one privilege.
chown root on the binary, with no setuid bit, makes it run with root privileges. Submit Answer
Which of the following statements about storage and flash wear on a gateway are correct? derekmolloy.ie
A hard link is a second name for the same inode, so it survives rm of the first.
An external drive in /etc/fstab should use UUID= and nofail on a headless board.
NAND is programmed in pages and erased in much larger blocks, never in place.
With the overlay file system on, changes are kept in RAM and lost at a reboot. Submit Answer
A Raspberry Pi 4 with no RTC restarts after a week without power, on a site with no internet access. What does its clock read? derekmolloy.ie
About the time that was last saved before the power was lost, a week behind.
The correct time, because systemd-timesyncd estimates the length of the outage.
The correct time, because the SoC keeps counting from a capacitor on the board.
1 January 1970, because the system clock always restarts from the UNIX epoch. Submit Answer
Which of the following statements about the Lab 2 service are correct? derekmolloy.ie
RuntimeDirectory= creates /run/gateway-thermal in RAM, owned by sensorsvc.
The udev rule matches add|change so that the new delay files get the gpio group.
After systemctl stop, Restart=on-failure starts the daemon again at once.
After kill -9, systemd restarts the daemon about three seconds afterwards. Submit Answer