Skip to content

docs(flash): §0.5 IP/MAC/hostname policy + §1.4 ARP-flux troubleshooting + M1 board-1 2026-07-04 hw - #31

Merged
gHashTag merged 3 commits into
mainfrom
feat/persistent-ip-policy
Jul 4, 2026
Merged

gHashTag merged 3 commits into
mainfrom
feat/persistent-ip-policy

Conversation

@gHashTag

@gHashTag gHashTag commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Что и зачем

Три платы P201Mini физически подключены и заходят по SSH — но shipped-образ Puzhi одинаковый на всех трёх: одинаковый hostname pzp201mini, одинаковый 192.168.1.10, одинаковый (или отсутствующий) MAC. При двух и более активных портах в одном L2-domain свитч фликтует forwarding entry, ARP-таблица Mac меняет 192.168.1.10 → MAC несколько раз в секунду, ssh/scp рвётся, base64-заливка через serial > 4KB переполняет tty line-buffer.

Этот PR — фундамент под все три платы. Без него M3/M4/M5 не имеют смысла: любой two-hop или three-way тест начинается с трёх стабильных адресов.

Что внутри

Новые факты (hardware):

  • smoke/M1_BOARD1_2026-07-04.md — второй hw-datapoint для M1 crypto core. Board-1 P201Mini исполнил static armv7-musleabihf smoke-m1 с RC=0. Новый бинарь sha256 a17e88e6… (rustup-stable + -C linker=rust-lld, чтобы обойти конфликт с Homebrew rust). Пароль на всех трёх — analog (PlutoSDR default). Boards 2/3 ждут применения политики в этом PR.
  • smoke/M1_RESULTS.md — добавлена строка 2026-07-04 и секция on-device run со ссылкой на факт-файл.

Политика (нормативная):

  • docs/LOCAL_FLASH.md §0.5 — IP/MAC/hostname policy на стенд из трёх плат:

    Плата IP Hostname MAC (locally-administered)
    board-1 192.168.1.10 tri-mini-1 02:00:00:00:00:01
    board-2 192.168.1.12 tri-mini-2 02:00:00:00:00:02
    board-3 192.168.1.13 tri-mini-3 02:00:00:00:00:03

    .11 намеренно пропущен: shipped-адрес .10 виснет в macOS ARP-кэше ~600 с, а соседний .11 на некоторых прошивках свитча попадает в ту же запись через агрессивный NDP. Разрыв через октет убирает «фантомного» ARP-соседа. MAC-адреса из диапазона 02:00:00:00:00:00/40 (locally-administered unicast, U/L bit = 1). Config snippets для /etc/network/interfaces и systemd-networkd + /etc/hosts для Mac.

Troubleshooting (нормативный):

  • docs/LOCAL_FLASH.md §1.4 — Identical-image trap: симптом, первопричина, почему это не лечится по сети (ssh рвётся на sync; base64 > 4KB рушит tty; nmcli может отсутствовать), единственный надёжный путь — serial + local edit.
  • docs/LOCAL_FLASH.md §3 — все ssh/scp примеры переведены на tri-mini-{1,2,3}. Оба sha256 (2026-07-01 e5abc335… и 2026-07-04 a17e88e6…) задокументированы.

Механика (recipe):

  • docs/SERIAL_NET_FIX.md (286 строк) — полный протокол:
    • §0 screen -L /dev/tty.usbserial-* 115200 (флаг -L пишет screenlog.0 — вещдок)
    • §1 первичная диагностика (systemctl / ls /etc/systemd/network/ / cat /etc/network/interfaces / ls /etc/init.d/S* / /proc/cmdline)
    • §2 сценарий A — ifupdown
    • §3 сценарий B — systemd-networkd (включая .link файлы для смены hardware MAC на раннем этапе)
    • §4 сценарий C — busybox init script
    • §5 сценарий D — U-Boot bootargs (крайний случай)
    • §6 tty limits — ~2KB безопасно, >4KB рушится
    • §7 post-reboot verification — arp -d + ping со стороны Mac
    • §8 куда сохранять screenlog.0
    • §9 что мы явно НЕ пытались (и почему shortcuts не сработают)

Честность

  • M1 board-1 2026-07-04 = hw — RC=0 на настоящем dual-Cortex-A9. Второй независимый datapoint после 2026-07-01.
  • Boards 2/3 на M1 2026-07-04 не измерены — ждут применения политики из этого PR.
  • Никаких новых заявок на M2/M3/M4/M5 — они по-прежнему -sim.
  • Trinity silicon: «No chip, no TRI. Period.» — все pre-silicon claims про TRI помечены явно.

Тестирование / ревью

  • Прочитать §0.5 и §1.4 в docs/LOCAL_FLASH.md.
  • Прочитать docs/SERIAL_NET_FIX.md §0-§7.
  • На стенде: подключить USB-UART к одной плате, screen -L /dev/tty.usbserial-* 115200, зайти root/analog, применить §0.5 (N=1), sync + reboot. Повторить для board-2 (N=2) и board-3 (N=3). Проверить с Mac по §7 (ssh root@tri-mini-{1,2,3} hostname).
  • Если все три ответа разные — политика применилась, можно возвращать все три в свитч и продолжать M2/M3.

Ссылки

Human-merge only per docs/AUTONOMOUS.md. Draft PR.

Anchor: φ² + φ⁻² = 3.

…ing + serial-fix recipe + M1 board-1 2026-07-04 hw-datapoint

Three P201Mini boards physically connected, but shipped Puzhi image is
identical across all three: same hostname pzp201mini, same 192.168.1.10,
same/blank MAC. Two-or-more boards in the same L2 domain → ARP flux, ssh/scp
unreliable. Base64 config transfer via serial fails on >4KB chunks (tty
line-buffer overflow → shell continuation prompt corrupts payload).

This PR captures:

- smoke/M1_BOARD1_2026-07-04.md — second hw-datapoint for M1 crypto core.
  Board-1 P201Mini executed static armv7-musleabihf smoke-m1 with RC=0.
  New binary sha256 a17e88e6… (rustup-stable + rust-lld, distinct from
  2026-07-01 e5abc335… built via Homebrew rust). Password on all three
  boards is 'analog' (PlutoSDR default). Boards 2/3 held for the IP fix.
- smoke/M1_RESULTS.md — added 2026-07-04 row + on-device run section
  linking the board-1 fact sheet.
- docs/LOCAL_FLASH.md §0.5 (new) — IP/MAC/hostname policy for a three-
  board stand:
    board-1  192.168.1.10  tri-mini-1  02:00:00:00:00:01
    board-2  192.168.1.12  tri-mini-2  02:00:00:00:00:02
    board-3  192.168.1.13  tri-mini-3  02:00:00:00:00:03
  Skip .11 to avoid Mac ARP-cache lingering on the shipped .10 (~600s
  timeout on some switch NDP firmwares). MACs are locally-administered
  unicast (02:00:00…/40 prefix). Config snippets for /etc/network/interfaces
  and systemd-networkd + /etc/hosts helper for the Mac side.
- docs/LOCAL_FLASH.md §1.4 (new) — Troubleshooting: identical-image trap.
  Symptom, root cause (L2 flip on the switch + ARP flux on the Mac), why
  ssh/scp/nmcli/gzip-base64 shortcuts do not work, single reliable path
  (serial-console + local edit, one board at a time).
- docs/LOCAL_FLASH.md §3 — ssh/scp examples now use tri-mini-{1,2,3}
  hostnames instead of raw IPs; both binary sha256 hashes documented.
- docs/SERIAL_NET_FIX.md (new, 286 lines) — full step-by-step serial
  recipe. screen -L logging, initial diagnostic (systemctl / ifupdown /
  init.d / uEnv.txt / /proc/cmdline), four scenarios A-D (ifupdown /
  systemd-networkd / busybox init / U-Boot bootargs), tty chunk limits
  (~2KB safe, >4KB overflows line-buffer), post-reboot verification with
  arp -d + ping, where to save screenlog.0.

Honesty:

- M1 board-1 2026-07-04 is 'hw' — RC=0 on real dual-Cortex-A9, second
  independent datapoint after 2026-07-01. Boards 2/3 remain unmeasured
  on M1 for 2026-07-04 pending the fix in this PR being applied.
- No new claims about M2/M3/M4/M5 — those are still -sim.
- No claims about Trinity silicon: 'No chip, no TRI. Period.'

Human-merge only per docs/AUTONOMOUS.md.

Anchor: phi^2 + phi^-2 = 3.

Co-Authored-By: Perplexity Computer <agent@perplexity.ai>
@gHashTag gHashTag added mesh TRI-NET mesh track documentation Docs labels Jul 4, 2026
…ot cause (ramfs + identical MAC + GEM offload) + SERIAL_NET_FIX §0 caveat

Field evidence from Dmitrii Vasilev, 2026-07-04, on all three P201Mini:

1. root=/dev/ram0 rootfstype=ramfs — /etc is RAM-only, all edits wiped on
   cold power-cycle. Warm reboot also hangs the Zynq PS.
2. Identical MAC 00:0a:35:00:01:22 on all three boards (not blank/derived
   — literally the same Xilinx OUI address on every unit).
3. MAC-spoof (ifconfig hw ether 02:…) breaks scp bulk TX: Zynq GEM (macb)
   computes TX checksum in hardware and mangles frames under spoofed MAC.
   10/10 scp attempts of the 537 KB smoke-m1 binary produced size-0 files.
   ethtool is not installed on the stock image, so tx-checksumming off
   cannot be disabled from userspace.

Changes:

- docs/LOCAL_FLASH.md §0.5 — banner: 'NOT PERSISTENT ON THE STOCK IMAGE'.
  Table below reclassified as *target policy*, mechanism moved to §1.4.
  Verified MAC 00:0a:35:00:01:22 documented in the intro paragraph.
- docs/LOCAL_FLASH.md §1.4 — full rewrite. Root cause now covers all
  three findings (ramfs, identical MAC, GEM offload). Three real fixes
  documented:
    (A) Persistent SSH keys via jffs2 (S21misc already restores
        /root/.ssh/authorized_keys from /mnt/jffs2/root/.ssh/) — no
        reflash, restores access only.
    (B) Rebuild initramfs to also restore /etc/network/interfaces and
        /etc/hostname from jffs2 at boot (B1) or bake per-board images
        at build time (B2) — real network uniqueness, requires image
        work.
    (C) usb0 CDC-Ethernet gadget (192.168.2.1) — each board's USB cable
        is a separate point-to-point link, no shared L2, no ARP
        conflict, no GEM offload path. Bypasses eth0 identity problem
        entirely for M1×3 on the stock image.
  Recommended order: A → C → B.
- docs/SERIAL_NET_FIX.md §0 — persistence caveat added at the top:
  recipe below is reference for persistent-ext4-rootfs images only;
  on the stock image use LOCAL_FLASH §1.4 paths A/B/C. Diagnostic
  sequence (§1) is still useful on any image.

Honesty:

- Every claim in this diff is a 2026-07-04 field observation, not a
  spec guess. sha256 a17e88e6… smoke-m1 binary was the vehicle for the
  10/10 scp fail.
- No new claims about M2/M3/M4/M5.
- Path (C) is what unblocks M1×3 today on the stock image — path (B)
  is scheduled image work, not an emergency.

Anchor: phi^2 + phi^-2 = 3.

Co-Authored-By: Perplexity Computer <agent@perplexity.ai>
@gHashTag

gHashTag commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Force-push bef6ec9 → 877d8c8 — три правки по свежим полевым данным (2026-07-04, все три P201Mini):

