[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mtdblk, apm, and wondering if you received my email?



Hello,

On Sat, Nov 06, 2004 at 12:02:24PM -0600, Kevin Currie wrote:
> Hi Klaus (and debian-handheld!), I'd sent you an email on Oct 21st but
> didn't receive a reply so I'm wondering if it actually made it out. 

Sorry about not responding, I've been ignoring the pocketworkstation
project due to being swamped with work, and haven't even gotten to
looking into the mail folder in a long time.

> Regarding APM and screen brightness controls, I'd like to hack fbvnc to
> replace the volume control with a brightness control, however I don't
> know how to control the brightness without using zapmd, which seems to
> cause problems with Opie.  Using either cru or just "ssh localhost cmd"
> (with a properly configured authorized_keys file) I could send cmds to
> apm, but don't know what they should be and googling so far hasn't
> turned up anything promising.  ..worst case, I supposed I can just grab
> the source for the opie brightness control and look there, but I would
> think a simple interface via /proc would be available...

There is a hackish /proc interface for the Sharp systems, see attachment.

> Some other things I thought I'd mention that make Debian on the Z much
> more enjoyable and give you MUCH greater flexibility is using either a
> complete remote root disk and/or remote swap space.   This allows you
> to have as much swap as you need for building large programs, or for
> running more apps concurrently.  The biggest win is remote root
> though-- you can have yourself a 3GB remote NFS mounted root
> filesystem, and use that as for example as a complete development, or
> for testing apps on your Z without actually touching your local
> filesystems, or even to run PocketWorkstation on a Z WITHOUT an SD card
> with additional space.

Remote root is what I'd been using as a development system, I have an old
iPAQ handheld with a broken battery that I'd been using as a networked
compile server.

> I'd been planning on putting up a web page on how to do it, and when I
> do it'll be at the above site, but in short you just mount a remote
> filesystem via NFS/SMB, create either a swapfile or filesystem in a
> file, then just do: losetup /dev/loop0 /mnt/z/SWAPFILE swapon
> /dev/loop0 ..for remote swap, and similar for remote root.

Since I don't have time to work on the project in the near future, the
best option may be a wiki (such as the existing one at
http://handhelds.org) to collect information?

-Klaus
#!/bin/sh

if [ -f /proc/driver/fl/tosa-bl ]; then
	# Sharp SL-6000
	LEVFILE=/tmp/llevel.dat
	LEVEL=191
	[ -f $LEVFILE ] && LEVEL=`cat $LEVFILE`

	case $LEVEL in
	0) LEVEL=255 ;;
	255) LEVEL=191 ;;
	191) LEVEL=127 ;;
	127) LEVEL=63 ;;
	63) LEVEL=0 ;;
	esac

	echo $LEVEL > /proc/driver/fl/tosa-bl
	echo $LEVEL > $LEVFILE
elif [ -f /proc/driver/fl/corgi-bl ]; then
	# Sharp SL-C7x0
	LEVFILE=/tmp/llevel.dat
	LEVEL=0x0105
	[ -f $LEVFILE ] && LEVEL=`cat $LEVFILE`

	case $LEVEL in
	0x0000) LEVEL=0xFFFF ;;
	0xFFFF) LEVEL=0x0105 ;;
	0x0105) LEVEL=0x000B ;;
	0x000B) LEVEL=0x0005 ;;
	0x0005) LEVEL=0x0001 ;;
	0x0001) LEVEL=0x0000 ;;
	esac

	echo $LEVEL > /proc/driver/fl/corgi-bl
	echo $LEVEL > $LEVFILE
elif [ -e /dev/zapmd ]; then
	# Sharp SL-5x00
	echo light > /dev/zapmd &
	exit 0
else
	echo "Don't know how to set the light on this hardware" >&2
	exit 1
fi


Reply to: