Just a message to confirm that the pinouts of the serial port is correct.
I don't solder any wires (because i definitely have no soldering skill, and the contacts on the board are very very close), i just verify with some pins.
As i didn't solder any wires, i had no permanent access to the serial port and i choose another method to transfer OpenWrt firmware on the router.
1 - compile a minimal version of OpenWrt 12.09 for Carambola device. Personnally, I don't include ramzswap, because OpenWrt 12.09 already includes compcache (you just have to enable BUSYBOX_SWAPON first, in order to see and enable compache in submenu utilities)
2 - split the firmware image in two parts with command dd.
dd if=openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin of=/var/local/tftp-root/kernel bs=1310720 count=1
dd if=openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin of=/var/local/tftp-root/rootfs bs=65536 skip=20
The size of the first part correspond to the size of mtd partition Kernel of the router.
You have to check that the size of this MTD partition Kernel is the same on YOUR device (see files /proc/mtd and /proc/partitions) and that the partition RootFS is just after Kernel partition.
To check that the split is ok, make "cat kernel rootfs > image" and compute md5sum on image and openwrt-ramips-rt305x-carambola-squashfs-sysupgrade.bin. Of course the results must be the same
3 - from the sources of OpenWrt 12.09, compile a version of busybox, linked with static libraries and that includes a TFTP client or wget or whatever you like to transfer a file. Includes md5sum too because it's useful to check integrity of file transfer.
4 - transfer busybox with telnet using an
expect script. You can find
here a small program I developped to generate the expect script from busybox binary. Read the README and the example where i explain how to make the file transfered have execution right as there is no chmod on the router.
Transfer is slow and takes a few minutes. When it's done first check the size of busybox and run "./busybox md5sum busybox" to check the transfer is ok.
I recommend to transfer busybox in ramfs (directory /var for example) because it will be used only to transfer the two parts of the firmware.
5 - free the maximum of memory on the router (stop wifi, remove unnecessary kernel modules, stop the maximum of processes, unmount useless mounts) and transfer the two parts of the OpenWrt firmware generated at step 2 (with tftp or wget) in ramfs (directory /var for example). Use md5sum to check the transfers are ok.
6 - Eventually remove the version busybox transferred at step 4 to free some additional memory and write the two parts of the OpenWrt firmware with mtd_write.
mtd_write write /var/kernel Kernel
mtd_write -r write /var/rootfs RootFS
The order is very important : you must overwrite the Kernel partition first and then the RootFS.
Note the flag -r on the second command mtd_write to reboot the router. Do not use the flag on the first command.
That's all : OpenWrt is now installed in the router.
After that i finally i made a small patch to OpenWrt 12.09 to add support to specific GPIOs of the ZTE MF10 : in the patch the two leds PPP and WPS are handled, and also the two buttons ON/OFF and WPS. I don't find the GPIO (if they exist) associated to leds POWER and WLAN. WLAN leds is already driven by Wifi kernel module.
At the start of OpenWrt the two buttons allows to enter failsafe mode.
The patch is
hereIMPORTANT : before following my instructions be sure to understand them all. Ask me if you have some questions.