OpenWrt Forum Archive

Topic: Nexx WT3020: upgrading flash storage, with pictures

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

Thank you, saturn-b, great work. Works brilliantly. Better than chinese uboot with web-interface(well, because it just works)
Where can i see source code of this? I want to compile this uboot with different settings and for another device.

cave wrote:

Failsafe
if the 192.168.1.1 interface does not respond, the only chances to debrick are serial or tftp firmware uploads. Both need soldering the serial cables ...

That is true. But let's fix the Failsafe mode for this device in OpenWrt. Anyone?

hackru wrote:

Thank you, saturn-b, great work. Works brilliantly. Better than chinese uboot with web-interface(well, because it just works)
Where can i see source code of this? I want to compile this uboot with different settings and for another device.

probono is right , this is CleanWRT uboot source based on Ralink and pepe2k web failsafe.

I just moved starting kernel address from 0x040000 to 0x050000 and fix reset switch gpio to work with NEXX WT3020. Here is the diff :

Index: httpd/vendors/general/art.html
===================================================================
--- httpd/vendors/general/art.html    (revision 4)
+++ httpd/vendors/general/art.html    (working copy)
@@ -19,6 +19,6 @@
                 </ul>
             </div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
 </html>
\ No newline at end of file
Index: httpd/vendors/general/404.html
===================================================================
--- httpd/vendors/general/404.html    (revision 4)
+++ httpd/vendors/general/404.html    (working copy)
@@ -10,6 +10,6 @@
             <h1 class="red">PAGE NOT FOUND</h1>
             <div class="i e">The page you were looking for doesn't exist!</div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
 </html>
\ No newline at end of file
Index: httpd/vendors/general/index.html
===================================================================
--- httpd/vendors/general/index.html    (revision 4)
+++ httpd/vendors/general/index.html    (working copy)
@@ -19,6 +19,6 @@
                 </ul>
             </div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
 </html>
\ No newline at end of file
Index: httpd/vendors/general/uboot.html
===================================================================
--- httpd/vendors/general/uboot.html    (revision 4)
+++ httpd/vendors/general/uboot.html    (working copy)
@@ -20,6 +20,6 @@
                 </ul>
             </div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
 </html>
\ No newline at end of file
Index: httpd/vendors/general/fail.html
===================================================================
--- httpd/vendors/general/fail.html    (revision 4)
+++ httpd/vendors/general/fail.html    (working copy)
@@ -10,6 +10,6 @@
             <h1 class="red">UPDATE FAILED</h1>
             <div class="i e"><strong>Something went wrong during update</strong>Probably you have chosen wrong file (too big or too small) or you were trying to update ART on device with unknown FLASH type (and size) which is not allowed. Please, try again or contact with the author of this modification. You can also get more information during update in U-Boot console.</div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
 </html>
\ No newline at end of file
Index: httpd/vendors/general/flashing.html
===================================================================
--- httpd/vendors/general/flashing.html    (revision 4)
+++ httpd/vendors/general/flashing.html    (working copy)
@@ -12,6 +12,6 @@
             <p>Your file was successfully uploaded! Update is in progress and you should wait for automatic reset of the device.<br>Update time depends on image size and may take up to a few minutes. You can close this page.</p>
             <div id="l"></div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
 </html>
\ No newline at end of file
Index: httpd/vendors/cleanwrt/style.css
===================================================================
--- httpd/vendors/cleanwrt/style.css    (revision 4)
+++ httpd/vendors/cleanwrt/style.css    (working copy)
@@ -1,78 +1,49 @@
 h1,
 p,
 form,
-ul {
+body {
     margin: 0;
     padding: 0;
 }
 
 html,
 body {
-    font: 13px/20px Arial, sans-serif;
-    background: #EDEDED;
+    font: 13px/20px Tahoma, sans-serif;
+    background: #0070BC;
+    color: #FFF;
+    text-align: center;
+    height: 100%;
 }
 
-#m {
-    max-width: 750px;
-    margin: 30px auto 10px;
-    border: solid 1px #BABABA;
+#m, #h {
+    padding: 30px 0;
+}
+
+#h {
     background: #FFF;
