maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Ubuntu (https://talk.maemo.org/forumdisplay.php?f=55)
-   -   [WIP] Ubuntu 9.10 on the N900 (https://talk.maemo.org/showthread.php?t=58083)

Radicalz38 2010-12-01 03:21

Re: [WIP] Ubuntu 9.10 on the N900
 
Yey managed to boot it without r&d thanks for the tip lunat :p

Radicalz38 2010-12-07 17:18

Re: [WIP] Ubuntu 9.10 on the N900
 
Quote:

Originally Posted by artron (Post 886590)
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...

Quote:

#!/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
Quote:

watchdog-device = /dev/twl4030_wdt
interval = 10
realtime = yes
priority = 1
Quote:

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..

Quote:

usr/sbin/wd_keepalive
Quote:

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

lunat 2010-12-07 18:18

Re: [WIP] Ubuntu 9.10 on the N900
 
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

Radicalz38 2010-12-07 18:38

Re: [WIP] Ubuntu 9.10 on the N900
 
That is the problem... It isn't initiated on bootup :p
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.

lunat 2010-12-07 18:54

Re: [WIP] Ubuntu 9.10 on the N900
 
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
---

Quote:

Originally Posted by Radicalz38 (Post 891664)
That is the problem... It isn't initiated on bootup :p
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.


Radicalz38 2010-12-07 19:03

Re: [WIP] Ubuntu 9.10 on the N900
 
Quote:

Originally Posted by lunat (Post 891679)
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 :p
Also I didn't know there is already a script for watchdog that comes with maemo... :D

lunat 2010-12-07 19:56

Re: [WIP] Ubuntu 9.10 on the N900
 
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.


Quote:

Originally Posted by Radicalz38 (Post 891688)
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 :p
Also I didn't know there is already a script for watchdog that comes with maemo... :D


Radicalz38 2010-12-07 20:09

Re: [WIP] Ubuntu 9.10 on the N900
 
:D Actually I wasn't mad or anything you just misinterpretted it :p

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. :D

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 :)

lunat 2010-12-07 20:39

Re: [WIP] Ubuntu 9.10 on the N900
 
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.


Quote:

Originally Posted by Radicalz38 (Post 891753)
:D Actually I wasn't mad or anything you just misinterpretted it :p

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. :D

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 :)


Radicalz38 2010-12-07 20:45

Re: [WIP] Ubuntu 9.10 on the N900
 
I'm just doing this for learning :p 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!


All times are GMT. The time now is 17:00.

vBulletin® Version 3.8.8