Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - derekp

Pages: [1]
General Discussion / Maemo On Zaurus?
« on: October 24, 2007, 12:32:49 pm »
Has anyone managed to get Maemo (the UI running on Nokia N-series) going on the Zaurus yet?  Maybe by using pdaxrom and pulling in the stuff that runs under X from maemo?  I was thinking of getting the Nokia N800 or 810, but I figured a good way to test-drive it would be by running the OS on my Zaurus.

Linux Applications / Got A New Language For You...
« on: January 12, 2007, 08:54:44 pm »
Well, it's been a while since I've posted here, but thought I'd share one of my latest creations with you.  I've been working on a light-weight language, called 2e, that could be a good fit on the Zaurus (since it is rather small and light weight).  So far, I've got it fairly functional as a general-purpose programming / scripting language, but the built in funciton library only has text based i/o functions at the moment.  It is set up to support dynamic loadable modules, and I have plans on throwing some gui libraries together (most likely just hooks into qt and/or gtk), once I get a bit more gui programming under my belt.

Anyways, it is at if you want to check out what I've got done so far.  If anyone is interested in assiting with gui librarys for it, any input is welcome.  But I need to document the loadable module interface a bit more.

C1000/3x00 General discussions / Usb Keyboard Mapping
« on: March 29, 2006, 05:36:29 pm »
Just recently upgrade to a c3100, and have been playing around with getting standard usb keyboards working.  Well, I looked through all the posts regarding fixing the key mapping, and the general conclusion seems to be to use keyhelper to remap keys in userspace.
Well, I've put together a slightly better approach.  My goals were the following:
1) Make sure it's not qt-only
2) Allow an external keyboard to be mapped properly, without messing up the internal keyboard mapping
3) Do number 2) without having to switch between maps.
4) Get any dead usb keyboard keys working.

Here's what I found.
The one dead key I was woried about (backslash \ pipe) wasn't mapped in usbkbd.o, so I fixed that in the kernel source, and recompiled the usbkbd.o module.
Second thing, there weren't too many other keys that were mapped wrong on the usb keyboard that conflicted with internal keys (I checked the scan codes for all keys on both keyboards using showkey).  So for those, I fixed the key maps in /opt/QtPalmtop/keycode.tbl.
Now, the main keys that conflicted were the number keys.  So, for example, I couldn't remap shift-2 to be an "@" symbol, otherwise the internal keyboard would have the wrong map.  So for these keys, I ended up hacking away at usbkbd.c in the kernel source again, and ended up assigning the top number keys to the same scancodes used by the right-hand keypad, then edited entries in keycode.tbl to match.
The result is a replacement keycode.tbl and a usbkbd.o kernel module that allows the use of both the internal keyboard, and a usb keyboard without having to swap keymaps around, and no need for keyhelper.  The values that I used in keycode.tbl can be used to build the equivilent files for both X11 and console (for console key mapping, you'd have to use loadkeys I think).  I haven't got that far yet.

Anyhow, when I've been using this setup for a few days, and it seems to be working well.  If anyone is interested, then as soon as I get my other server up (it's got a bad CPU fan), I'll grab the patches for usbkbd.c and keycode.tbl, and post them here, along with an ipk.

edit: To use the attached files, unzip the attachment, then put usbkbd.o in /lib/modules/2.4.20/kernel/drivers/usb/usbkbd.o  and put keycode.tbl in /opt/QtPalmtop/etc/keycode.tbl (of coures, backup the existing ones first).

General Discussion / Using Diald To Save Battery?
« on: January 19, 2006, 07:41:05 pm »
There was something I was thinkin of trying.  Since a wireless card tends to greatly shorten battery runtime, wouldn't it make sense to use something like diald to automatically bring down the wireless interface after, say a minut of no activity, then bring it up again when packets go out?  Usually diald is used to control a modem, but I believe it can control any network device.  The only problem is that it takes about 15 seconds for the wireless interface to initialize.  But is there any way to put a wireless interface into a suspend mode, then have it communicate instantly when it comes out of suspend?
Has any one tried this yet?  If not, I'll see about fiddling with this over the weekend, then post the results here.


Accessories / Palm keyboard adapters for Zaurus?
« on: April 09, 2004, 03:46:08 pm »
There are a lot of keyboard options for palm devices, I was wondering what it would take to get any of them working on the Zaurus (at least, hardware wise).  Are most of these keyboards standard rs232 interface, or do they normally talk to a palm via the usb signals?  If rs232, then it should be easy to wire it up an adapter to use in combination to a Zaurus serial cable.  Then it\'s just a matter of figuring out the protocol, and putting together a driver.
Where can I find out the hardware interface specs of various keyboards, specifically I\'m looking at the new logitech key-case keyboard.


Site Suggestions, Requests, and Updates / Question on uploads
« on: March 04, 2004, 11:18:34 am »
Question to the site admins:
A few days ago, I uploaded a custom kernel for the 5500, compiled to allow async (faster) writes to SD & CF cards (see my thread on CONFIG_FS_SYNC).  Since it still hasn\'t shown up available for download, I re-submitted it (upon user request, assuming there was a problem with the original upload), this time as a .zip file.   Just wanted to point this out in case the original upload is still pending validation, you can disregard the other one.

Angstrom & OpenZaurus / Tar\'d up copy of OpenZaurus?
« on: February 12, 2004, 05:19:07 pm »
Does anyone have a copy of the OpenZaurus rom as a tar.gz file hosted anywhere?  I\'m in the process of putting together a howto/scripts for setting up a dual-boot environment that will let you boot OpenZaurus off an SD card while leaving the Sharp rom installed in flash (see my previous post on this topic).  The problem I\'m running into is that in order to extract OZ from the initrd.bin image, it involves loading up the mtdblock and mtdram drivers on a Linux host.  Some distributions don\'t include the modules, resulting in a bit more work (compiling your kernel, setting up the modules, etc).
I\'d like to make my howto as simple (and scriptable) as possible.  Otherwise, I could go ahead and upload my copy to the board here, but I don\'t want to step on anyone\'s toes or anything.
I\'m hoping that this will get more people to try out OZ, and thereby increase the potential developer base.


Sharp ROMs / CONFIG_FS_SYNC in Sharp kernel source
« on: February 09, 2004, 08:40:12 pm »
I noticed an option in the .config file in Sharp\'s 2.4.18 kernel source, \"CONFIG_FS_SYNC = y\".  It appears to force synchronous file i/o regardless of if you mount a filesystem with \"-o async\".  This option appears to be an addition by Sharp along with the #ifdefs that test for it in various source files in the ./fs kernel source directory.
So, as a test, I tried un-taring a few files on an SD card (which was mounted -o async), with the standard kernel, and with a kernel compiled with this flag turned off.  The results are that with CONFIG_FS_SYNC turned on (and SD card mounted -o async), the operation took 230 seconds, and running a kernel with it turned off, the test took only 19 seconds (average of several tries), more than a 10:1 speed increase.
Also, I tied it with someone elses SD card that was having problems under ext2, (a Sandisk card), and all the problems appeared to go away.

Can anyone else who\'s into compiling their own kernels try this out, and report back the results?
For the record, I\'m running with my /home on the SD card, and also lately have been dual-booting OpenZaurus from the SD card, and turning this compilation flag off has made a world of difference in speed.


Angstrom & OpenZaurus / Dual boot setup
« on: February 04, 2004, 11:55:57 pm »
I\'ve been playing around with a dual-boot setup for my 5500 that allows me to keep a Sharp-based rom installed, yet lets me boot up an alternate distribution, such as OpenZaurus, from my SD card.  If anyone\'s interested, I can put together a howto article, and some scripts to automate rebuilding your Sharp image to support this.

The basic modifications to the Sharp rom is:
(this is pseudo code from memory, I haven\'t had time to put together a cleaned up version yet)
1) Move /sbin/init to /sbin/orig/init
2) Create a shell script in the place of /sbin/init that does the following:
  - insmod the mmc/sd driver
  - mount ramfs filesystem on /dev, and populate it as necissary
  - mount sd card
  - if [ -f /mnt/card/init.card ]
  - then
  -     cp /nt/card/init.card /dev/.
  -     umount /mnt/card
  -     exec /mnt/card/init.card
  - else
         umount /mnt/card
         rmmod mmc/sd module
  -      exec /sbin/orig/init $@
  - fi