-    border-radius: 7px;
-    box-shadow: 0 0 10px #D2D1D1;
 }
 
 #m > * {
     padding: 20px;
 }
 
-h1 {
-    font: bold 50px/50px Tahoma;
-    border-bottom: solid 1px #E8E8E8;
+#f {
+    font-size: 11px;
+    position: absolute;
+    bottom: 0;
+    width: 100%;
+    padding: 15px 0;
 }
 
-a,
-h1 {
-    color: #2450AD;
+a {
+    color: #FEDD12;
     text-decoration: none;
 }
 
-.i {
-    margin: 20px;
-    border-radius: 7px;
-    text-align: justify;
-}
-
-.w {
-    background: #FEFDCE;
-    border: solid 1px #FFC643;
-}
-
-.e {
-    background: #FFE7E7;
-    border:solid 1px #FE7171;
-}
-
-#f {
-    text-align: center;
-    color: #969393;
-}
-
-form,
-p,
 h1 {
-    text-align: center;
+    font: bold 40px/40px Arial;
 }
 
-ul {
-    list-style: square;
-    margin: 0 0 0 20px;
-}
-
 .red {
-    color: #E41616;
+    color: #ED0000;
 }
-
-.i strong {
-    margin: 0 0 5px;
-    display: block;
-}
\ No newline at end of file
Index: httpd/vendors/cleanwrt/404.html
===================================================================
--- httpd/vendors/cleanwrt/404.html    (revision 4)
+++ httpd/vendors/cleanwrt/404.html    (working copy)
@@ -4,12 +4,14 @@
         <meta charset="utf-8">
         <title>Page not found</title>
         <link rel="stylesheet" href="style.css">
+        <link rel="shortcut icon" href="f.png">
     </head>
     <body>
+        <div id="h"><img src="l.png"></div>
         <div id="m">
-            <h1 class="red">PAGE NOT FOUND</h1>
-            <div class="i e">The page you were looking for doesn't exist!</div>
+            <h1 class="red">Page not found</h1>
+            <p>The page you were looking for doesn't exist!<br>Go back to <a href="index.html">firmware update</a> page.</p>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
 </html>
\ No newline at end of file
Index: httpd/vendors/cleanwrt/index.html
===================================================================
--- httpd/vendors/cleanwrt/index.html    (revision 4)
+++ httpd/vendors/cleanwrt/index.html    (working copy)
@@ -4,21 +4,15 @@
         <meta charset="utf-8">
         <title>Firmware update</title>
         <link rel="stylesheet" href="style.css">
+        <link rel="shortcut icon" href="f.png">
     </head>
     <body>
+        <div id="h"><img src="l.png"></div>
         <div id="m">
-            <h1>FIRMWARE UPDATE</h1>
-            <p>You are going to update <strong>firmware</strong> on the device.<br>Please, choose file from your local hard drive and click <strong>Update firmware</strong> button.</p>
+            <h1>Firmware update</h1>
+            <p>You are going to upload new firmware to the device.<br>Choose a proper file from your local hard drive and click <strong>"Update firmware"</strong> button.<br>Please, do not power off the device during update, if everything goes well, the device will restart.<br>Go to <a href="uboot.html">Uboot update</a> page.</p>
             <form method="post" enctype="multipart/form-data"><input type="file" name="firmware"><input type="submit" value="Update firmware"></form>
-            <div class="i w">
-                <strong>WARNINGS</strong>
-                <ul>
-                    <li>do not power off the device during update</li>
-                    <li>if everything goes well, the device will restart</li>
-                    <li>you can upload whatever you want, so be sure that you choose proper firmware image for your device</li>
-                </ul>
-            </div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
-</html>
\ No newline at end of file
+</html>
Index: httpd/vendors/cleanwrt/uboot.html
===================================================================
--- httpd/vendors/cleanwrt/uboot.html    (revision 4)
+++ httpd/vendors/cleanwrt/uboot.html    (working copy)
@@ -17,9 +17,10 @@
                     <li>if everything goes well, the device will restart</li>
                     <li>you can upload whatever you want, so be sure that you choose proper U-Boot image for your device</li>
                     <li>updating U-Boot is a very dangerous operation and may damage your device!</li>
+                    <li>Go back to <a href="index.html">firmware update</a> page.</li>
                 </ul>
             </div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
-</html>
\ No newline at end of file
+</html>
Index: httpd/vendors/cleanwrt/fail.html
===================================================================
--- httpd/vendors/cleanwrt/fail.html    (revision 4)
+++ httpd/vendors/cleanwrt/fail.html    (working copy)
@@ -4,12 +4,14 @@
         <meta charset="utf-8">
         <title>Update failed</title>
         <link rel="stylesheet" href="style.css">
+        <link rel="shortcut icon" href="f.png">
     </head>
     <body>
+        <div id="h"><img src="l.png"></div>
         <div id="m">
-            <h1 class="red">UPDATE FAILED</h1>
-            <div class="i e"><strong>Something went wrong during update</strong>Probably you have chosen wrong file (too big or too small) or you were trying to update ART on device with unknown FLASH type (and size) which is not allowed. Please, try again or contact with the author of this modification. You can also get more information during update in U-Boot console.</div>
+            <h1 class="red">Update failed</h1>
+            <p>Please, try again or contact with the author of this modification.<br>You can also get more information during update in U-Boot console.</p>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
 </html>
\ No newline at end of file
Index: httpd/vendors/cleanwrt/flashing.html
===================================================================
--- httpd/vendors/cleanwrt/flashing.html    (revision 4)
+++ httpd/vendors/cleanwrt/flashing.html    (working copy)
@@ -3,15 +3,16 @@
     <head>
         <meta charset="utf-8">
         <title>Update in progress</title>
