• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1] 2 3
1  General Category / Success stories / Re: X11 on the plug on: July 16, 2009, 12:39:27 PM
1.) the keyboard layout does not map correctly from my vnc client to the vnc server.  When I type 'asdf', I get 'abfh'  I've tried to find a solution via Google... no luck yet.  Hopefully someone has seen and resolved this before?

I had that issue too... weird thing, but an easy fix. See this web page:

http://blog.yclian.com/2007/12/3-solutions-to-gnomevnc-keyboard.html

Bottom line, this is the easiest solution--just execute this from the command line:

# gconftool --set /desktop/gnome/peripherals/keyboard/kbd/layouts --type List --list-type String [aa]

Joe
2  Hardware and U-Boot firmware / Hardware / Re: Watchdog timer on: July 02, 2009, 03:52:04 AM
I would concur that a kernel solution is ultimately the only way to go, but if anyone needs a user-level implementation in the interim, here is a link to the source I threw together for my Plug. 

Works fine for me too & it has the simplicity of just dropping it in without a kernel upgrade. After all, the kernel method requires a user-level service routine anyway.

Joe
3  Hardware and U-Boot firmware / Hardware / Re: Watchdog timer on: July 01, 2009, 06:03:21 PM
I slammed together support for a real watchdog driver named kirkwood_wdt in my 2.6.30 distribution.  A patch is in /2.6.30/patches

http://plugcomputer.org/plugforum/index.php?topic=449.0


Good slamming... I checked it out and it works fine.

Joe
4  Hardware and U-Boot firmware / Hardware / Re: SATA controller on: July 01, 2009, 04:07:04 AM
can you create an other topic for the WD and only post on this one informations about sata controller ?

OK, refer watchdog timer posts to this topic:

http://plugcomputer.org/plugforum/index.php?topic=466.0

Joe
5  Hardware and U-Boot firmware / Hardware / Watchdog timer on: July 01, 2009, 04:05:52 AM
Someone was telling me the Plug has a built-in hardware watchdog timer, but I've found no evidence of it.  Does anyone else know anything about this?

I did some poking around (ha ha) and found that there is indeed a watchdog timer on the processor chip, accessible via memory-mapped I/O.

According to the processor user manual, the following three registers are needed to implement a watchdog reset:

1) CPUWDTimer, offset 0x20324 [table 109, p. 258], which decrements every processor clock, max value 0xffffffff (32 bits), which is about 20 seconds
2) Timers Control register, offset 0x20300 [table 103, p. 256], where bit 4 (CPUWDTimerEn) controls whether the wd timer stops counting when it reaches 0
3) RSTOUTn Mask Register, offset 0x20108 [table 95, p. 252], where bit 1 (WDRstOutEn) enables a reset to occur when the wd timer decrements to zero

the user manual is here: http://www.embeddedarm.com/documentation/third-party/MV88F5182-usermanual.pdf

Someone (tmk) in this forum posted a utility (c code) to read and write memory locations from user space:

http://openplug.org/plugforum/index.php?topic=104

I compiled that utility--here's the source and executable: http://plugnacious.org/sheevaplug/devmem2

It works great to test out the wd timer. First off, the offsets above have to be applied to a base address, which tmk found to be 0xf1000000 at least in his case, & I found it's the case on my plug too. To cut to the chase:

This command shows the wd timer value:

# ./devmem2 0xf1020324 w
/dev/mem opened.
Memory mapped at address 0x40020000.
Value at address 0xF1020324 (0x40020324): 0x7FFFFFFF

So that defaults to 0x7fffffff and it's not counting down. Setting the timer enable bit will start the countdown:

# ./devmem2 0xf1020300 w 0x17

That sets the timer wd enable bit 0x10 (along with 0x7 set by default)

Now executing "./devmem2 0xf1020324 w" will show the timer counting down until it hits zero and stops (about 10 seconds). Luckily the wd reset isn't enabled yet. Starting from 0xffffffff affords about 20 seconds before the timer expires:

# ./devmem2 0xf1020324 w 0xffffffff

To cause a reset on timer expiration:

# ./devmem2 0xf1020108 w 0x2

Believe me, it will reset the sheevaplug when the timer expires, or immediately if the timer is already zero!

So anyway, a quick-and-dirty watchdog timer could be made from this code, say, resetting the timer every 5 seconds.

