Artigos‎ > ‎Configuração de Hardware‎ > ‎OpenWrt‎ > ‎

SysUpgrade


Primeiramente gostaria de salientar que não sou o autor principal do conteúdo deste artigo. A minha intenção é de mostrar o que outros autores tem realizado (referenciando links para o conteúdo original) neste blog até como um guia pessoal para uso próprio e ainda compartilhar minhas anotações e pequenas modificações que realizo no conteúdo, desejando que possa ajudar mais alguém em algum lugar.
First and foremost, I take no credit for any of this post’s content. I am really just taking what others have done (which I have links to bellow) and am putting it on my blog for a personal reference and hopefully the small changes that I made to their guides will help someone somewhere.

link: https://wiki.openwrt.org/doc/howto/generic.sysupgrade


To upgrade an openwrt device to trunk execute some commands bellow:

Download image to flash and check integrity
wget http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/openwrt-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin
wget http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/md5sums
md5sum -c md5sums 2> /dev/null | grep openwrt-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin

Transfer to openwrt device
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null openwrt-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null md5sums root@192.168.1.1:/tmp

the scp command above has options to force copy even if rsa key does not match previously key saved from another device

Connect to device
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@192.168.1.1

Check integrity of file transfered:
cd /tmp
md5sum -c md5sums 2> /dev/null | grep openwrt-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin

Use the commands bellow to investigate free memory of device:


cat /proc/meminfo
MemTotal:          61408 kB
MemFree:           38632 kB
MemAvailable:      45196 kB
Buffers:            1944 kB
Cached:            10532 kB
SwapCached:            0 kB
Active:            11156 kB
Inactive:           3168 kB
Active(anon):       5912 kB
Inactive(anon):       44 kB
Active(file):       5244 kB
Inactive(file):     3124 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1868 kB
Mapped:             1868 kB
Shmem:              4108 kB
Slab:               4960 kB
SReclaimable:       1320 kB
SUnreclaim:         3640 kB
KernelStack:         272 kB
PageTables:          248 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       30704 kB
Committed_AS:       8764 kB
VmallocTotal:    1048372 kB
VmallocUsed:         688 kB
VmallocChunk:    1044144 kB

free
                    total         used         free       shared      buffers
Mem:                61408        22788        38620         4108         1944
-/+ buffers:                     20844        40564
Swap:                   0            0            0

df
Filesystem           1K-blocks   Used Available Use% Mounted on
rootfs                 4480       280      4200   6% /
/dev/root              2304      2304         0 100% /rom
tmpfs                 30704      4108     26596  13% /tmp
/dev/mtdblock6         4480       280      4200   6% /overlay
overlayfs:/overlay     4480       280      4200   6% /
tmpfs                   512         0       512   0% /dev

Use this builtin command:
sysupgrade -v /tmp/openwrt-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin

Or you can use mtd:
mtd -r write /tmp/openwrt-ramips-mt7620-wt3020-8M-squashfs-sysupgrade.bin firmware

some commands to check instalation:
opkg update 
opkg list-upgradable








Comments