mtdflash, OTA updates and the U-Boot SD updater
mtdflash: static, verified MTD writer (per-block skip/erase/write/read-back, validates all images before writing, refuses U-Boot/env without -f). fwupdate + ota.sh flash a running camera over SSH; make-sd-update.sh builds a camupdate.env that the new bootcmd applies from the SD card. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
No files matched your search
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Flash a running camera over SSH: ./ota.sh <camera-ip> parts/rtsp/app.bin [parts/rtsp/dtb.bin ...]
|
||||
# Uploads to /tmp (RAM), then fwupdate verifies + flashes + reboots. Keep file names
|
||||
# starting with app/dtb/kernel/rootfs/config/data so fwupdate knows the partition.
|
||||
set -e
|
||||
[ $# -ge 2 ] || { sed -n '2,4p' "$0"; exit 2; }
|
||||
IP=$1; shift
|
||||
REMOTE=
|
||||
for f in "$@"; do
|
||||
n=$(basename "$f")
|
||||
echo "upload $n ($(wc -c < "$f") bytes)"
|
||||
ssh root@"$IP" "cat > /tmp/$n" < "$f"
|
||||
l=$(md5sum < "$f" | cut -d' ' -f1); r=$(ssh root@"$IP" "md5sum /tmp/$n" | cut -d' ' -f1)
|
||||
[ "$l" = "$r" ] || { echo "md5 mismatch for $n"; exit 1; }
|
||||
REMOTE="$REMOTE /tmp/$n"
|
||||
done
|
||||
ssh root@"$IP" "fwupdate $REMOTE" || true
|
||||
echo "camera is rebooting (if all verified); wait ~40s then ssh back in"
|
||||
Reference in New Issue
Block a user