3) Copy root filesystem contents of desired rom image to the SD card
4) Create an init.card script on the SD card that does:
  - mv /dev/mmcda1 /dev/mmcsd1   (needed so that the contents of the SD card doesn\'t appear as any type of external storage to opie apps, otherwise it can cause problems with anything that scan all files on mounted media)
  - mount -oasync,noatime /dev/mmcsd1 /mnt/card
  - pivot_root /mnt/card
  - exec /sbin/init

The various \"exec\" lines in the fake /sbin/init script on the rom and in the init.card are needed so that the final real init that ends up running is still process id 1.  Also, a couple of adjustments were needed to the OZ rc scripts to accomidate the differences between the OZ kernel and the Sharp one.  Also, you need to compile install on your sharp-derived rom a copy of pivot_root,  you can\'t use the one from OZ as it is linked against a newer version of ld-linux.

I\'ve been using this for a while now, and so far very few problems have popped up.  With some cheaper brands of SD cards, you might have problems with suspending due to bugs in the Sharp SD driver, but my Lexar card seems to due ok.  Also, I am currently getting a lockup sometimes if I suspend while in the docking cradle.  I think this is fixable by having an apm script that turns off the usb port during suspend.

Let me know if anyone wants me to put together some scripts that will automate rebuilding a Sharp (or TKC) rom image to support the above.  I may even get the scripts to work on the Z itself instead of having to build it on another Linux workstation.  Personally, I think this is a great way to try out OZ, and other roms.  Also makes it much more functional, as you end up with a much larger root filesytem (potentially 512 meg instead of 16 meg that you get within the Z\'s flash).


General Discussion / Speed of SD and CF cards (writes)
« on: February 02, 2004, 11:16:44 pm »
Ok, I\'ve just had an \"enlightenment\", thought I\'d share with everyone.
As we all know, writing out data to an SD or CF card is slow.  Example, untaring a bunch of files typically takes about a second or so per file to write out regardless of size.
Anyhow, if you mount up an SD card using the -o async option, this speeds it up a slight amount, but not by much.  However, I noticed back a while ago that if you create an image file on your flash media, then mount that image up via the loopback driver, then writes to that mount point go blindingly fast.  What is happening is that the loop driver filters out redundant writes (i.e., to the inode table), so that only the last one takes effect.  You can also mount your entire SD (or CF) card via the loopback driver (i.e., mount -oloop /dev/mmcda1 /mnt/card), and get the same fast write speed.  Now if you write out a bunch of data, it still will take a few seconds to sync up, but overall the write is still faster.

Now for the problem.  If you mount the SD as /home, or use your SD as root, and use the \"-o loop,async\" option, then you will frequently get a lockup on suspend.  I figure that the SD card was getting shut down by apm while some other process still needed it, but it would only happen for me when using both sd as /home and sd mounted with -oloop,async.  Also, others have reported that with certain brands of SD cards, they would get lockups on suspend using my home-on-sd technique.

And, the revelation...
I was looking through the kernel config options in the 2.4.18 Sharp linux tree, and noticed that under filesystem configuration, there was an option turned on calld \"Syncronos File I/O\".  This option isn\'t on a normal 2.4.18 kernel tree, and didn\'t have a doc page for it.  So, I turned it off, recompiled the kernel and reflashed my Zaurus.  And guess what?  Now, mount -oasync has the expected effect.  It makes the file operations much faster than without it, without having to use the loopback driver trick mentioned above.  And, best of all, no more lockups on suspend when using the SD card as /home.  I can even use the SD as the root filesystem (/) for OpenZaurus (using a dual-boot technique) without any issue, and it\'s FAST.  Well, not quite as fast as ram or a hard disk, but many times faster than before.

SD is slow writes, with async flag still mostly slow, mounting via loopback driver and async is very fast but unstable, mounting async and with syncronous file i/o option in kernel turned off is just as fast as the loopback mount trick, but is very stable.

BTW, I love the new OpenZaurus 3.3.5.  I\'m not quiet ready to commit it to my 5500\'s flash rom yet, but what I\'ve seen so far dual-booting from the SD card (and now with the sync option turned off in the kernel), it rocks.

Pages: [1]