The 7i85S should be usable. But I can't find any firmware files for the 5i25 that bring the extra stepgen pins out to hardware.
(All stepgens have the pins internally, but the 5i25 / 6i25 firmware chooses whether to connect them to the FPGA IO pins or not).
There is the option of editing a *_34 (34 IO pins indicates a DB25 board) VHD file to make a custom firmware based on the existing firmware.
I have not built firmware for the 5i25, but I have done it for the 5i23. I won't pretend it is a simple process but neither is it impossible.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Editing_MESA_Bitfiles
You will also need the Hostmot2 sourcecode. You can download this from the Mesa website (it is, for some reason, a link under "Specifications" for each FPGA card) or from the LinuxCNC GITHub:
github.com/LinuxCNC/hostmot2-firmware
Be aware that the LinuxCNC repository is set up to build bitfiles automatically and uses makefiles. However the Wiki Tutorial is probably the way to go for a one-off special-purpose firmware. The basic firmware source code is the same, however,