On the Allnet ALL-SG8208M is it possible to use a flash emulator without desoldering the SPI flash ROM chip? I have access to a DediProg EM100Pro, and wonder if that could be used. (I guess one needs the schematics and the knowledge how to read them to determine that.)
You can use a CH341A programmer with a SOIC8 clamp to manipulate the flash directly? With that you can manipulate most NOR flash chips I believe (my experience ranges from a TL-WR1043ND v2 to a ZyXEL XGS1250-12, so quite a few years between those). The latter is based on a Realtek SoC just like yours.
I don't quite get this insistence on a "flash emulator" - spi nor is cheap and readily available (and not that fragile or prone to being written to death either). In order to use your flash emulator, you will have to desolder the original spi-nor flash anyways, at which point you can just as easily solder on a socket instead or a pin header, which allows you easy removal of the flash as needed. If you want to play it extra safe, don't even touch the original flash (that's a little paranoid, as long as you have a full backup, but hey a replacement costs around a buck) and exclusively work on a compatible flash chip.
Maybe I'm blind, but I don't see what an emulator would give you in addition. The bootloader side should be covered within relatively few iterations, and once settled, serial console access and tftpboot from u-boot would be your 'normal' mode of operations, leaving direct spi-nor access for disastrous recovery (it will happen, but not daily, rarely enough for a socketed flash to be more than good enough).
Does somebody have the schematics? icon from #email@example.com wrote, that I need to find out if the chip has a /HOLD pin, so it can be overridden. Also, that pin needs a weak pull-up on the board. If it has a strong pull-up or is directly connected to VCC, it cannot be overridden.
Based on the gs1900-8 (identical hardware, but slightly different bootloader/ flash partitioning), even recovery via (pre-populated) serial console should be easy:
meaning, as long as you don't clobber the bootloader (that is possible, but almost requires intent to do so), this hardware should be close to unbrickable - and even if the worst would happen (overwritten bootloader), you'd rather look at re-flashing the existing spi-nor flash chip (via the aforementioned soic-8 clamp/ ch-341, ideally in-place, at worst externally -once- after desoldering the chip), rather than doing anything complicated with a flash emulator.
So I really don't get why you want to make life complicated for yourself, given that you can (apparently) just flash OpenWrt from the OEM webinterface or recover via serial console.
I can perfectly well understand (and I've done so myself plenty of times) using virtual NOR and NAND under Linux to inspect and/or modify image-dumps or for making new, flashable images, but I've never heard of anyone wanting to emulate such in hardware and connect the emulator to a physical device. Seems....kind of pointless to me.
What do people even use for this? Using an RP2040 or one of the billion STM32 MCUs as the emulator comes to mind, but do premade solutions exist?
EDIT: Oops, didn't notice that link to Dediprog at first. Never seen such before.