OpenWrt Forum Archive

Topic: Support of router ZTE-MF10 in OpenWrt Attitude Adjustment (12.09)

The content of this topic has been archived on 2 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

With the help of people of this forum http://foro.seguridadwireless.net/openw … xte-mf10/, i installed OpenWrt 12.09 on my ZTE MF10 router.
The router is based on ramips RT3050F, has 8 MB of flash memory and only 16 MB or RAM (this limited amount of memory explains the choice of OpenWrt 12.09).
The forum mentionned above explains how to install the OpenWrt firmware.
I made a patch to add support to specific GPIO of the router. You can find it here https://github.com/pgid69/openwrt-12.09-zte-mf10.

Gilles

Everything is explained in the very short tutorial i wrote here
http://foro.seguridadwireless.net/openw … #msg335253
You must verify that MTD layout is the following

0x00000000-0x00030000 : "Bootloader"
0x00030000-0x00040000 : "Config"
0x00040000-0x00050000 : "Factory"
0x00050000-0x00140000 : "Kernel"
0x00140000-0x00800000 : "RootFS"

mtd3 partition is named Kernel and mtd4 partition is name RootFS
Flashing mtd3 and mtd4 with OpenWrt firmware is done at step 6 of the tutorial, using mtd_write program

(Last edited by pgid69 on 16 Nov 2016, 20:23)

I don't understand what you want to do.
You made a backup of the mtd3 and mtd4 partitions of a first router, and you want to flash the backup files in the mtd3 and mtd4 partitions of another router ?

I don't know if the instructions can be adapted to Windows.
I have to made some tests and when they're done i will try to help you.
The idea is still the same : transfer busybox with expect program, then use busybox to transfer backup files on the router and then use the command mtd_write to flash mtd3 and mtd4.
Of course you have to be sure that mtd3 and mtd4 partitions are the same size on both router, else you have to concat mtd3 and mtd4 backup files in a single file and split it in two files whose size correspond to mtd3 and mtd4 size of the destination router.

Hi

On windows you must install cygwin with optional packages inetutils and expect.
That way you will have utilities dd, expect and telnet used in the tutorial.
If you want i can send you the 'expect' script (used at step 4 of the tutorial) i generate to send busybox on the router.
And when busybox is on the router you will be able to transfer your files on the router and flash them on the mtd3 and mtd4 partitions.
Once again i warn you about the size of the files, that must match the size of the partitions you intend to write

I prefer that you try by yourself : it will allow you to acquire a bit of practice.
I think that if you follow the tutorial you should succeed.
cygwin is very simple to install : you must install the optional packages inetutils, expect and tftp-server (you can also install another tftp-server than the one provided by cygwin)
The expect script i previously talked about is available here :
https://drive.google.com/open?id=0B9Hzb … VNscUl0ZG8
- Launch the cygwin terminal and decompress the script. I suppose that you put it in "c:\tmp"

gunzip /cygdrive/c/tmp/shell_trx.gz

The script consider the router address is 192.168.0.1. You can change it in the script at line 9, with a simple text editor (i recommend Notepad++ because it does not convert end of line)
- Transfer the file on the router with the following command

expect -b /cygdrive/c/tmp/shell_trx

At the beginning of the script, expect switch to interactive mode to allow you to login. One you are logged in, type the commands

cp /bin/mii_mgr /var/busybox
PS1='zte-mf10 '

(beware of the case and the space character between zte-mf10 and the quote) and type CTRL-C to exit interactive mode.
Wait a few minutes for the transfer to complete.
- Finally verifiy the md5sum : on the router type

cd /var
./busybox md5sum busybox

The result must be

fdb55b8cc45c87c84b5ee5b503866e6b

- Then follow the rest of the tutorial to transfer the files you want to flash on the router with mtd_write.

Note that the previous commands can't harm your router. busybox is written in tmpfs (which is a filesystem in memory) and will be erased as soon as you reboot the router.
The only dangerous commands are the two final mtd_write of the tutorial.
That why i insist that you must check after each file transfer the md5sum and that the flash partitions and the backup files are the same size.

Maybe the two routers don't run the same version of firmware.
Are you sure the backup files are ok ?
If they are, so you should adapt to the size of the partitions.
First check that mtd3 and mtd4 are contiguous and does not overlap
Then you must concat the backup files of mtd3 and mtd4 with command

cat backup_mtd3 backup_mtd4 > backup_mtd3_mtd4

Compute md5sum of the resulting file

md5sum backup_mtd3_mtd4

Then you must split the file to match the mtd3 and mtd4 size of the router you want to flash with command dd

dd if=backup_mtd3_mtd4 of=mtd3 bs=65536 count=20

(20 * 65536 = 1280 Ko)

dd if=backup_mtd3_mtd4 of=mtd4 bs=65536 skip=20

You can check that everything is ok by concatening the two new files and computing once again the md5sum

cat mtd3 mtd4 >mtd3_mtd4
md5sum mtd3_mtd4

If md5sum match the one computed above then you can erase mtd3_mtd4 and flash mtd3 and mtd4 on the router.

The discussion might have continued from here.