WGR614L - Netgear code compilation problem

4 posts / 0 new
Last post
Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
WGR614L - Netgear code compilation problem

I have compiled the source code of WGR614L version 1.1.11_6.0.36.

I run the following commands:

export PATH=/opt/brcm/hndtools-mipsel-uclibc/bin:$PATH
export PATH=/opt/brcm/hndtools-mipsel-linux/bin:$PATH

cd home/bcm5354/src/
rm -rf $(find . -name '.depend')

make clean

make

After successful compilation the chk file named e.g. "wgr614v8_10291329.chk " is created.

I have compared this file with the pre-compiled "chk" file provided by netgear.

The size of both the files is different as well as the data inside.

I then compiled the code again and generated another "chk" file "wgr614v8_10291413.chk ".

when I compared both files that i have compiled, there size is same but their content is not same (I see the content by using a hex editor)

 

Kindly anyone tell me that what could be the problem. Because I have made no changes, just compiled the same code 2 times but their output is different.

Output is not totally different. Instead their are some places where the output is exactly the same, in some places they are totally changed and in some places only their addresses are changed.

e.g the value 1F is at 0021:43a4 in one file and is at 0021:43a6 at another file.

 

what could be the reason ? 

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
Is there a method by which i

Is there a method by which i could make the firmwares identical ?

Is it possible that I could somehow remove the time stamp information in order to make the two different firmware outputs same?

Actually because the outputs are not same, i m confused that may be the code is not run properly... But as the .chk file is generated so it means that all the progress of code is successful but i want the outputs to be same to each other as well.

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
I have compiled the same code

I have compiled the same code 3 times without making any change. did not read or write any of the files.

Just run the make commands.

But I saw different behaviour in all the 3 files.

At some places they were same, some places they were totally different and in some places their addresses of the data was same. Means same data was present on different locations.

as you said that it could be because of time stamp information in the header, but in that case only some of the bytes should be same. But in my case many of the bytes were different.

Should i delete some of the files (means some additional files generated after first compilation)in the src folder or any other before recompiling? or Make clean command is enough ?

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
Regarding the serial setup.

Regarding the serial setup.

I don't have the serial cable of 3.3v right now.

I m searching for that cable but could not be able to find that one uptill now.

I have made the backup using tftpEnable utility in the form of 8 mtd files. I think If I could get the serial cable, I will be able to restore the firmware using those files.

Actually, If in case I upload the chk file using GUI and if the router would not accept that file then its true that I could restore the router using the serial console but in that case too I would not know that what was the problem with my chk file that has made the router unstable.

So there should be a method by which we could verify the chk file before uploading it to the router :)