mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
machine: read a factory MAC from flash via mac_flash_offset
Adds an optional per-board mac_flash_offset. When non-zero, RTLPlayground reads a 6-byte MAC from that flash address and uses it if it is a valid globally-administered unicast address; otherwise it falls back to the generated locally-administered MAC. Offset 0 (default for every board) preserves current behaviour. Enable it for the SWTGW218AS, whose stock firmware keeps the factory MAC in nvcfg at 0x1FC000. RTLPlayground images and web upgrades only touch flash below that region, so the factory MAC survives flashing.
This commit is contained in: