After making gpsdrive-ipaq compile for Angstrom[1] , I tried to test in
a real life on my iPAQ h2200 and suddenly found, that I can't. 
Needed kernel module for my CompactFash GPS card, serial_cs wasn't in 
the feeds. Oops. 

I filed a bug[2], then changed OE's defconfig to include
CONFIG_SERIAL_8250_CS=m , rebuild kernel and installed missing modules
on PDA. Still no luck. On modprobe serial_cs I got this:
----------------------------------------------------------------------------
WARNING: Error inserting 8250
(/lib/modules/2.6.21-hh20/kernel/drivers/serial/8250.ko): Device or resource 
busy
FATAL: Error inserting serial_cs
(/lib/modules/2.6.21-hh20/kernel/drivers/serial/serial_cs.ko): Unknown symbol 
in module, or unknown parameter (see dmesg)
----------------------------------------------------------------------------

First I thought that it's some incompatibility between modules and
kernel, so I tried to build my own kernel and modules by hand. But it
didn't help. And then I started to remembering some topics seen
long-long time ago about "PXA/Serial clash" - when both PXA and 8250
serial drivers wanted to enumerate their ports starting from ttyS0 [3]
But it was strange, because I thought this problem was fixed already in 
hh.org kernels - I sucessfully used CF GPS with Angstrom and my custom 
built kernel less than half-year ago. 

So I started to look at what changed in hh.org kernel in last half-year
and finally found, that 8250 serial hack was removed somewhere between 
2.6.21-hh17 and -hh18:
-----------------------------------------------------------------------------
$ cvs log -r1.28 drivers/serial/8250.c | tail -9
----------------------------
revision 1.28
date: 2007/10/25 19:35:43;  author: todd;  state: Exp;  lines: +2 -8
Remove an old hack to move the pxa serial ports to a different
range from the 8250 serial ports (both ttyS). This code doesn't
work any more anyway. Users wanting to use both 8250 (e.g. CF
serial GPS) and PXA serial should change the serial/pxa.c namespace
to be ttySA or something, as that is a much easier change.
=============================================================================
-----------------------------------------------------------------------------

Reapplying hack and rebuilding kernel (2.6.21-hh20) has made my CF GPS happy 
again - so at least this old hack still works. But it doesn't help anybody 
except me, so we still need to think about how to deal with this problem on
the distro/OE level, so other users can be happy too. 

Well, what choices do we have:
1) Downgrade kernel to -hh17 (may cause some regressions)
2) Reapply old hack to hh.org kernel locally in OE and then upgrade to it.
3) Switch hh.org kernel to scheme suggested by RMK (renaming PXA serial 
   ports from ttyS* to ttySA*) [4] and then fix (a lot of?)  broken 
   userspace programs.

Oh, hell. Nothing of this seems to be perfect. The sad thing also is that 
mainline kernel still doesn't solve this problem itself. 
Any ideas, comments, suggestions? 


Dmitry 'MAD' Artamonow

[1] 
http://lists.linuxtogo.org/pipermail/angstrom-distro-devel/2008-January/001587.html
[2] http://bugs.openembedded.org/show_bug.cgi?id=3682
[3] http://www.handhelds.org/hypermail/kernel-discuss/14/1419.html
[4] http://lists.arm.linux.org.uk/lurker/message/20070702.162054.91fc79ce.html

_______________________________________________
Angstrom-distro-users mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-users

Reply via email to