-
Notifications
You must be signed in to change notification settings - Fork 346
Downgrade Firmware
Original author @serrj-sv, @CODeRUS and community. Discuss here.
Gateway keeps the previous firmware before the update and you can be loaded from it.
If you update twice to a bad firmware, this method does not work.
If you have bad firmware from the factory - this method does not work.
- UART adapter MUST be in 3.3V mode. The Gateway board is 5V intolerant
- Do not feed VCC from UART to Board. Use stock external power supply and micro-USB cable
- Do NOT touch any other test points (like TP16, TP17, etc), this is NOT NEEDED
-
Open Gateway
-
Solder USB UART adapter (GND to GND, RX to TX, TX to RX)
-
Connect adapter to USB. UART setting: 38400 8n1, disable flow control (rts/cts)
-
Power gateway with build-in USB power
-
Сheck if boot is OK and there are no artifacts in console. If there are artifacts - check the wires, change the USB UART.
-
Turn off gateway power
-
Hold letter
u
on your keyboard in UART console and turn on gateway -
When
<RealTek>
appears release letteru
and enter two commands:dbgmsg 9
and
ri 0 1 1
Attention: ALWAYS keep all UART logs and/or backups!
-
Enable flash
<RealTek>snwbi
-
Read boot_info from nand to memory
<RealTek>snwbrecc a0000000 140 800
-
Display boot_info in memory
<RealTek>db a0000000 40
You will get something similar:
[Addr] .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .A .B .C .D .E .F A0000000: 7C 91 00 00 E4 58 01 01 01 01 00 20 EC 04 C8 CF |....X..... .... A0000010: 00 00 20 EC 04 CB 19 00 00 82 80 04 62 C6 00 00 .. .........b... A0000020: 9A 40 04 72 E8 00 00 00 01 31 2E 30 2E 32 2E 30 [email protected] A0000030: 30 35 00 00 00 00 00 FF FF FF FF FF FF FF FF FF 05..............
-
Paste result to this form.
Scroll down to Swapped bootinfo dump section
It should change 4 bytes for first line:
A0000000: __ __ __ __ XX XX __ __ YY YY __ __ __ __ __ __
-
Copy first command from Bootinfo patch commands section:
<RealTek>eb A0000000 7C 91 00 00 E5 59 01 01 00 00 00 20 EC 04 C8 CF
You usually don't need to use the rest of the commands because they don't change anything.
-
Check changes. Repeat step 3
All lines must match Swapped bootinfo dump section from the calculator!
-
Clear nand before write
<RealTek>snwbeb 140
-
Write boot_info from memory to nand
<RealTek>snwbwecc a0000000 140 800
-
Reboot gateway (power off/on)
Gateway should starts with previous firmware.