Has anyone compiled source code of 1.1.11_6.0.36 version ?

19 posts / 0 new
Last post
Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
Has anyone compiled source code of 1.1.11_6.0.36 version ?

Hi!

I have downloaded the code of Netgear's WGR614v8 1.1.11_6.0.36 version and tried to compile the code but I could not get succeed. I have also downloaded the Toolchain and put into opt/brcm folder but the compilation gives errors ..

If someone has tried then kindly tell me the entire process for running this code ..

achilles
achilles's picture
the process is same that u

the process is same that u have used for previous versions ... what r d errors dat u r getting ....

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
actually ... before that I

actually ... before that I was using the code from Tomato version 1.25 and i just had to run a script that is why, I didn't face any problem.

There are certain confusions while compiling this code:

1. In the readme file of the router code, it is mentioned to do this step after putting the toolchain in the opt/brcm folder.

===================
Build code
===================

1. Edit your user profile (On Fedora Core 2, the profile is ~/.bash_profile)

to include the toolchain paths:

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

I dont know how to change the profile :S
I have used the terminal to go to the path opt/brcm and then paste the above command there. (is this alright ?)

2. There is the instruction that I should UNTAR the toolchain and follow the instructions in tools-src directory.

In the README file of tools-src directory it is written that:

To make the GNU toolchain
* cd to ../release/src/router

(there is no "Release" folder in the WGR614l 1.1.11_6.0.36 code directory :S )

Do you have any idea that what am I doing wrong ?

achilles
achilles's picture
u can export the tool chain

u can export the tool chain using following command :
export PATH=/opt/brcm/hndtools-mipsel-linux-3.2.3/bin:/opt/brcm/hndtools-mipsel-uclibc-3.2.3/bin:$PATH

The README files are somtimes just copied from one distribution to other without changing them properly ....
It would be better if u look at the Makefiles under src/ , src/router and src/linux to see how the image is built ... that will b more useful 2 u ....

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
I have put the make file in

I have put the make file in the src directory for you to have a look .. can you tell me that what does this show ... actually i m a beginner so i can't understand that as much..

#
# Toplevel Makefile for the BCM947xx Linux Router release
#
# Copyright 2007, Broadcom Corporation
# All Rights Reserved.
#
# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
#
# $Id$
#

SRCBASE := $(shell pwd)
RELEASEDIR := $(shell (cd $(SRCBASE)/.. && pwd -P))

install: all
install -d $(RELEASEDIR)/image
$(MAKE) -C router install
# -cp router/mipsel/linux.trx $(RELEASEDIR)/image/linux-glibc.trx
# -cp router/mipsel-uclibc/linux.trx $(RELEASEDIR)/image/linux.trx
# -cp router/mipsel-uclibc/linux.bin $(RELEASEDIR)/image/linux.bin
#ifneq ($(wildcard cfe),)
# cp cfe/build/broadcom/bcm947xx/cfe.bin $(RELEASEDIR)/image/
# cp cfe/build/broadcom/bcm947xx/compressed/cfez.bin $(RELEASEDIR)/image/
# # Clean and make one more time with GigE
# $(MAKE) -C cfe clean
# $(MAKE) -C cfe CFG_PCI=1
# cp cfe/build/broadcom/bcm947xx/cfe.bin $(RELEASEDIR)/image/cfe-gige.bin
# cp cfe/build/broadcom/bcm947xx/compressed/cfez.bin $(RELEASEDIR)/image/cfez-gige.bin
#endif
cp shared/nvram/*.txt $(RELEASEDIR)/image/

all clean:
$(MAKE) -C router $@
#ifneq ($(wildcard cfe),)
# $(MAKE) -C cfe $@
#endif

.PHONY: all clean install

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
I am running the following

I am running the following commands but it is giving me errors ...

Run the following commands to build image

cd bcm5354/src/linux/linux
make dep
make
cd ../../router
make clean
make
make install

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
I have tried to run the above

I have tried to run the above commands and all of the above run successfully except for the last one ... i.e. make install ...

it gives these errors at the end:

###########################################
### Create LZMA kernel ####################
mipsel-linux-objcopy -O binary -g /home/yasir/bcm5354/src/linux/linux/vmlinux /home/yasir/bcm5354/src/router/mipsel/vmlinux.bin
../../tools/lzma e /home/yasir/bcm5354/src/router/mipsel/vmlinux.bin /home/yasir/bcm5354/src/router/mipsel/vmlinux.lzma
../../tools/lzma: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
make[1]: *** [install] Error 127
make[1]: Leaving directory `/home/yasir/bcm5354/src/router'
make: *** [install] Error 2

Has anyone any idea about why is it giving this error ?
There is also a message popped at my task bar up which says:

SELinux AVC Denial !!
SELinux is preventing gdm-binary (xdm_t) "write" to (var_log_t).

achilles
achilles's picture
OK ... It is evident from the

OK ... It is evident from the log that u r missing the library libstdc++.so.5.

You need to install the libstdc++.so.5 library.

Enter the command as root:
# yum install libstdc++.so.5

It should solve the issue you have reported .... if u face any other problem let me know

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
I got the following error

I got the following error when executing this command:

[root@localhost src]# yum install libstdc++.so.5
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=i386 error was
[Errno 4] IOError:
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
I think libstdc++.so.5

I think libstdc++.so.5 library is not present in my computer that is why it is failed to retrieve it.

Can anyone tell me that from where could i get that and how?

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
Ok I am happy that I have got

Ok I am happy that I have got rid of the problem that I faced related to libstdc++.so.5.

I have downloaded it from this link:

http://rpm.pbone.net/index.php3/stat/4/idpl/1981813/com/compat-libstdc++...

what I want to ask now is that in the README file for the code, it is written that the final image is "bcm5354/src/router/mipsel/kernel_image.chk".

I have seen that it has successfully created kernel_image.chk file (3.3 Mb) but also has created 3 more chk files named:

kernel_rootfs_image.chk (3.3 Mb)
wgr614v8_09301237.chk (3.3 Mb)
and
rootfs_image.chk (58 bytes)

what is the purpose of these files ?
Are these the same firmware files or some other ?

achilles
achilles's picture
Hi ,

Hi ,
Your final image is wgr614v8_09301237.chk , the other images are for kernel/rootfs only or are renamed to the final image ....
The image that you should flash to your board is "wgr614v8_09301237.chk" , other are images related to the same firmware but they are formed in the intermediate stages ....
If you look at the Makefile ... the purpose of all the other images will be clr to you ... If you still have any doubts ..feel free to ask ...

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
As I told you earlier that I

As I told you earlier that I tried to update my firmware by using Tomato firmware 1.25 and then my router stopped working therefore I want to ask that is there anyway that we could verify a chk file before putting it into the router ??

I mean that there could be problem with the chk file that i have generated. Can i somehow verify chk files that i have generated now ? Is there any graphic tool ?

achilles
achilles's picture
I dnt know of any such tool .

I dnt know of any such tool .... the chk image that I mentioned in my last post is the chk image that people upload ...
If u have not done any changes in the Makefile , then this image will work ...
Also if you have a serial set up ready ...you can flash your router with this image using tftp .....
This way u can verify ur image and if something goes wrong u can again put the default netgear f/w using tftp ..

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
Okkk ... so it means that i

Okkk ... so it means that i have to varify the image just using the router .. there is no other alternate.

Actually, when i tried to update the tomato firmware 1.25, my router stopped responding. I used the jtag cable to put the original data in to my router but uptill now i m not been successful. That is why i thought that there should be some method by which i could verify the chk file..

anyhow ... would u kindly help me out about jtag problem ?
whenever i flash the data by using the flash commands, it shows that it is writing the bytes but when i get the backup, it displays only garbage data :S

achilles
achilles's picture
Could you send the dump of

Could you send the dump of the console when you do a write and also when you read the written data ...

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
When i used the -probeonly

When i used the -probeonly command, it gives me this:

(I did force detection of the flash) 

 

tjtag -probeonly /fc:21

==============================================
 EJTAG Debrick Utility v3.0.1 Tornado-MOD
==============================================

Probing bus ... Done

Instruction Length set to 8

CPU Chip ID: 00100101001101010100000101111111 (2535417F)
*** Found a Broadcom BCM5354 KFBG Rev 2 CPU chip ***

    - EJTAG IMPCODE ....... : 00000000100000010000100100000100 (00810904)
    - EJTAG Version ....... : 1 or 2.0
    - EJTAG DMA Support ... : Yes
    - EJTAG Implementation flags: R4k MIPS16 MIPS32

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Done
Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
Clearing Watchdog ... Done

Manual Flash Selection ... Done

Flash Vendor ID: 00000000000000000000000011000010 (000000C2)
Flash Device ID: 00000000000000000010000000010110 (00002016)
*** Manually Selected a Macronix MX25L3205D        (4MB) Serial Flash Chip ***

    - Flash Chip Window Start .... : 1fc00000
    - Flash Chip Window Length ... : 00400000
    - Selected Area Start ........ : 00000000
    - Selected Area Length ....... : 00000000

 *** REQUESTED OPERATION IS COMPLETE ***
 

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
when I did the flash:CFE

when I did the flash:CFE command, the result was this :

I have checked the contents of CFE.bin file and the contents were the same as they are shown when writing to the flash 

 

 tjtag -flash:CFE /noreset  /fc:21

==============================================
 EJTAG Debrick Utility v3.0.1 Tornado-MOD
==============================================

Probing bus ... Done

Instruction Length set to 8

CPU Chip ID: 00100101001101010100000101111111 (2535417F)
*** Found a Broadcom BCM5354 KFBG Rev 2 CPU chip ***

    - EJTAG IMPCODE ....... : 00000000100000010000100100000100 (00810904)
    - EJTAG Version ....... : 1 or 2.0
    - EJTAG DMA Support ... : Yes
    - EJTAG Implementation flags: R4k MIPS16 MIPS32

Issuing Processor / Peripheral Reset ... Skipped
Enabling Memory Writes ... Done
Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
Clearing Watchdog ... Done

Manual Flash Selection ... Done

Flash Vendor ID: 00000000000000000000000011000010 (000000C2)
Flash Device ID: 00000000000000000010000000010110 (00002016)
*** Manually Selected a Macronix MX25L3205D        (4MB) Serial Flash Chip ***

    - Flash Chip Window Start .... : 1fc00000
    - Flash Chip Window Length ... : 00400000
    - Selected Area Start ........ : 1fc00000
    - Selected Area Length ....... : 00040000

*** You Selected to Flash the CFE.BIN ***

=========================
Flashing Routine Started
=========================
Total Blocks to Erase: 4

Erasing block: 1 (addr = 1fc00000)...Done
Erasing block: 2 (addr = 1fc10000)...Done
Erasing block: 3 (addr = 1fc20000)...Done
Erasing block: 4 (addr = 1fc30000)...Done

Loading CFE.BIN to Flash Memory...
[  0% Flashed]   1fc00000: 3c06b800 24075350 8cc90000 340affff
[  0% Flashed]   1fc00010: 012a5024 1547000f 00000000 3c0a00f0
[  0% Flashed]   1fc00020: 012a5024 3c070010 11470040 00000000
[  0% Flashed]   1fc00030: 24070311 8ccb0090 10eb003c 00000000
[  0% Flashed]   1fc00040: acc70090 240b0001 accb0080 1000ffff
[  0% Flashed]   1fc00050: 00000000 24075354 15470034 00000000
[  0% Flashed]   1fc00060: 3c0a000f 012a5024 3c0b0003 014b082a
[  0% Flashed]   1fc00070: 14200005 00000000 3c040133 240a0002
[  0% Flashed]   1fc00080: acca0658 acc4065c 24042000 3c050680
[  0% Flashed]   1fc00090: 3c070200 240a0001 acca0658 acc5065c
[  0% Flashed]   1fc000a0: 240a0000 acca0658 acc4065c 240a0003
[  0% Flashed]   1fc000b0: acca0658 acc7065c 8cca0600 314a007c
[  0% Flashed]   1fc000c0: 1540000f 00000000 3c0a0007 354affff
[  0% Flashed]   1fc000d0: acca0618 acca061c 240a0001 acca0660
[  0% Flashed]   1fc000e0: 3c0a6666 354a6602 acca0664 3c0a000f
[  0% Flashed]   1fc000f0: 354affff acca0618 acca061c 00000000
[  0% Flashed]   1fc00100: 3c081fa0 3508000c 4088b006 3c091fa0
[  0% Flashed]   1fc00110: 8d2a0014 3c01c000 01415825 ad2b0014
[  0% Flashed]   1fc00120: 3c08ff40 3508000c 4088b006 04110001
[  0% Flashed]   1fc00130: 00000000 3c081fff 3508ffff 011f4024
[  0% Flashed]   1fc00140: 3c091fc0 0109082a 10200005 00000000
[  0% Flashed]   1fc00150: 0c000700 00000000 100001c8 00000000
[  0% Flashed]   1fc00160: 3c08b800 8d090ffc 312a8ff0 000a5102
[  0% Flashed]   1fc00170: 24010800 15410013 00000000 312a000f
[  0% Flashed]   1fc00180: 312b7000 000b5a02 014b5025 2941000b
[  0% Flashed]   1fc00190: 1420000c 00000000 2941000d 10200009
[  0% Flashed]   1fc001a0: 00000000 8d080004 31080700 24010200
[  0% Flashed]   1fc001b0: 1101004c 00000000 24010100 11010049
 

and so  on ..... 

Syed Yasir Imtiaz
Syed Yasir Imtiaz's picture
Finally ... when i used the

Finally ... when i used the backup:CFE command, it gives me garbage data ..

 here it is giving only fff's but after getting backup everytime it gives different values ... but not the original data that i have written

 

 

tjtag -backup:CFE /noreset  /fc:21

==============================================
 EJTAG Debrick Utility v3.0.1 Tornado-MOD
==============================================

Probing bus ... Done

Instruction Length set to 8

CPU Chip ID: 00100101001101010100000101111111 (2535417F)
*** Found a Broadcom BCM5354 KFBG Rev 2 CPU chip ***

    - EJTAG IMPCODE ....... : 00000000100000010000100100000100 (00810904)
    - EJTAG Version ....... : 1 or 2.0
    - EJTAG DMA Support ... : Yes
    - EJTAG Implementation flags: R4k MIPS16 MIPS32

Issuing Processor / Peripheral Reset ... Skipped
Enabling Memory Writes ... Done
Halting Processor ... <Processor Entered Debug Mode!> ... Done
Clearing Watchdog ... Done

Manual Flash Selection ... Done

Flash Vendor ID: 00000000000000000000000011000010 (000000C2)
Flash Device ID: 00000000000000000010000000010110 (00002016)
*** Manually Selected a Macronix MX25L3205D        (4MB) Serial Flash Chip ***

    - Flash Chip Window Start .... : 1fc00000
    - Flash Chip Window Length ... : 00400000
    - Selected Area Start ........ : 1fc00000
    - Selected Area Length ....... : 00040000

*** You Selected to Backup the CFE.BIN ***

=========================
Backup Routine Started
=========================

Saving CFE.BIN.SAVED_20091006_143045 to Disk...
[  0% Backed Up]   1fc00000: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00010: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00020: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00030: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00040: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00050: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00060: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00070: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00080: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00090: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc000a0: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc000b0: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc000c0: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc000d0: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc000e0: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc000f0: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00100: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00110: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00120: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00130: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00140: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00150: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00160: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00170: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00180: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc00190: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc001a0: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc001b0: ffffffff ffffffff ffffffff ffffffff
[  0% Backed Up]   1fc001c0: ffffffff ffffffff ffffffff ffffffff