Kurobox NAS-Central Forums

Welcome to the Kuro Community
It is currently Mon Jun 25, 2018 12:05 am

All times are UTC-06:00




Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 79 posts ]  Go to page 1 2 3 4 5 6 Next
Author Message
PostPosted: Thu Aug 23, 2007 11:33 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
Now that it appears that U-Boot is happily working on my HG, it would be nice to figure out how to get the front and back button to work again. I'm assuming that the instructions found here is what needs to be done. Before I did the

Code:
make install


step, I thought I'd take a peek at the make file. The comments states:

Quote:
#
# Add -DUBOOT to the build process if you are using U-Boot as this will
# remove the redundant EM-Mode NGNGNG poke into flash
#


This may be obvious to most but I just want to make sure I'm doing it correctly. With that comment, would I make the file like this?

Code:
make install -DUBOOT


Thanks!


Top
   
 Post subject:
PostPosted: Fri Aug 24, 2007 8:22 am 
Offline

Joined: Thu Jul 20, 2006 2:46 am
Posts: 82
IVe just had a look

I think you need to edit the Makefile
Code:
BUILD=$(shell ls /etc) -DUBOOT

and
Code:
if [ -e /usr/bin/strip ]; then strip --strip-unneeded $(LOCATION)/avr_evtd ; fi



it'll hang on the 'make install', dont worry, just CTRL+C out of it

if it doesnt then dont do this next edit
now edit the /etc/init.d/avr_evtd - comment out these lines
Code:
    # PORT_ADDRESS=`$DAEMON -i -d /dev/ttyS1`
    # if [ $PORT_ADDRESS -eq 80004500 ] ; then DEVICE=/dev/ttyS1 ; fi



Now get the default values
Code:
cd /etc/default/
cp avr_evtd.sample avr_evtd


edit the avr_evtd file

change TIMER=ON to TIMER=OFF
This stops the power led pulsing

and ROOT=hda1 to ROOT=sda1
and WORK=hda3 to WORK=sda3
this stops the hdd light flashing


Now we need to get it into the bootup routine
Code:
update-rc.d avr_evtd start 12 2 . stop 95 0 6 .


reboot, and hopefully it'll work

_________________
monkeyboy


Last edited by monkeyboy on Fri Aug 24, 2007 10:14 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Fri Sep 14, 2007 9:14 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
I gave this a shot and this does not seem to be working for me. I've tried it a couple times and the buttons still don't work. Not only that, but now my Kurobox reboots every 5 mins which it never did before.

The only thing that was out of the ordinary was that when I did the "make install", mine never froze up as stated it may. Therefore, I didn't edit my "/etc/init.d/avr_evtd" as prescribed not to if it doesn't freeze up. Should I still edit this even though it didn't freeze up?

The other difference was I didn't have to cp avr_evtd.sample to /etc/default/avr_evtd since that file was already there. And when I diff the two files, they were identical.

The only other observation I have is when I vi the Make file, I notice that there is a "^M" at the end of each line. That struck me as odd but perhaps is nothing.

Please advise

Thanks!


Top
   
 Post subject:
PostPosted: Fri Sep 14, 2007 11:36 am 
Offline

Joined: Thu Jul 20, 2006 2:46 am
Posts: 82
hmmm

the rebooting after 5 mins is the watchdog not being talked to.

After its started look at the list of the processes running
# ps -Af
will do the job

looking for something like
/usr/local/sbin/avr_evtd -d /dev/ttyS0


basicly it sounds like it needs to be using the oposite one

ie mine is using ttyS0 if that was the same as your then i would recommend using the ttyS1 instead

>> gotta go ,the bacon is burning

_________________
monkeyboy


Top
   
 Post subject:
PostPosted: Mon Sep 17, 2007 8:37 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
Looks like mine is using ttys0. So if one were to change it to ttys1, where does one change this?