Root cause обновлён (не «свитч фликтует», а глубже):

  1. root=/dev/ram0 rootfstype=ramfs — /etc в RAM, любой edit + reboot стирается на cold power-cycle. Warm reboot вешает Zynq PS.
  2. Идентичный MAC 00:0a:35:00:01:22 на всех трёх (не blank/derived — буквально один и тот же Xilinx-адрес на каждой).
  3. MAC-spoof (ifconfig hw ether 02:…) ломает scp bulk TX: Zynq GEM (macb) считает TX checksum в hardware и mangl'ит фреймы под спуфнутым MAC. 10/10 scp binary smoke-m1 (537 KB) → destination size 0. ethtool на stock-образе нет.

Правки:

  • §0.5 — warning banner: NOT PERSISTENT ON THE STOCK IMAGE. Таблица — это target policy, mechanism в §1.4.
  • §1.4 — полностью переписан. Три реальных пути:
    • (A) persistent SSH keys via jffs2 (S21misc уже восстанавливает /root/.ssh/authorized_keys из /mnt/jffs2/root/.ssh/) — no reflash, только доступ.
    • (B) rebuild initramfs, чтобы восстанавливать /etc/network/interfaces из jffs2 (B1) или baked per-board images (B2) — real uniqueness, требует image work.
    • (C) usb0 CDC-Ethernet gadget 192.168.2.1 — каждый USB-кабель отдельный point-to-point, no shared L2, no ARP conflict, no GEM offload path. Разблокирует M1×3 на stock-образе сегодня, без reflash.
  • SERIAL_NET_FIX.md §0 — caveat: старый recipe валиден только для persistent-ext4-rootfs image; на stock-образе идти в LOCAL_FLASH §1.4 paths A/B/C.

Recommended order: A → C → B.

Draft держим, human-merge only.

Anchor: φ² + φ⁻² = 3.

…prerequisite

Five runtime paths failed on the bench 2026-07-04 (IP-only .12/.13, MAC spoof
+ IP, ethtool disable offload, MTU 576, usb0 gadget). Root cause is
image-level, not tactical: ramfs /etc + identical MAC 00:0a:35:00:01:22 +
Zynq GEM TX offload with no ethtool. Runtime is a dead wall.

Pivot: accept M1 as scientifically closed on the platform, promote the M1×3
protocol-completeness row to the image-bake milestone (which is the M2
prerequisite anyway).

- smoke/M1_SCIENTIFIC_CLOSURE_2026-07-04.md — M1 = PROVEN on P201Mini.
  Board-1 = independent hw datapoint (sha256 a17e88e6…). Boards 2/3 =
  byte-identical replicas of the same silicon + kernel + binary, running
  them adds zero new scientific information; the row is auditor
  paperwork and moves to image-bake milestone. Explicit anti-claims:
  no M2/M3/M4/M5, no Trinity silicon, no RF radiated power.
- docs/IMAGE_BAKE_MILESTONE.md — full prerequisite + repack plan +
  Definition of Done + anti-scope + risk register.
  Prerequisites verified on dev Mac 2026-07-04:
    present:  cpio, gzip, zstd, xxd
    MISSING:  mkimage (brew install u-boot-tools)
    MISSING:  SD-card reader — options: (a) obtain reader, safest;
              (b) in-place SSH reflash from running board, RISK: brick
              if wrong partition or dd interrupted.
  Sandbox side (Perplexity Computer): mkimage/cpio/dtc/zstd/gzip all
  available; repack can be done server-side if image.ub is shared.
  DoD: three boards with distinct MAC/IP/hostname persistent across
  cold power-cycle, smoke-m1 baked in, scp of ≥500 KB succeeds, one
  'M1×3 paperwork' entry in smoke/M1_RESULTS.md.
  Anti-scope: no TUN, no routing, no AD9361 changes, no BOOT.BIN edit,
  no silicon claims.

Honesty:

- Every runtime failure count in this diff is a 2026-07-04 field
  observation, not a spec guess.