-        <style>h1,p,ul{margin:0;padding:0}html,body{font:13px/20px Arial,sans-serif;background:#EDEDED}#m{max-width:750px;margin:30px auto 10px;border:solid 1px #BABABA;background:#FFF;border-radius:7px;box-shadow:0 0 10px #D2D1D1}#m > *{padding:20px}h1{font:bold 50px/50px Tahoma;border-bottom:solid 1px #E8E8E8}a,h1{color:#2450AD;text-decoration:none}.i{margin:20px;border-radius:7px;text-align:justify}.w{background:#FEFDCE;border:solid 1px #FFC643}#f{text-align:center;color:#969393}form,p,h1{text-align:center}ul{list-style:square;margin:0 0 0 20px}.i strong{margin:0 0 5px;display:block}#l{height:30px;width:30px;margin:0 auto 20px;-webkit-animation:r 1s infinite linear;-moz-animation:r 1s infinite linear;-o-animation:r 1s infinite linear;animation:r 1s infinite linear;border-left:7px solid #EAF1FF;border-right:7px solid #EAF1FF;border-bottom:7px solid #EAF1FF;border-top:7px solid #2450AD;border-radius:100%}@-webkit-keyframes r{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(359deg)}}@-moz-keyframes r{from{-moz-transform:rotate(0deg)}to{-moz-transform:rotate(359deg)}}@-o-keyframes r{from{-o-transform:rotate(0deg)}to{-o-transform:rotate(359deg)}}@keyframes r{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}
+        <style>
+            h1,p,body{margin:0;padding:0}html,body{font:13px/20px Tahoma,sans-serif;background:#0070BC;color:#FFF;text-align:center;height:100%}#m{padding:30px 0}#m>*{padding:20px}#f{font-size:11px;position:absolute;bottom:0;width:100%;padding:15px 0}a{color:#FEDD12;text-decoration:none}h1{font:bold 40px/40px Arial}#l{height:30px;width:30px;margin:30px auto;-webkit-animation:r 1s infinite linear;-moz-animation:r 1s infinite linear;-o-animation:r 1s infinite linear;animation:r 1s infinite linear;border-left:5px solid #FEDD12;border-right:5px solid #FEDD12;border-bottom:5px solid #135B72;border-top:5px solid #135B72;border-radius:100%}@-webkit-keyframes r{from{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(359deg)}}@-moz-keyframes r{from{-moz-transform:rotate(0deg)}to{-moz-transform:rotate(359deg)}}@-o-keyframes r{from{-o-transform:rotate(0deg)}to{-o-transform:rotate(359deg)}}@keyframes r{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}
         </style>
     </head>
     <body>
         <div id="m">
-            <h1>UPDATE IN PROGRESS</h1>
+            <h1>Update in progress</h1>
             <p>Your file was successfully uploaded! Update is in progress and you should wait for automatic reset of the device.<br>Update time depends on image size and may take up to a few minutes. You can close this page.</p>
             <div id="l"></div>
         </div>
-        <div id="f">You can find more information about this project on CleanWrt</div>
+        <div id="f">You can find more information about this project on <a href="https://github.com/pepe2k/u-boot_mod" target="_blank">GitHub</a></div>
     </body>
-</html>
\ No newline at end of file
+</html>
Index: include/configs/rt2880.h
===================================================================
--- include/configs/rt2880.h    (revision 4)
+++ include/configs/rt2880.h    (working copy)
@@ -302,7 +302,7 @@
 #define CFG_FACTORY_SIZE    0x10000
 #endif
 */
-#define CFG_BOOTLOADER_SIZE    0x20000
+#define CFG_BOOTLOADER_SIZE    0x30000
 #define CFG_CONFIG_SIZE        0x10000
 #define CFG_FACTORY_SIZE    0x10000
 
Index: include/gpio.h
===================================================================
--- include/gpio.h    (revision 4)
+++ include/gpio.h    (working copy)
@@ -3,9 +3,9 @@
 
 #if defined(MT7620_MP)
 /* LED, Button GPIO# definition */
-#define RST_BTN        12
-#define WPS_BTN        12
-//#define PWR_LED    GND
+#define RST_BTN        1
+#define WPS_BTN        2
+#define PWR_LED        43
 #define WIFI_2G_LED    72
 #define WAN_LED        44
 
Index: common/gpio.c
===================================================================
--- common/gpio.c    (revision 4)
+++ common/gpio.c    (working copy)
@@ -390,17 +390,17 @@
 
 void gpio_init(void)
 {
-    printf( "MT7620 Ai-BR100 gpio init : WPS / RESET pin\n" );
-    mtk7620_set_gpio_dir(WPS_BTN, 1);
+    printf( "NEXX WT-3020 gpio init : WPS / RESET pin\n" );
+    mtk7620_set_gpio_dir(RST_BTN, 1);
 }
 
-unsigned long DETECT(void)
+unsigned long DETECT_RST(void)
 {
     int key = 0;
 
     if(!mtk7620_get_gpio_pin(RST_BTN)) {
         key = 1;
-        printf("reset buootn pressed!\n");
+        printf("reset button pressed!\n");
     }
     return key;
 }
@@ -411,16 +411,16 @@
 
     if(!mtk7620_get_gpio_pin(WPS_BTN)) {
         key = 1;
-//        printf("wps buootn pressed!\n");
+        printf("wps button pressed!\n");
     }
     return key;
 }
-/*
+
 void PWR_LEDON(void)
 {
     mtk7620_set_gpio_pin(PWR_LED, 0);
 }
-*/
+
 void LEDON( void )
 {
     mtk7620_set_gpio_pin( WAN_LED, 0 );
Index: lib_mips/board.c
===================================================================
--- lib_mips/board.c    (revision 4)
+++ lib_mips/board.c    (working copy)
@@ -1283,7 +1283,7 @@
                 break;
         }
         printf( "============================================ \n" );
-        printf( "CleanWRT u-boot_mt7620 Version: %s\n", WEB_FAILSAFE_VERSION );
+        printf( "NEXX WT-3020 Version: %s\n", WEB_FAILSAFE_VERSION );
         printf( "-------------------------------------------- \n" );
         printf( "%s %s %s\n", CHIP_TYPE, CHIP_VERSION, GMAC_MODE );
 #if defined (MT7620_ASIC_BOARD) || defined(MT7620_FPGA_BOARD)
@@ -1405,11 +1405,11 @@
     // wait 0,5s
     udelay(500000);
 
-    printf( "\nPress press WPS button for more than 2 seconds to run web failsafe mode\n\n" );
+    printf( "\nPress press RESET button for more than 2 seconds to run web failsafe mode\n\n" );
 
-    printf( "WPS button is pressed for: %2d second(s)", counter );
+    printf( "RESET button is pressed for: %2d second(s)", counter );
 
-    while( DETECT_WPS() ) {
+    while( DETECT_RST() ) {
 
         // LED ON and wait 0.2s
         LEDON();
@@ -1421,10 +1421,10 @@
 
         counter++;
 
-        // how long the WPS button is pressed?
+        // how long the RESET button is pressed?
         printf("\b\b\b\b\b\b\b\b\b\b\b\b%2d second(s)", counter);
 
-        if ( !DETECT_WPS() ){
+        if ( !DETECT_RST() ){
             break;
         }
 
@@ -1437,11 +1437,11 @@
 
     if ( counter > 0 ) {
 
-        printf( "\n\nWPS button was pressed for %d seconds\nHTTP server is starting for firmware update...\n\n", counter );
+        printf( "\n\nRESET button was pressed for %d seconds\nHTTP server is starting for firmware update...\n\n", counter );
         eth_initialize(gd->bd);
         NetLoopHttpd();
     } else {
-        printf( "\n\nCatution: WPS button wasn't pressed or not long enough!\nContinuing normal boot...\n\n" );
+        printf( "\n\nCaution: RESET button wasn't pressed or not long enough!\nContinuing normal boot...\n\n" );
     }
 
 /* enter web failsafe mode, added by hubo, July 1st 2014 */
Index: u-boot_version.h
===================================================================
--- u-boot_version.h    (revision 4)
+++ u-boot_version.h    (working copy)
@@ -1 +1 @@
-#define WEB_FAILSAFE_VERSION    "0.0.0.1"
+#define WEB_FAILSAFE_VERSION    "0.0.0.4"

(Last edited by saturn-b on 25 Jan 2015, 09:16)

Okay, thank you for reply. Can you tell, what tools were you using? I mean, was OS 32 or 64bit, did you use crosscompile environment or just ralink sdk? Which version, if so?

(Last edited by hackru on 25 Jan 2015, 11:28)

hackru wrote:

Okay, thank you for reply. Can you tell, what tools were you using? I mean, was OS 32 or 64bit, did you use crosscompile environment or just ralink sdk? Which version, if so?

I'm using ralink toolchain from Ralink SDK 4.1.1.0  just extract SDK and install it :


Install Tool Chain:


#tar xvf MTK_Ralink_ApSoC_SDK_4110_20121102.tar.bz2

#cd  RT288x_SDK

#sudo cp toolchain/buildroot-gcc342.tar.bz2 /opt/

#cd /opt

#sudo tar xvf buildroot-gcc342.tar.bz2

The extract procedure makes a directory equivalent to "/opt/buildroot-gdb"


Install LZMA Utility:

#cd RT288x_SDK/oolchain/lzma-4.32.7

#./configure

#make

#sudo make install

You can read for more detail in Ralink SDK manual on doc folder.

My machine is 32 bit ubuntu by the way.

You helped me a lot, thank you!

hackru wrote:

Thank you, saturn-b, great work. Works brilliantly. Better than chinese uboot with web-interface(well, because it just works)
Where can i see source code of this? I want to compile this uboot with different settings and for another device.

Are there any other major differences between this and the Chinese U-boot (see also this thread: https://forum.openwrt.org/viewtopic.php?id=55180)?

Well, major difference is that chinese uboot is some kind of universal(supports any memory size and type, any flash). This way it's very cool. But it is also a weak point.
This uboot doesn't work well, because, WELL, it doesn't properly boot some images. Some images boot okay, others - no. So, it's like a roulette. With this uboot(from saturn-b), i verified, and all firmwares i have boots properly.

But, this uboot lacks some important features, like network console or, very nice feaure, μDHCP server. At the same time friend of mine reports that he can't enter web-interface using this uboot. Don't know why.

(Last edited by hackru on 25 Jan 2015, 21:56)

hackru wrote:

Well, major difference is that chinese uboot is some kind of universal(supports any memory size and type, any flash). This way it's very cool. But it is also a weak point.
This uboot doesn't work well, because, WELL, it doesn't properly boot some images. Some images boot okay, others - no. So, it's like a roulette. With this uboot(from saturn-b), i verified, and all firmwares i have boots properly.

But, this uboot lacks some important features, like network console or, very nice feaure, μDHCP server. At the same time friend of mine reports that he can't enter web-interface using this uboot. Don't know why.

So these features are also missing from pepe2k's U-boot? That's a shame because the Chinese one is apparently closed source.

I think i need to clarify, because in previous message was real mess.
saturn-b's uboot:
+ boot all images
+ opensource
- need to compile for exact router
- don't have μDHCP server/Network Console

chinese universal:
+ runs on any hardware
+ have μDHCP server/Network Console
- not boot all the images(i believe it's bug)
- closed source

(Last edited by hackru on 25 Jan 2015, 23:06)

roger_ wrote:
hackru wrote:

Well, major difference is that chinese uboot is some kind of universal(supports any memory size and type, any flash). This way it's very cool. But it is also a weak point.
This uboot doesn't work well, because, WELL, it doesn't properly boot some images. Some images boot okay, others - no. So, it's like a roulette. With this uboot(from saturn-b), i verified, and all firmwares i have boots properly.

But, this uboot lacks some important features, like network console or, very nice feaure, μDHCP server. At the same time friend of mine reports that he can't enter web-interface using this uboot. Don't know why.

So these features are also missing from pepe2k's U-boot? That's a shame because the Chinese one is apparently closed source.

U-Boot project is GPL licensed! If someone is closing project based on U-Boot (any kind of modification), he/she is simply violating GPL license!
My official modification doesn't include support for any other SoCs than Atheros AR933x/AR934x at this moment.

I'm sorry  my folder is messed up , I have to start all over again.

Here the compressed folder tested and works.

u-boot_mt7620.tar.gz

Well i deleted my post because i already figured out what i'm doing wrong. But anyway, thanks.

Please , this link does not work , where you can download ?https://dl.dropboxusercontent.com/u/107843342/wt3020/wt3020originalfirmware237.7z)

very nice. is inspired by same mods for tp-links 703/3020?

if you integrate small usb2ttl inside of router, then it would be best mod smile

yesterday i received  the W25Q128FV chip, and i want to make a modification via arduino flasher . I have a question about firmware compatibility.
If i flash the new chip and  succesfully solder it back, can i upgrade a newer firmware  from here: https://downloads.openwrt.org/snapshots … ps/mt7620/   
or i need to build a custom firmware which support 16MB?

tommi32
can you share link to arduino flasher?

stamasd wrote:

Success! I managed to compile an image from git r43771 and flashed it over the original firmware. All of the 16MB flash are usable, with ~12MB available on / with no packages installed except Luci.

Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                   12608       472     12136   4% /
/dev/root                 2304      2304         0 100% /rom
tmpfs                    30752       516     30236   2% /tmp
tmpfs                    30752        56     30696   0% /tmp/root
tmpfs                      512         0       512   0% /dev
/dev/mtdblock5           12608       472     12136   4% /overlay
overlayfs:/overlay       12608       472     12136   4% /

If anyone wants to try this mod, here are the compiled images (with Luci built-in):
https://dl.dropboxusercontent.com/u/107 … actory.bin
https://dl.dropboxusercontent.com/u/107 … pgrade.bin

And the .dts that I used to compile this:

/dts-v1/;

/include/ "mt7620n.dtsi"

/ {
    compatible = "wt3020", "ralink,mt7620n-soc";
    model = "Nexx WT3020";

    palmbus@10000000 {
                gpio2: gpio@660 {
                        status = "okay";
                };

                gpio3: gpio@688 {
                        status = "okay";
                };

        spi@b00 {
            status = "okay";

            m25p160@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "w25q128";
                reg = <0 0>;
                linux,modalias = "m25p160", "w25q128";
                spi-max-frequency = <10000000>;

                partition@0 {
                    label = "u-boot";
                    reg = <0x0 0x30000>;
                    read-only;
                };

                partition@30000 {
                    label = "u-boot-env";
                    reg = <0x30000 0x10000>;
                    read-only;
                };

                factory: partition@40000 {
                    label = "factory";
                    reg = <0x40000 0x10000>;
                    read-only;
                };

                partition@50000 {
                    label = "firmware";
                    reg = <0x50000 0xfb0000>;
                };
            };
        };
    };

    ehci@101c0000 {
        status = "okay";
    };

    ohci@101c1000 {
        status = "okay";
    };

    ethernet@10100000 {
        mtd-mac-address = <&factory 0x4>;
        ralink,port-map = "wllll";
    };

    wmac@10180000 {
        ralink,mtd-eeprom = <&factory 0>;
    };

    pinctrl {
        state_default: pinctrl0 {
            default {
                ralink,group = "ephy", "wled", "pa", "i2c", "wdt", "uartf";
                ralink,function = "gpio";
            };
        };
    };

    gpio-keys-polled {
        compatible = "gpio-keys-polled";
        #address-cells = <1>;
        #size-cells = <0>;
        poll-interval = <20>;
        reset {
            label = "reset";
            gpios = <&gpio0 1 1>;
            linux,code = <0x198>;
        };
    };

        gpio-leds {
                compatible = "gpio-leds";
                power {
                        label = "nexx:blue:power";
                        gpios = <&gpio3 0 0>;
                };
        };
};

I would like to attempt next to upgrade the flash even further, to 32MB or even 64MB. The problem with that is that nobody seems to manufacture 32MB or 64MB flash chips in SOIC-8 package - they are all in SOIC-16 or DFN/BGA, even though only 8 pins are used. It's not impossible but it's not a simple desolder/resolder project as it will require building an adapter


hi,i made a serrios mistake,
i flash the openwrt-ramips-mt7620-wt3020-16M-squashfs-factory.bin to a new chip,
and got the router run into a brick, there is nothing output on the TTL console.

this file doest not the bootloader,so it can not booted.
i must flash the wt3020originalfirmware237.bin to a new chip,
then in the web page to flash the openwrt-ramips-mt7620-wt3020-16M-squashfs-factory.bin file.

i am a  newcomer, and i even don't know whether am i right about this ?
may anybody give me an confirm or get me corrected?

is there a way to flash the fireware and the bootloader together?

(Last edited by whyzix on 11 Jun 2015, 17:22)

probono wrote:

Is there any calibration data and/or MAC address on the chip that needs to be preserved when flashing the new chip? On Atheros-based systems, there is an "ART partition" for that.


Well if you look through the boot log it has the following snippet:

Creating 4 MTD partitions on "raspi":
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000040000 : "Config"
0x000000040000-0x000000050000 : "Factory"
0x000000050000-0x000000800000 : "Kernel"

I assume that the factory partition contains calibration data. That partition is preserved when flashing, and it is also defined in the .dts that I posted. Of course, the factory partition being at the beginning of the chip makes it easy to expand to larger chips.

I have ordered and am currently awaiting delivery of some 256Mbit and 512Mbit SPI flash chips; like I said, there aren't any in 8-SOIC package, but I found some in WSON (8x6mm) package which should be solderable with a bit of luck onto a 8-SOIC pad pattern. Flashing them in my programmer is another matter though, I don't have an appropriate carrier and that may be a problem.

can anyone tell me have to get the route boot with this firmware ?
what does it mean

" flashed it over the original firmware "

????

which file should i use ?
and how shuuld i flash it?

just flash breed bootloader to beginning of flash chip. then flash full dump via breed.

hackru wrote:

just flash breed bootloader to beginning of flash chip. then flash full dump via breed.

i flash the wt3020originalfirmware237.bin file back,

you mean i should flash the breed-mt7620-reset1.bin file,
and in the web interface of the breed bootloader,
i should choose the

openwrt-ramips-mt7620-wt3020-16M-squashfs-factory.bin

or

openwrt-ramips-mt7620-wt3020-16M-squashfs-sysupgrade.bin
?

what is the diffirence of the two file ?