compiling DD-WRT for brcm linux.v24_2

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11, 12  Next
Author Message
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1250
Location: Ohio USA

PostPosted: Mon Nov 30, 2009 14:53    Post subject: Reply with quote
I am finding that SNMP is not working in my builds, even though it is enabled in the .config when compiling.
_________________
(04/15/13) mega - 21286
4x WRT54G-TM

(04/15/13) std - 21286
1x WHR-G300N

(04/15/13) nokaid - 14929
1x WRT54GL v1.1

(04/15/13) micro - 21286
1x WG602v3

Got OpenDNS?
Sponsor
gruenesAlien
DD-WRT Guru


Joined: 27 Nov 2008
Posts: 717

PostPosted: Mon Nov 30, 2009 20:19    Post subject: Reply with quote
So I got it, too:) I think we should update the wiki a little.

Last edited by gruenesAlien on Mon Nov 30, 2009 21:40; edited 1 time in total
modervador
DD-WRT User


Joined: 07 Sep 2009
Posts: 271

PostPosted: Mon Nov 30, 2009 21:15    Post subject: Reply with quote
Luniz2k1 wrote:
I am finding that SNMP is not working in my builds, even though it is enabled in the .config when compiling.

Is it possible that some modules are removed by an extraneous command in your install script itself? It gets rather hairy because there are scripts that call other scripts and/or run make commands which in turn may call more scripts. Unexpected results are easy to encounter.

For example, I have just determined that in the install_mini.v24_2.sh on the first page of this thread, the following line
Code:
./make_kernel.v24_2.sh
has no added value that I can tell. These lines in that make_kernel script,
Code:
./loader-0.02/lzma e ../src/linux/brcm/linux.v24_2/arch/mips/bcm947xx/compressed/piggy vmlinuz
./loader-0.02/lzma e ../src/linux/brcm/linux.v24_2/arch/mips/bcm947xx/compressed/piggy vmlinuzmicro 
refer to vmlinuz and vmlinuzmicro that will be placed in the DD-WRT/opt directory but will be ignored in the subsequent command,
Code:
../tools/trx -o dd-wrt.v24_2.trx ./loader-0.02/loader.gz ../src/router/mipsel-uclibc/vmlinuz target.squashfs
because the latter vmlinuz is in the /src/router/mipsel-uclibc/ directory. Look at an early install script which executes Line 297 of an early src/router makefile well before it calls an early make_kernel script and you'll see how long the commands in opt/make_kernel may have been superfluous.

I am not pointing fingers here. On a project of this size, things like this are bound to happen and they can be hard to find when they cause no adverse effect.

Edit: Fixed links to source; no longer at http://svn.dd-wrt.com:8000/dd-wrt/browser/...


Last edited by modervador on Tue Mar 13, 2012 15:07; edited 1 time in total
modervador
DD-WRT User


Joined: 07 Sep 2009
Posts: 271

PostPosted: Mon Nov 30, 2009 21:21    Post subject: Reply with quote
gruenesAlien wrote:
So I got it, too:) I think we should update the wiki a little.
The wiki seems to be at least a year older than this thread.

Last edited by modervador on Tue Dec 01, 2009 0:09; edited 1 time in total
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1250
Location: Ohio USA

PostPosted: Mon Nov 30, 2009 23:39    Post subject: Reply with quote
modervador wrote:
Is it possible that some modules are removed by an extraneous command in your install script itself?

Well snmp is compiling, and it does exist on my router:
/var/snmp/snmpd.conf <-- file exists
/usr/sbin/snmpd <-- file exists

And here is the output showing that it does execute:
Code:
/usr/sbin# snmpd --help

Usage:  snmpd [OPTIONS] [LISTENING ADDRESSES]

        Version:  5.0.9
        Web:      http://www.net-snmp.org/
        Email:    net-snmp-coders@lists.sourceforge.net

  -a                    log addresses
  -A                    append to the logfile rather than truncating it
  -c FILE               read FILE as a configuration file
  -C                    do not read the default configuration files
  -d                    dump sent and received SNMP packets
  -D                    turn on debugging output
  -f                    do not fork from the shell
  -g GID                change to this numeric gid after opening
                          transport endpoints
  -h, --help            display this usage message
  -H                    display configuration file directives understood
  -I [-]INITLIST        list of mib modules to initialize (or not)
                          (run snmpd with -Dmib_init for a list)
  -l FILE               print warnings/messages to FILE
                          (by default FILE=/dev/null)
  -L                    print warnings/messages to stdout/err
  -P FILE               store process id in FILE
  -q                    print information in a more parsable format
  -r                    do not exit if files only accessible to root
                          cannot be opened
  -s                    log warnings/messages to syslog
  -S d|i|0-7            set syslog facility to LOG_DAEMON (d), LOG_INFO (i)
                          or LOG_LOCAL[0-7] (default LOG_DAEMON)
  -u UID                change to this uid (numeric or textual) after
                          opening transport endpoints
  -v, --version         display version information
  -V                    verbose display


On my 1 WRT54G-TM that I am running "DD-WRT v24-sp2 (11/25/09) std-nokaid - build 13309M NEWD Eko" on and snmp enabled and configured, it shows snmp running in "top" and works fine.
Code:
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
22676     1 root     S     2220  7.5  0.0 snmpd -c /var/snmp/snmpd.conf

On my other WRT54G-TM that I built the firmware for, snmp is configured and enabled, but it does not show that it is running under "top". If I manually try starting it with "snmpd -c /var/snmp/snmpd.conf" or "startservice snmp" it does not start.

_________________
(04/15/13) mega - 21286
4x WRT54G-TM

(04/15/13) std - 21286
1x WHR-G300N

(04/15/13) nokaid - 14929
1x WRT54GL v1.1

(04/15/13) micro - 21286
1x WG602v3

Got OpenDNS?
gruenesAlien
DD-WRT Guru


Joined: 27 Nov 2008
Posts: 717

PostPosted: Tue Dec 01, 2009 8:51    Post subject: Reply with quote
You might set some symbolic links to tmp. E.g. I do know from samba that it want to keep books about the netbios names it finds and stores information /etc/samba/secrets.tdb (or similar). If you create a symbolic link /etc/samba/secrets.tdb that targets to /tmp/etc/samba/secrets.tdb things should work. You can find such open files by looking in /proc/*/fd (e.g. ls -l /proc/*/fd | grep snmp ) in your router running smnp. If you have a running optware you can use the command lsof, and it will give you even more information.

I have not tried a things for this special way, I used this to prevent usb-disc access of samba so that the disc can spin down.
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1250
Location: Ohio USA

PostPosted: Tue Dec 01, 2009 23:34    Post subject: Reply with quote
gruenesAlien wrote:
You might set some symbolic links to tmp.

Thanks for the tip. I do see that /tmp/snmp-persist/snmpd.conf does not exist on my custom build, which contains the following:
Code:

#
# net-snmp (or ucd-snmp) persistent data file.
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
#

engineBoots 2
oldEngineID 0x800007e580dcebc4552a000000'
This file is not a symbolic link on my router running the Eko build.

I have manually created the file with these contents but it still does not start with "snmpd -c /var/snmp/snmpd.conf" or "startservice snmp". I will have to go through both routers and compare the folder contents to see what else is missing from my custom build for snmp.

_________________
(04/15/13) mega - 21286
4x WRT54G-TM

(04/15/13) std - 21286
1x WHR-G300N

(04/15/13) nokaid - 14929
1x WRT54GL v1.1

(04/15/13) micro - 21286
1x WG602v3

Got OpenDNS?
rkozola
DD-WRT User


Joined: 27 Oct 2007
Posts: 150

PostPosted: Wed Dec 02, 2009 1:05    Post subject: Reply with quote
Luniz2k1 wrote:
Thanks for the tip. I do see that /tmp/snmp-persist/snmpd.conf does not exist on my custom build, which contains the following:
Code:

#
# net-snmp (or ucd-snmp) persistent data file.
#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
#

engineBoots 2
oldEngineID 0x800007e580dcebc4552a000000'
This file is not a symbolic link on my router running the Eko build.

I have manually created the file with these contents but it still does not start with "snmpd -c /var/snmp/snmpd.conf" or "startservice snmp". I will have to go through both routers and compare the folder contents to see what else is missing from my custom build for snmp.


try removing '--disable-debugging' from line 17 of src/router/rules/snmp.mk
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1250
Location: Ohio USA

PostPosted: Wed Dec 02, 2009 1:29    Post subject: Reply with quote
rkozola wrote:
try removing '--disable-debugging' from line 17 of src/router/rules/snmp.mk

Son of a bitch! Thank you rkozola. This has been driving me nuts all weekend.

_________________
(04/15/13) mega - 21286
4x WRT54G-TM

(04/15/13) std - 21286
1x WHR-G300N

(04/15/13) nokaid - 14929
1x WRT54GL v1.1

(04/15/13) micro - 21286
1x WG602v3

Got OpenDNS?
rkozola
DD-WRT User


Joined: 27 Oct 2007
Posts: 150

PostPosted: Wed Dec 02, 2009 2:15    Post subject: Reply with quote
some others just in case. you would want to use the > lines.

Code:

dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff openssl.mkb openssl.mk
17c17
< ifeq ($(CONFIG_MADWIFI),y)
---
> #ifeq ($(CONFIG_MADWIFI),y)
20c20
< endif
---
> #endif
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff openvpn.mkb openvpn.mk
14,16c14,16
< ifneq ($(CONFIG_MADWIFI),y)
<       rm -f openssl/*.so*
< endif
---
> #ifneq ($(CONFIG_MADWIFI),y)
> #     rm -f openssl/*.so*
> #endif
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff sputnik.mkb sputnik.mk
10c10
<       if test -e "sputnik/Makefile"; then make -C sputnik; fi
---
>       if test -d "sputnik/src"; then make -C sputnik; fi
13c13
<       if test -e "sputnik/Makefile"; then make -C sputnik clean; fi
---
>       if test -d "sputnik/src"; then make -C sputnik clean; fi
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1250
Location: Ohio USA

PostPosted: Thu Dec 03, 2009 8:55    Post subject: Reply with quote
rkozola wrote:
some others just in case. you would want to use the > lines.

Code:

dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff openssl.mkb openssl.mk
17c17
< ifeq ($(CONFIG_MADWIFI),y)
---
> #ifeq ($(CONFIG_MADWIFI),y)
20c20
< endif
---
> #endif
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff openvpn.mkb openvpn.mk
14,16c14,16
< ifneq ($(CONFIG_MADWIFI),y)
<       rm -f openssl/*.so*
< endif
---
> #ifneq ($(CONFIG_MADWIFI),y)
> #     rm -f openssl/*.so*
> #endif
dd-wrt@dd-wrt:~/DD-WRT/src/router/rules$ diff sputnik.mkb sputnik.mk
10c10
<       if test -e "sputnik/Makefile"; then make -C sputnik; fi
---
>       if test -d "sputnik/src"; then make -C sputnik; fi
13c13
<       if test -e "sputnik/Makefile"; then make -C sputnik clean; fi
---
>       if test -d "sputnik/src"; then make -C sputnik clean; fi

Nice. Thanks for these tips. I have also found that I need to run make clean prior to make configure in src/router after making changes to the .config file.

_________________
(04/15/13) mega - 21286
4x WRT54G-TM

(04/15/13) std - 21286
1x WHR-G300N

(04/15/13) nokaid - 14929
1x WRT54GL v1.1

(04/15/13) micro - 21286
1x WG602v3

Got OpenDNS?
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1250
Location: Ohio USA

PostPosted: Thu Dec 03, 2009 9:09    Post subject: Reply with quote
I got openvpn to build once I enabled openssl.
_________________
(04/15/13) mega - 21286
4x WRT54G-TM

(04/15/13) std - 21286
1x WHR-G300N

(04/15/13) nokaid - 14929
1x WRT54GL v1.1

(04/15/13) micro - 21286
1x WG602v3

Got OpenDNS?


Last edited by Luniz2k1 on Sat Dec 05, 2009 20:19; edited 1 time in total
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1250
Location: Ohio USA

PostPosted: Thu Dec 03, 2009 15:13    Post subject: Reply with quote
Going to put off fixing openvpn for now and work on setting my default nvram settings in src/router/services/sysinit/sysinit.c
_________________
(04/15/13) mega - 21286
4x WRT54G-TM

(04/15/13) std - 21286
1x WHR-G300N

(04/15/13) nokaid - 14929
1x WRT54GL v1.1

(04/15/13) micro - 21286
1x WG602v3

Got OpenDNS?
4512jth
DD-WRT User


Joined: 14 Mar 2009
Posts: 233

PostPosted: Wed Dec 09, 2009 11:45    Post subject: Reply with quote
Is there any easy way to see the output produced by the install_x.v24_2.sh script? I always get an error but can't scroll up because some program always clears the console.
_________________
Routers:
WRT54GS v6: DD-WRT v24-sp2 14438 NEWD2 micro_plus with modified CFE
Asus WL-500gP v2: Tomato USB k26 beta 20
WRT120N (No dd-wrt/openwrt yet...)
At 14, the youngest DD-WRT User Very Happy
gruenesAlien
DD-WRT Guru


Joined: 27 Nov 2008
Posts: 717

PostPosted: Wed Dec 09, 2009 13:13    Post subject: Reply with quote
call your script with

instalXXX.sh &> make.log

that will redirect everything to the make.log file. you can open a second console any type

tail -f make.log to see the output while it is produced.
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11, 12  Next Display posts from previous:    Page 9 of 12
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Generic Questions 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 can attach files in this forum
You can download files in this forum