Code:
#!/bin/ksh
./devmem2 0xf1020324 w 0xffffffff > /dev/null 2>&1
./devmem2 0xf1020300 w 0x17 > /dev/null 2>&1
./devmem2 0xf1020108 w 0x2 > /dev/null 2>&1

while :
do
        ./devmem2 0xf1020324 w 0xffffffff > /dev/null 2>&1
        sleep 5
done

Obviously one could get a bit fancier and more robust than that!

Joe


6  Hardware and U-Boot firmware / Hardware / Re: SATA controller on: June 30, 2009, 05:16:49 PM
Someone was telling me the Plug has a built-in hardware watchdog timer, but I've found no evidence of it.  Does anyone else know anything about this?

I did some poking around (ha ha) and found that there is indeed a watchdog timer on the processor chip, accessible via memory-mapped I/O.

According to the processor user manual, the following three registers are needed to implement a watchdog reset:

1) CPUWDTimer, offset 0x20324 [table 109, p. 258], which decrements every processor clock, max value 0xffffffff (32 bits), which is about 20 seconds
2) Timers Control register, offset 0x20300 [table 103, p. 256], where bit 4 (CPUWDTimerEn) controls whether the wd timer stops counting when it reaches 0
3) RSTOUTn Mask Register, offset 0x20108 [table 95, p. 252], where bit 1 (WDRstOutEn) enables a reset to occur when the wd timer decrements to zero

the user manual is here: http://www.embeddedarm.com/documentation/third-party/MV88F5182-usermanual.pdf

Someone (tmk) in this forum posted a utility (c code) to read and write memory locations from user space:

http://openplug.org/plugforum/index.php?topic=104

I compiled that utility--here's the source and executable: http://plugnacious.org/sheevaplug/devmem2

It works great to test out the wd timer. First off, the offsets above have to be applied to a base address, which tmk found to be 0xf1000000 at least in his case, & I found it's the case on my plug too. To cut to the chase:

This command shows the wd timer value:

# ./devmem2 0xf1020324 w
/dev/mem opened.
Memory mapped at address 0x40020000.
Value at address 0xF1020324 (0x40020324): 0x7FFFFFFF

So that defaults to 0x7fffffff and it's not counting down. Setting the timer enable bit will start the countdown:

# ./devmem2 0xf1020300 w 0x17

That sets the timer wd enable bit 0x10 (along with 0x7 set by default)

Now executing "./devmem2 0xf1020324 w" will show the timer counting down until it hits zero and stops (about 10 seconds). Luckily the wd reset isn't enabled yet. Starting from 0xffffffff affords about 20 seconds before the timer expires:

# ./devmem2 0xf1020324 w 0xffffffff

To cause a reset on timer expiration:

# ./devmem2 0xf1020108 w 0x2

Believe me, it will reset the sheevaplug when the timer expires, or immediately if the timer is already zero!

So anyway, a quick-and-dirty watchdog timer could be made from this code, say, resetting the timer every 5 seconds.

Code:
#!/bin/ksh
./devmem2 0xf1020324 w 0xffffffff > /dev/null 2>&1
./devmem2 0xf1020300 w 0x17 > /dev/null 2>&1
./devmem2 0xf1020108 w 0x2 > /dev/null 2>&1

while :
do
        ./devmem2 0xf1020324 w 0xffffffff > /dev/null 2>&1
        sleep 5
done

Obviously one could get a bit fancier and more robust than that!

Joe



7  Hardware and U-Boot firmware / Hardware / Re: Alternative power supplies on: June 17, 2009, 10:16:20 AM
I'm very curious about what 5V regulator you're using that can handle the current draw of the Sheeva and the USB dongles you've got on it.

I got a relatively cheap one on eBay from a guy in Hong Kong:

Step Down DC /DC Converter Charger Regulator Controller:
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&ssPageName=STRK:MEWNX:IT&item=230338695225

It converts 12VDC to 5V with 93% efficiency and max current of 3 amps! It was only $4 but the $10 shipping is the kicker. I think they were pulled off some other assembly line. There's even a little trimpot to adjust the voltage.

It made me think--what about those car cigarette lighter adapters that provide USB power? Maybe just cannibalize one of those.

Joe
8  General Category / General Discussion / Re: Plug Pictures on: May 21, 2009, 05:54:35 PM
9  Linux Stuff / Kernel / Re: original sheeva kernel needs some work on: May 21, 2009, 04:26:14 AM
BTW, what smb share is set up by default? Just checked my conf file & it only has the shares I set up, although maybe I'm not recalling having deleted one earlier.

One thing I found setting up iptables on the plug--it's best to just have a serial connection permanently set up on the mini-usb as a console of last resort, as it's very easy to lock out ssh when fiddling around.

Joe
10  General Category / General Discussion / Re: Any Ideas? on: May 20, 2009, 07:00:45 PM
Just a long shot, but did you notice any weird keyboard mappings when logged in over vnc? I installed tightvnc and gnome and the keyboard mapping was all wrong (e.g., typing asdf resulted in abfh). The solution was at http://blog.yclian.com/2007/12/3-solutions-to-gnomevnc-keyboard.html

# gconftool --set /desktop/gnome/peripherals/keyboard/kbd/layouts --type List --list-type String [aa]

So I wonder if your password isn't what you think it is. I guess that's a long shot though because I don't think you would have been able to type the 'passwd' command in the first place with the keyboard scrambled (or enter the current password correctly if the menus were used).

I don't think the fat.ko thing is a real problem (I commented that out of /etc/rc.local because it was failing anyway).

Joe
11  General Category / General Discussion / Re: FTDI device on the Sheeva on: May 20, 2009, 06:37:57 PM
I've tested sending and receiving data to an Arduino & it works--in my case I used the 2.6.30-rc5 kernel with the usbserial and ftdi_sio modules. The Arduino doesn't have much of a current draw & is powered through the USB without issue.  I suppose if a lot of the I/O pins were used to produce the maximum current (40ma each) there might be a problem.

It's interesting to think of what this does exactly for the plug's capabilities/applications. At the least, it adds six channels of A/D sensing along with 14 or however many digital I/O bits to control and/or sense things.

Joe
12  General Category / General Discussion / Re: cpuidle for a greener plug on: May 20, 2009, 03:41:21 AM
I used the Marvell git branch for 2.6.30-rc3 & don't recall having to do anything special. I.e., after installing the git package:

# git clone git://git.marvell.com/orion.git

That gets the latest from Marvell.

I installed the cross-compiling tools from codesourcery:

http://www.codesourcery.com/sgpp (Sourcery g++)

Then it's the usual:

# make ARCH=arm mrproper
# make ARCH=arm kirkwood_defconfig
# make ARCH=arm menuconfig
# make -j1 ARCH=arm CROSS_COMPILE=/usr/local/bin/codesourcery/bin/arm-none-linux-gnueabi- uImage

When the kernel is booting you should see these messages on the console:

cpuidle: using governor ladder
cpuidle: using governor menu

Just in case I'm forgetting some config option that has to be made, for reference I attached a copy of the .config file I built with.

Joe

P.S. The powertop FAQ lists some recommended kernel config settings: http://www.lesswatts.org/projects/powertop/faq.php






13  General Category / Success stories / Re: USB Webcam as a surveillance camera on: May 18, 2009, 02:26:04 AM
I tried using a Logitech USB webcam with the 'cheese' app. Taking still shots kinda worked, but the cpu bottoms out, going to 0% idle, and video is pretty much a no-go with that setup.

Joe


14  General Category / Success stories / Re: Wireless USB dongle on: May 12, 2009, 04:49:03 AM
Good bird-dogging with all the relevant information -- especially like the watt usage report.

In the reviews for this particular device on Amazon, several people complain that it runs hot. Indeed it is rather warm compared to a Belkin USB dongle I have on a Windows media center. So probably there are better options available, power-wise. This one does have the advantage of at least working--I haven't tried the Belkin device.

Joe
15  General Category / General Discussion / Re: cpuidle for a greener plug on: May 12, 2009, 03:45:24 AM
This is coherent with what I measured with a basic killawatt:

I have a killawatt-type device (from La Crosse http://www.amazon.com/Crosse-Technology-3362U-Power-Controller/dp/B0000CDD37) that I noticed doesn't do a good job with rapidly-varying power changes such as with cpuidle. I think it was tending to read peak power over the scale of tens of milliseconds & so was always displaying the maximum power as the cpu wakes up pretty frequently with the orion_tick. Also, its resolution is 1-watt steps.  Looks like the killawatt might do a better job.

Joe
Pages: [1] 2 3