Active Topics

 


Reply
Thread Tools
Posts: 1,042 | Thanked: 430 times | Joined on May 2010
#411
Yey managed to boot it without r&d thanks for the tip lunat
 
Posts: 1,042 | Thanked: 430 times | Joined on May 2010
#412
Originally Posted by artron View Post
How to disable watchdog?
Simple but needs kernel modification... Just compile your own kernel with CONFIG_WATCHDOG_NOWAYOUT config set to disabled.

BTW found out this new script and said to be able to send replies back to watchdog to prevent it from rebooting... But seems like I can't get this to work...

#!/bin/sh
#
# chkconfig: 12345 01 99
# description: N900 watchdog kicker
#

# Source function library.
. /etc/rc.d/init.d/functions

[ -x /usr/sbin/wd_keepalive ] || exit 0

RETVAL=0
prog=wd_keepalive
pidfile=/var/run/wd_keepalive.pid
lockfile=/var/lock/subsys/n900_wd

start() {
echo -n $"Starting $prog: "
/usr/sbin/${prog} -c /etc/watchdog-omap.conf
RETVAL=$?
[ $RETVAL -ne 0 ] && (echo_failure; echo; return $RETVAL)
/usr/sbin/${prog} -c /etc/watchdog-twl4030.conf
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
[ $RETVAL -eq 0 ] && echo_success
[ $RETVAL -ne 0 ] && echo_failure
echo
return $RETVAL
}

stop() {
rm -f $lockfile $pidfile
}

case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|status}"
exit 1
esac
watchdog-device = /dev/twl4030_wdt
interval = 10
realtime = yes
priority = 1
watchdog-device = /dev/watchdog
interval = 10
realtime = yes
priority = 1
I put watchdog-omap.conf and watchdog-twl4030.conf
in /etc/
and the main script to /etc/init.d/

Am I doing it the wrong way?

And the files pointed here doesn't exist..

usr/sbin/wd_keepalive
/etc/rc.d/init.d/functions
(Checked also /etc/init.d/functions but still doesn't exist)
 

The Following User Says Thank You to Radicalz38 For This Useful Post:
Posts: 256 | Thanked: 92 times | Joined on Oct 2010
#413
very short description: what is the problem?

but: doesn't look like the ubuntu startscript, the script feels like one from fedora(?) therefore: does the script get called?

if not:
quick and dirty: put link in rcNN.d like chkconfig header suggests

----
but what's wrong with:
apt-get install watchdog
 
Posts: 1,042 | Thanked: 430 times | Joined on May 2010
#414
That is the problem... It isn't initiated on bootup
So I guess i'm on the wrong directory then... I've put mine on /etc/init.d/wd_n900. I thought it would still get initiated there.
 
Posts: 256 | Thanked: 92 times | Joined on Oct 2010
#415
first off i do not understand why you don't just use the ubuntu script that comes with the wtchdog. but not my business...

putting something in /etc/init.d does not cause it to be called. you need the links in the runlevels. (alternatively convert the script to a upstart script)
so you have to link it in. eg:
Code:
cp -s /etc/init.d/yourscript /etc/rc1.d/S01yourscript
to call it in runlevel 1 you might want to have it called in (all)other runlevels and/or have the priority behind the S adjusted.
and if that doesn't work something with your booting is wrong and the /etc/event.d/rcX (rsp. /etc/init.d/rc ) doesn't get called.

EDIT:
spot in your script the line:
# chkconfig: 12345 01 99
that's to be done.
EDIT:
for ubuntu it says it needs this links:
---
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
---

Originally Posted by Radicalz38 View Post
That is the problem... It isn't initiated on bootup
So I guess i'm on the wrong directory then... I've put mine on /etc/init.d/wd_n900. I thought it would still get initiated there.

Last edited by lunat; 2010-12-07 at 19:02.
 

The Following User Says Thank You to lunat For This Useful Post:
Posts: 1,042 | Thanked: 430 times | Joined on May 2010
#416
Originally Posted by lunat View Post
first off i do not understand why you don't just use the ubuntu script that comes with the wtchdog. but not my business...

putting something in /etc/init.d does not cause it to be called. you need the links in the runlevels. (alternatively convert the script to a upstart script)
so you have to link it in. eg:
Code:
cp -s /etc/init.d/yourscript /etc/rc1.d/S01yourscript
to call it in runlevel 1 you might want to have it called in (all)other runlevels and/or have the priority behind the S adjusted.
and if that doesn't work something with your booting is wrong and the /etc/event.d/rcX (rsp. /etc/init.d/rc ) doesn't get called.
Well in the first place i'm not a linux guru so I really am not that familiar with the filesystem. I just read it here that there's a script which could communicate with watchdog so it won't reboot itself. And that got my interest and look at it and tested it
Also I didn't know there is already a script for watchdog that comes with maemo...
 
Posts: 256 | Thanked: 92 times | Joined on Oct 2010
#417
sorry if i sounded arrogant. it was not ment that way. by no means,
just try to help.

please don't be mad at me for saying that i do not understand why you needed to manually install a script. i said i do not understand why you don't use the ubuntu script for it comes with the watchdog daemon. so if you have the watchdog daemon you normally should have the ubuntu script right in place without doing anything. so i was simply wondering why you seemingly replaced it with some other script. so no offence at all!

your script looks like fedora init scripts. that does not mean it is fedora but that's the biggest distribution that has scripts like this.

skimming over it, it looks like it does nothing essentially different than the ubuntu script. so it most likely should work.

the only reason i can see for it not even being called is that it simply is not linked into the runlevels. see below how to do that. that linking is usually done automatically. only for you manually installed the script you have to explicitly tell the system to use it and when. that's done by creating the links. again see below how to do that and maybe look at other initscripts for examples.

Code:
cp -s SOME.SCRIPT.WHEREEVER.IT.IS /etc/rcX.d/S01FANCYNAME
in rcX replace the X with a number. S is used for a daemon that is started and K one that is stopped. the two digits behind that are the order in which the scripts are started in a runlevel.

and if you have them in place, it either should work or you should see some error on the terminal and/or in the logs. i

/etc/watchdog.conf needs adjustment. thats where you define what the daemon should do.


Originally Posted by Radicalz38 View Post
Well in the first place i'm not a linux guru so I really am not that familiar with the filesystem. I just read it here that there's a script which could communicate with watchdog so it won't reboot itself. And that got my interest and look at it and tested it
Also I didn't know there is already a script for watchdog that comes with maemo...
 

The Following User Says Thank You to lunat For This Useful Post:
Posts: 1,042 | Thanked: 430 times | Joined on May 2010
#418
Actually I wasn't mad or anything you just misinterpretted it

Yes I understood already the problem and your explanation, actually I already got it working now

I just explained why I used another watchdog script. So the simple answer is that I didn't know there is one already. Someone just referred me to that script when I asked so that's the one I used.

And ok might wanna try that default script now... So all I have to do is edit the watchdog.conf and all should be fine? Would that mean I wouldn't need the watchdog-omap.conf & watchdog-twl4030.conf to go around watchdog? Again thanks for the time!

Oh btw you can explain simplier... I know linux... It's just I don't bother to dwell deeper on it until now of course
 
Posts: 256 | Thanked: 92 times | Joined on Oct 2010
#419
yes! there you are right. you need the configurations. and you need as many watchdogs running as you have wd-devices.
so for that you might want to go with your script.


Originally Posted by Radicalz38 View Post
Actually I wasn't mad or anything you just misinterpretted it

Yes I understood already the problem and your explanation, actually I already got it working now

I just explained why I used another watchdog script. So the simple answer is that I didn't know there is one already. Someone just referred me to that script when I asked so that's the one I used.

And ok might wanna try that default script now... So all I have to do is edit the watchdog.conf and all should be fine? Would that mean I wouldn't need the watchdog-omap.conf & watchdog-twl4030.conf to go around watchdog? Again thanks for the time!

Oh btw you can explain simplier... I know linux... It's just I don't bother to dwell deeper on it until now of course
 
Posts: 1,042 | Thanked: 430 times | Joined on May 2010
#420
I'm just doing this for learning so I will try everything I can lol!

but first I need to fix this inverted keyboard... The module provided by mohammad can't be insmod it shows up an error... So gonna work on this first before anything else. Again thanks for the help!
 
Reply

Tags
bada rox


 
Forum Jump


All times are GMT. The time now is 06:41.