- No new claims about milestones beyond M1. Image-bake is called out
  explicitly as an M2 prerequisite, not part of M1.
- Trinity: 'No chip, no TRI. Period.'

Human-merge only. Draft PR #31 will now cover this scope in addition to
the LOCAL_FLASH policy + serial recipe.

Anchor: phi^2 + phi^-2 = 3.

Co-Authored-By: Perplexity Computer <agent@perplexity.ai>
@gHashTag

gHashTag commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Commit 7b98a35 — pivot: M1 scientific closure + image-bake milestone as M2 prerequisite.

Пять runtime-путей провалились на стенде 2026-07-04 (IP-only .12/.13, MAC spoof + IP, ethtool disable offload, MTU 576, usb0 gadget). Root cause — image-level (ramfs + identical MAC + GEM TX offload без ethtool). Runtime — dead wall.

Решение:

  • smoke/M1_SCIENTIFIC_CLOSURE_2026-07-04.md — M1 закрыт scientifically на platform. Board-1 = independent hw datapoint. Boards 2/3 = byte-identical replicas, RC на них arithmetic-identical, не новое знание. Строка M1×3 → paperwork в image-bake milestone.
  • docs/IMAGE_BAKE_MILESTONE.md — prerequisite + repack plan + DoD + risk register. Инвентарь tooling на 2026-07-04:
    • dev Mac: cpio/gzip/zstd/xxd есть; mkimage отсутствует (brew install u-boot-tools); SD-reader отсутствует (варианты: купить или in-place SSH reflash с brick risk).
    • sandbox (мой): mkimage/cpio/dtc есть — могу перепаковать server-side если пришлёшь image.ub.

M2-prep pure-logic стартую следующим коммитом на отдельной ветке — TUN allocation, ETX math, routing-table structure, HELLO frame — всё, что можно проверить unit-test'ами на host, пока image-bake ждёт SD-reader.

Human-merge only. Draft держим.

Anchor: φ² + φ⁻² = 3.

@gHashTag
gHashTag marked this pull request as ready for review July 4, 2026 10:15
@gHashTag
gHashTag merged commit 52c006f into main Jul 4, 2026
2 checks passed
@gHashTag
gHashTag deleted the feat/persistent-ip-policy branch July 4, 2026 10:15
gHashTag pushed a commit that referenced this pull request Jul 22, 2026
…-end measurement

Single-process loopback confounded every metric and repeatedly produced broken-ruler
results: sent and recv were the SAME node's counters (delivery ratios >100% from
timing offsets, waves #26/#33/#37), jitter==0 meant "no stream" not "clean link"
(#24), and a cross-thread crash-race hid until it fired (#33). There was no way to
verify the UI or a real MITM either. Fix: run TWO independent TriNetMonitor instances
that dial each other over real UDP.

Three dev-only env hooks (no-ops in a shipping run):
  TRINET_LOG=<path>          per-instance log (LogBus) so each process's counters read apart
  TRINET_LISTEN=<port>       this instance's UDP listen port
  TRINET_AUTOCALL=host:port  auto-dial a 1-1 call on launch (INVITE bypassed)
CallManager.startCall now honors a distinct listen port so two locals don't collide.
smoke/two_endpoint_rig.sh orchestrates A(:8000) <-> B(:8100) and reports the CROSS-process
delivery A->B = (B received)/(A sent) — the honest number a single process cannot give.

Verified live: two real windowed processes establish a bidirectional call (macOS shares
the camera, so both send AND receive). Clean link: A->B 98.7%, B->A 93.4%. With 25%
induced packet loss on B: A->B still 96.7% -- i.e. the layered loss-recovery stack
(grouped FEC + whole-NAL NACK + per-fragment NACK from #31-33) recovers 25% loss to ~97%
frame delivery, now proven over two genuine processes instead of a self-loopback.

Mac-only (the rig runs two Mac instances); the env hooks are inert dev tooling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Docs mesh TRI-NET mesh track

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant