26 (edytowany przez arek1194 2019-03-11 20:55:48)

Odp: TL-MR3420 V2 wymiana flash na 16MB

Cezary napisał/a:

A teraz - nie używaj nigdy dd do zapisu tylko mtd w tym przypadku.

Cezary ja naprawdę się na tym nie znam - chciałbym wgrać to zanim wyłącze router (bo znowu nie będzie tego w /tmp) a za niecałą godzinkę do pracy na noc..

(ledwo co się trochę oswoiłem z dd a tu znowu jakieś mtd :-/ )
Czy tak to polecenie ma wyglądać ?
(gdziś coś podobnego znalazłem w sieci tylko zmieniłem nazwę na swoją po /tmp/

mtd -e mtd0 write /tmp/mtdblock0

27

Odp: TL-MR3420 V2 wymiana flash na 16MB

Tak, tego polecenia masz użyć pod warunkiem, że Twój plik to /tmp/mtdblock0

Home: ZyXEL NBG6817 (OpenWrt)
NAS: HP ProLiant MicroServer Gen8 E3-1265L V2, 16 GB (PVE)

28

Odp: TL-MR3420 V2 wymiana flash na 16MB

mtd write /tmp/mtdblock0 u-boot

I reboot jak wszystko poszło dobrze.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

29 (edytowany przez arek1194 2019-03-11 21:08:22)

Odp: TL-MR3420 V2 wymiana flash na 16MB

Gruberek napisał/a:

Tak, tego polecenia masz użyć pod warunkiem, że Twój plik to /tmp/mtdblock0

Cezary napisał/a:

mtd write /tmp/mtdblock0 u-boot

I reboot jak wszystko poszło dobrze.

Czyli w końcu jak ma te polecenie wyglądać?   mój plik w katalogu /tmp to "mtdblock0"

Bo Cezary zdaje się zupełnie iine polecenie wydał ,niż to co ja sugerowałem i Gruberek potwierdził

30

Odp: TL-MR3420 V2 wymiana flash na 16MB

Nie ma różnicy. Oba polecenia zrobią to samo.

Home: ZyXEL NBG6817 (OpenWrt)
NAS: HP ProLiant MicroServer Gen8 E3-1265L V2, 16 GB (PVE)

31

Odp: TL-MR3420 V2 wymiana flash na 16MB

Gruberek napisał/a:

Nie ma różnicy. Oba polecenia zrobią to samo.


 mtd -e mtd0 write /tmp/mtdblock0
Usage: mtd [<options> ...] <command> [<arguments> ...] <device>[:<device>...]

The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
        unlock                  unlock the device
        refresh                 refresh mtd partition
        erase                   erase all data on device
        verify <imagefile>|-    verify <imagefile> (use - for stdin) to device
        write <imagefile>|-     write <imagefile> (use - for stdin) to device
        jffs2write <file>       append <file> to the jffs2 partition on the device
        fixtrx                  fix the checksum in a trx header on first boot
        fixseama                fix the checksum in a seama header on first boot
        fixwrgg                 fix the checksum in a wrgg header on first boot
Following options are available:
        -q                      quiet mode (once: no [w] on writing,
                                           twice: no status messages)
        -n                      write without first erasing the blocks
        -r                      reboot after successful command
        -f                      force write without trx checks
        -e <device>             erase <device> before executing the command
        -d <name>               directory for jffs2write, defaults to "tmp"
        -j <name>               integrate <file> into jffs2 data when writing an image
        -s <number>             skip the first n bytes when appending data to the jffs2 partiton, defaults to "0"
        -p <number>             write beginning at partition offset
        -l <length>             the length of data that we want to dump
        -o offset               offset of the image header in the partition(for fixtrx)
        -c datasize             amount of data to be used for checksum calculation (for fixtrx / fixseama / fixwrg / fixwrgg)
        -F <part>[:<size>[:<entrypoint>]][,<part>...]
                                alter the fis partition table to create new partitions replacing
                                the partitions provided as argument to the write command
                                (only valid together with the write command)

Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards
         mtd -r write linux.trx linux

root@OpenWrt:~# mtd write /tmp/mtdblock0 u-boot
Unlocking u-boot ...

Writing from /tmp/mtdblock0 to u-boot ...

Poszło z tym poleceniem od Cezarego - uff -juz mi się nie chcę :-)   idę na noc jeszcze ..
Ale Wifi Bangla na pierwszy rzut oka.

Dziękuje za pomoc.

32 (edytowany przez Gruberek 2019-03-11 21:24:21)

Odp: TL-MR3420 V2 wymiana flash na 16MB

No tak, myślałem, że telefon mi obciął polecenie, a to Ty zjadleś mtd0 na końcu

mtd -e mtd0 write /tmp/mtdblock0 mtd0

Home: ZyXEL NBG6817 (OpenWrt)
NAS: HP ProLiant MicroServer Gen8 E3-1265L V2, 16 GB (PVE)