Working on installing OpenWRT on Comfast CF-E130N V2 hardware.
Checking system specifications, it looks quite similar to its E110N and E120N predecessors in what it's stuffed with - so I tried using some other COMFAST images. However, the recovery mode TFTP client struggles to apply the bin. Downloads, then reboots, then downloads again.
What does this mean, and what can I do to help it?
That images for embedded devices can't be "freely swapped" among hardware the same way that a "PC" image runs on virtually all current PC hardware. Each image is carefully crafted to not only the chips, but how they are wired up and, very importantly, how the bits on the flash are interpreted.
By flashing the wrong image, it is possible that you've overwritten information critical to the device's operation, information that is specific to the board in your hands, and is not recoverable.
Hmm. I see. Looking at the existing commits, seems like most of the things being added for similar devices is support for GPIO things like LEDs and something related to partitions. Assuming frying some LEDs is not something I'm much afraid of at the first stages, the memory layout (&spi) is the one I'm looking for to get this at least semi-working?
Flash layout is pretty critical. If you've got root access to the device (after re-flashing the OEM firmware), I'd backup each of the MTD partitions to a safe place now. The output of
dmesg
cat /proc/mtd
should show you the layout.
The output of
cat /proc/cmdline
will also be helpful.
Running initramfs images loaded through U-Boot is a good way to test out things until you're pretty certain you're almost done and ready to deal with flashing and sysupgrade.
Progress insofar - wired the serial port up, trying to compile an initramfs image (or at least I think. I've checked the ramdisk option.) No OEM firmware yet, still waiting for the company to get back on that. Are there any ready initramfs kernel bins for ar71xx in the downloads, in the meantime? Compilation's taking a while, and it'd be nice to have a guaranteed good binary instead of whatever I've configured.
What's a good way to bootstrap a system, any system, on? I've looked through Metasploit, the OEM firmware doesn't seem to have any vulns one could use to gain shell access. Does serial tend to just work as-is?
P.S.: Props for your patience. I'm probably asking questions answered dozens of times already, thanks for helping out!
Usually, serial works once you find it. It takes effort to disable serial in software, so that is seldom done. Some manufacturers leave off a jumper or pull-up/down, sometimes providing output but no input.
We've got the bootloader working. Some kind of OpenWRT does boot - but we cannot get it out of serial failsafe mode. Thinking of reflashing it with a factory OpenWRT image (as opposed to sysupgrade).
Putting the system data gathered into a local git clone, managed to build a prototype squashfs-sysupgrade bin for the device. Leds won't work probably, but the memory addressing seems correct.
Now, how do we build the squashfs-factory bin to flash it again (and hopefully get it out of recovery)?
Best way to get into most comfast devices is to edit the passwd/shadow file. Easiest way is to download the config backup from the OEM firmware web interface. Rename the file to .tar.gz edit file(s) and re-upload. I think this was documented somewhere in another comfast wiki page....
Hey! Glad to hear interest in the project is still ongoing. There's a support patch in review back on the openwrt-devel mailing list. Once it gets approved, CF-E130N will officially become an OpenWRT-compatible device.
hey @ Odickins, I flashed my comfast CF-E130N V2 but now its not working anymore. I used this image: openwrt-ath79-generic-comfast_cf-e130n-v2-squashfs-sysupgrade.bin
Do you know how do I fixed this? Or is the comfast bricked already? thanks.