Sorry if this is obvious to everyone. :(

Thanks!


Last edited by phlegmer on Mon Sep 17, 2007 3:45 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Mon Sep 17, 2007 3:10 pm 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
phlegmer wrote:
Looks like mine is using ttys0. So if one were to change it to ttys1, where does one change this?

Sorry if this obvious to everyone. :(

Thanks!

It's in "/etc/default/avr_evtd" (on my Ubuntu installation at least)

I see the following line:
Code:
#DEVICE=/dev/ttyS1

Uncomment that, and restart avr_evtd.

Matthew


Top
   
 Post subject:
PostPosted: Tue Sep 18, 2007 7:36 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
Nice, that did the trick Lardmonster. Nice to see the uptime now goes beyond 5min. :D Wonder why my setup is using TTYS1 where monkeyboy's is using TTYS0?

Anyway, it would appear that the buttons still do not work. I guess I didn't try the back button this time but I held the power button for >30sec and it stays on.

When I look at the \etc\default\avr_evtd file, it is set for 3 sec:

Code:
# Hold time (seconds) for button power-off, default 3
HOLD=3



Please advise.

Thanks!


Top
   
 Post subject:
PostPosted: Tue Sep 18, 2007 10:16 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
Re: buttons

Are you watching "/var/log/avr_evtd.log" with "tail -f"?

Initially, I could see events in the log, but nothing in the "/etc/avr_evtd/EventScript" file was being executed.

Turned out I had /bin/sh symlinked to /bin/dash, which doesn't support some funky scripting stuff. So had to change "#!/bin/sh" to "#!/bin/bash" at the top of EventScript.

Also, to help me while hacking EventScript, I used this:

Code:
  3)  echo -n "[avr_evtd]: Power Button Up"
      echo -n "VVVV" > $DEVICE
      ;;
  4)  echo -n "[avr_evtd]: Power Button Down"
      echo -n "WWWW" > $DEVICE
      ;;

Which would turn on a LED when the power button was pressed momentarily.

Mine's definitely using /dev/ttyS0. Weird... :-/

Matthew


Top
   
 Post subject:
PostPosted: Tue Sep 18, 2007 10:43 am 
Offline

Joined: Tue Mar 21, 2006 2:31 pm
Posts: 79
which kernels do you run guys?

it depends on the kernel.

_________________
http://www.linkstationwiki.net -> http://nas-central.org
http://foonas.org
foonas realtime changelog: http://foonas.org/browser/wsvn/foonas/?op=log
kernel 2.6 webinstaller: http://hvkls.dyndns.org/news/


Top
   
 Post subject:
PostPosted: Tue Sep 18, 2007 3:56 pm 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
mindbender wrote:
which kernels do you run guys?

it depends on the kernel.

I'm on 2.6.22. The relevant parts of 'dmesg' would be:
Code:
Using Buffalo Linkstation machine description
Linux version 2.6.22 (matthew@blanco) (gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)) #3 Fri Sep 7 01:59:56 BST 2007
Found legacy serial port 0 for /soc10x/serial@80004500
  mem=80004500, taddr=80004500, irq=0, clk=130041000, speed=9600
Found legacy serial port 1 for /soc10x/serial@80004600
  mem=80004600, taddr=80004600, irq=0, clk=130041000, speed=57600
Entering add_active_range(0, 0, 32768) 0 entries of 256 used
...
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x80004500 (irq = 16) is a 16550A
serial8250.0: ttyS1 at MMIO 0x80004600 (irq = 17) is a 16550A
...
linkstation: disarming the AVR watchdog:


This is a Kurobox HG/WR with U-Boot "1.2.0-g6af43833-dirty (Sep 1 2007 - 10:06:55) LinkStation HG / KuroBox HG". I'm running Ubuntu 7.04 (Feisty).

Matthew


Top
   
 Post subject:
PostPosted: Wed Sep 19, 2007 6:29 am 
Offline

Joined: Thu Jul 20, 2006 2:46 am
Posts: 82
Ive got a 2.6.22.6 kernel with debian running

cant get any output cus at work theyve blocked all outgoing except web , dang

if you want i could put up some more details when i get home?

_________________
monkeyboy


Top
   
 Post subject:
PostPosted: Wed Sep 19, 2007 6:55 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
monkeyboy wrote:
cant get any output cus at work theyve blocked all outgoing except web , dang

I've found that a package called "http-tunnel" works extremely well :)

I run "hts" on the Kuro, and "htc" on my work machine. Then connect PuTTY to "127.0.0.1". Sneaky ;)


Top
   
 Post subject:
PostPosted: Wed Sep 19, 2007 9:35 am 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
Lardmonster wrote:

Are you watching "/var/log/avr_evtd.log" with "tail -f"?


Ummm, I don't believe so. I don't have an avr_evtd.log file. How does one enable avr_evtd logging?

Lardmonster wrote:
Initially, I could see events in the log, but nothing in the "/etc/avr_evtd/EventScript" file was being executed.

Turned out I had /bin/sh symlinked to /bin/dash, which doesn't support some funky scripting stuff. So had to change "#!/bin/sh" to "#!/bin/bash" at the top of EventScript.


I gave this a shot just now....no change.

Lardmonster wrote:
Also, to help me while hacking EventScript, I used this:

Code:
  3)  echo -n "[avr_evtd]: Power Button Up"
      echo -n "VVVV" > $DEVICE
      ;;
  4)  echo -n "[avr_evtd]: Power Button Down"
      echo -n "WWWW" > $DEVICE
      ;;

Which would turn on a LED when the power button was pressed momentarily.


Tried this as well with "#!/bin/sh" and ""#!/bin/bash". Nothing. the LED didn't do anything as suggested either. So does that mean that "Eventscript" isn't even being run?

mindbender wrote:
which kernels do you run guys?


Here's my relevant dmesg:

Code:
Using Buffalo Linkstation machine description
Linux version 2.6.22.2 (kuroadmin@KUROBOX) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 Thu Aug 16 13:59:11 CDT 2007
Found legacy serial port 0 for /soc10x/serial@80004500
  mem=80004500, taddr=80004500, irq=0, clk=130041000, speed=9600
Found legacy serial port 1 for /soc10x/serial@80004600
  mem=80004600, taddr=80004600, irq=0, clk=130041000, speed=57600
Entering add_active_range(0, 0, 32768) 0 entries of 256 used
...
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x80004500 (irq = 16) is a 16550A
serial8250.0: ttyS1 at MMIO 0x80004600 (irq = 17) is a 16550A
...
linkstation: disarming the AVR watchdog:
...


Thanks for any help that can be offered!


Top
   
 Post subject:
PostPosted: Wed Sep 19, 2007 10:38 am 
Offline

Joined: Fri Oct 29, 2004 6:00 am
Posts: 91
Location: UK
phlegmer wrote:
Lardmonster wrote:
Are you watching "/var/log/avr_evtd.log" with "tail -f"?

Ummm, I don't believe so. I don't have an avr_evtd.log file. How does one enable avr_evtd logging?

Erm, I dunno. The logfile appeared when I started "avr_evtd". Maybe you check it's running with
Code:
ps ax | grep avr_evtd

And if it is, check the logfile settings in "/etc/default/avr_evtd" config file. At the top of mine, I have:
Code:
LOG=/var/log


phlegmer wrote:
Lardmonster wrote:
Initially, I could see events in the log, but nothing in the "/etc/avr_evtd/EventScript" file was being executed.

Turned out I had /bin/sh symlinked to /bin/dash, which doesn't support some funky scripting stuff. So had to change "#!/bin/sh" to "#!/bin/bash" at the top of EventScript.

I gave this a shot just now....no change.

Lardmonster wrote:
Also, to help me while hacking EventScript, I used this:

Code:
  3)  echo -n "[avr_evtd]: Power Button Up"
      echo -n "VVVV" > $DEVICE
      ;;
  4)  echo -n "[avr_evtd]: Power Button Down"
      echo -n "WWWW" > $DEVICE
      ;;

Which would turn on a LED when the power button was pressed momentarily.

Tried this as well with "#!/bin/sh" and ""#!/bin/bash". Nothing. the LED didn't do anything as suggested either. So does that mean that "Eventscript" isn't even being run?

Possibly... I found that the slightest syntactical error in the script caused none of it to work. You might want to temporarily replace the EventScript with:
Code:
#!/bin/sh
echo "hello" > /tmp/eventscriptcalled.txt

or something similarly simple.

'Tis off that you're having such problems... We'll get there!

Matthew


Top
   
 Post subject:
PostPosted: Wed Sep 19, 2007 2:52 pm 
Offline

Joined: Mon Mar 27, 2006 9:09 pm
Posts: 110
Lardmonster wrote:
Erm, I dunno. The logfile appeared when I started "avr_evtd". Maybe you check it's running with
Code:
ps ax | grep avr_evtd



Looks like it's running from what I see:

Code:
# ps ax | grep avr_evtd
 1174 ?        Ss     0:00 /usr/local/sbin/avr_evtd -d /dev/ttyS1


Lardmonster wrote:
And if it is, check the logfile settings in "/etc/default/avr_evtd" config file.


Yup, looks good there as well.

Code:
# Debug log file location
LOG=/var/log
# Advanced use only.  Will log events when enabled
DEBUG=ON


Lardmonster wrote:
Possibly... I found that the slightest syntactical error in the script caused none of it to work. You might want to temporarily replace the EventScript with:
Code:
#!/bin/sh
echo "hello" > /tmp/eventscriptcalled.txt

or something similarly simple.


That's a good idea! I tried first with #!/bin/sh and then with #!/bin/bash. In both cases, the txt file was never created in /tmp. Very odd. It's like it's not touching Eventscript nor the avr_evtd config file at all. :?


Top
   
Display posts from previous:  Sort by  
Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 79 posts ]  Go to page 1 2 3 4 5 6 Next

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited