Z15j Uspex Cloud 2.3.4 (internal v122) — wave 985: hello bound, CSRF POST-first, tar inspection
===============================================================================================

This package ports the Z15e Uspex Cloud 2.3.2 (internal v120) tree to the
Z15j family. The miner engine, pool manager and cloud agents are the same
binaries proven on Z15j hardware in the field; the conv layer is adapted:

1. 983c hardening: the destructive web endpoints (kill_cgminer.cgi,
   kill_bmminer.cgi, reset_conf.cgi, reboot.cgi, upgrade.cgi,
   upgrade_clear.cgi) now require HTTP POST. A plain GET (scanner sweep,
   link prefetch, CSRF) receives a JSON error. The web UI was switched to
   POST for these actions.

2. Z15j family adaptation: version files (Z15j-Uspex-v122-CLOUD /
   z15j-uspex-cloud-2.3.4), board-profile patcher z15j-board-profile-patch.sh
   (same embedded-constants mechanism, Z15EPB1 marker), fee worker z15jdev,
   cloud model "Uspex Z15j Custom".

3. Compile stamp +985a.

wave 984: SSH (dropbear) is closed by default on every family - the web
UI, the cloud agent and pool management need no SSH. To enable SSH
manually, put NO_START=0 into /config/dropbear - the choice survives
reboots (same contract as Z11). bitmainer_setup.sh and /etc/default/
dropbear now default to NO_START=1.

wave 985: robustness fix pack - the cloud-agent hello handshake is now
bounded (30 tries with NTP re-sync kicks, then the agent continues into
the poll loop instead of spinning forever), set_network_conf.cgi requires
POST + same-origin (legacy curl/wget automation without an Origin header
stops working - same contract as the 983c destructive endpoints; behind a
reverse proxy the Host header must reach the device unrewritten -
fail-closed), uploaded firmware/backup archives are inspected before
unpacking (absolute paths, ".." traversal and symlink members are
rejected), the devfee pool is hidden from get_status_api, the factory
prefill points at the shared .test worker, and the Z15j target-scan range
is 260-360 kSol (default 300).

All earlier fixes of this Uspex line (fan-gate relaxation, immersion and
boot fixes, the devfee/cloud configuration, the honest SD-installer tail
of wave 983.2) remain included and unchanged.

Install (SD, from stock): unpack this archive to the root of a FAT-formatted
SD card, insert into the powered-off miner, power on. The miner boots the
Uspex installer from the SD card (root files) and flashes the Z15j firmware
from the bin/ directory — about 5 minutes; a solid green LED means success.
Then power off, remove the card, power on and enter the pools again. The
stock bootloader in the miner's NAND is NOT touched: the installer writes
only the Uspex kernel slot (mtd0 @ 0x2000000) and the Uspex ramdisks
(mtd1/mtd4).

Install (WEB upgrade, from an existing Uspex firmware): use the web package
from the download page; settings are kept.

Installer update (18.11.2026) - SD installer v4.1:
- read-back verification: every written region (mtd1, mtd4 - warn,
  kernel slot - fatal) is read back from NAND and md5-compared before
  success is declared; a silent write failure stops with the red LED;
  nanddump is pinned to --omitoob --bb=padbad (no OOB interleave);
- best-effort SD unmount at the end: a busy SD card no longer shows a
  false "FAILED" state after a successful write.
