Webrevert file required for TL-WR841N v12

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14208
Location: Texas, USA

PostPosted: Sun Feb 27, 2022 20:19    Post subject: Reply with quote
How to create webrevert files?

WARNING: This file has not been tested, use at your own risk. It was created using the instructions above.

EDIT: Header information corrected. Thanks, LOM!

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net


Last edited by kernel-panic69 on Mon Mar 14, 2022 15:53; edited 1 time in total
Sponsor
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Mon Mar 14, 2022 6:04    Post subject: Reply with quote
kernel-panic69 wrote:

WARNING: This file has not been tested, use at your own risk. It was created using the instructions above.


The file you have created is 0x3C001B bytes long but in your created header it says 0x3C001C.
You'd better remove it from download.

_________________
Kernel panic: Aiee, killing interrupt handler!
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14208
Location: Texas, USA

PostPosted: Mon Mar 14, 2022 15:53    Post subject: Reply with quote
Header should now be fixed. Please verify. FWIW, the header came directly from the DD-WRT webflash file and I looked no further (since it seemed to be the same size). Verified webflash file size to be different. Thanks for the insight, LOM!
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sat Apr 02, 2022 15:52    Post subject: Reply with quote
Well, it was not the header you should correct, it was the length of the original TP-Link firmware that was wrong.
You had lost the first byte in the stock firmware, (0x01) (and you obviously don't understand how the checksum is calculated).

Here is a file with correct header, correct length, and correct checksum:

_________________
Kernel panic: Aiee, killing interrupt handler!
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14208
Location: Texas, USA

PostPosted: Mon Apr 04, 2022 13:43    Post subject: Reply with quote
I admit that on the actual specifics of what content is being checksum'd, I am ignorant as I have gone back and tried every way to run a checksum and still did not come up with the 4 bytes in your file. Could you enlighten us all so as to prevent future blunders?
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Tue Apr 05, 2022 3:25    Post subject: Reply with quote
It is the 1's complement of the CRC-32 digest over the area from 0x0c to the end of the file.
The value is 32-bit big endian stored in position 0x08 - 0x0b.

Since a TP-Link bootloader stripped firmware is 0x3c0000 bytes long (4MB flash)or 0x7c0000 bytes long (8MB flash) then the checksum'ed are will be 0x3c0010 and 0x7c0010 respectively.

_________________
Kernel panic: Aiee, killing interrupt handler!
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Tue Apr 05, 2022 6:23    Post subject: Reply with quote
kernel-panic69 wrote:
I admit that on the actual specifics of what content is being checksum'd, I am ignorant as I have gone back and tried every way to run a checksum and still did not come up with the 4 bytes in your file. Could you enlighten us all so as to prevent future blunders?


Ignorant because you could have used almost any dd-wrt firmware to test your theories on, most of them contains a trx header with a correct checksum and you should not had published files for users until you could generate and verify a checksum on a dd-wrt firmware.

There is of course source code for it somewhere in the dd-wrt .svn and if you can't find it there then get it from openwrt.


Here is one link I got from a quick google:
https://github.com/openwrt/openwrt/blob/master/package/system/mtd/src/trx.c

_________________
Kernel panic: Aiee, killing interrupt handler!
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Tue Apr 05, 2022 10:59    Post subject: Reply with quote
I did remove the offending attachment a few days back of the incorrect fw to prevent any side issues, sadly file had been downloaded 8 times at the time I read LOM's original reply that `length of the original TP-Link firmware was wrong` and correct file ad been attached with reply.

With no feedback from users so far, I hope no issues arisen, since likely flashing said file would result in failure.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14208
Location: Texas, USA

PostPosted: Tue Apr 05, 2022 14:18    Post subject: Reply with quote
@LOM: Thanks for the clarification; to explain the blunder completely, the included checksum of the file I provided was copied directly from the webflash file's header for this specific device I used for reference, which was obviously a gross error on my part. The only other thing I'm a little lost on is the specific process on how to create this checksum; or rather, is this checksum calculated against only the bootloader-stripped stock firmware or what exactly. Perhaps I am not reading your commentary as I should...
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum