Update eMMC provisioning guide and scripts for reTerminal DM4 to remove auto-flash feature. Users must now manually choose Backup or Deploy in the dashboard after connecting the device. Adjusted documentation and trigger scripts accordingly.

This commit is contained in:
nearxos
2026-02-18 12:29:22 +02:00
parent 21fc0e8fd2
commit 864e082046
4 changed files with 22 additions and 19 deletions

View File

@@ -1,8 +1,10 @@
# When reTerminal (CM4) is connected in USB boot mode (eMMC disable jumper),
# Raspberry Pi Foundation USB device appears (vendor 2b8e). Trigger auto-flash.
# Raspberry Pi Foundation USB device appears (vendor 2b8e). Trigger provisioning:
# run rpiboot to expose eMMC, then wait for user to choose Backup or Deploy in the portal.
# No auto-flash — action runs only after portal choice.
# Install: sudo cp 90-cm4-boot-mode.rules /etc/udev/rules.d/
# sudo udevadm control --reload-rules
# The trigger script starts the actual flash via systemd so udev does not block.
# The trigger script starts the provisioning script via systemd so udev does not block.
SUBSYSTEM=="usb", ATTR{idVendor}=="2b8e", ACTION=="add", \
RUN+="/usr/local/bin/cm4-flash-trigger.sh"

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Called by udev when CM4 in boot mode is connected. Starts the flash job in the background
# so udev can return immediately. Install to /usr/local/bin/cm4-flash-trigger.sh
# Called by udev when CM4 in boot mode is connected. Starts the provisioning script in the
# background (rpiboot + wait for portal Backup/Deploy choice). Install to /usr/local/bin/cm4-flash-trigger.sh
FLASH_SCRIPT="${CM4_FLASH_SCRIPT:-/opt/cm4-provisioning/flash-emmc-on-connect.sh}"
exec systemd-run --no-block --unit=cm4-flash-once "$FLASH_SCRIPT"

View File

@@ -1,7 +1,8 @@
#!/usr/bin/env bash
# Auto-flash CM4 eMMC when reTerminal is connected in boot mode (eMMC disable jumper).
# Run this from udev or a systemd service when Raspberry Pi USB boot device (2b8e) is detected.
# Requires: usbboot (rpiboot) built, golden image at GOLDEN_IMAGE path.
# Provision CM4 eMMC when reTerminal is connected in boot mode (eMMC disable jumper).
# On USB boot device (2b8e) detection: run rpiboot to expose eMMC, then wait for the user
# to choose Backup or Deploy in the portal — no auto-flash; action runs only after portal choice.
# Run this from udev or a systemd service. Requires: usbboot (rpiboot) built, golden image for deploy.
set -e