l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
September 2: Social gathering
Next Installfest:
TBD
Latest News:
Aug. 18: Discounts to "Velocity" in NY; come to tonight's "Photography" talk
Page last updated:
2002 Sep 20 12:28

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] how *not* to load the serial module at boot time?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] how *not* to load the serial module at boot time?



I think /dev/ttyS0 defaults to IRQ4 + IO 0x03f8 with no configuration
whatsoever.  AFAIK, there is no driver to load or unload; you just tell
the kernel what the settings are.

The proper way to control the serial port from RedHat, if I understand the
system correctly, is to *create* /etc/rc.d/rc.serial with whatever
parameters you want (if the file doesn't exist, it defaults to the
aforementioned IRQ & IO).  In your case,

   #!/bin/sh

   setserial /dev/ttyS0 uart none

The file will be executed by /etc/rc.d/rc.sysinit.  If I understand things
correctly, /etc/rc.d/rc.sysinit is the first script that gets executed,
and /etc/rc.d/rc.local is the last script that gets executed, so hopefully
it'll be executed before the LIRC modules are loaded. But if not, you'll
need to insert a couple more lines in /etc/rc.d/rc.serial to unload and
load the LIRC module.

Hope that helps!

-Mark


On Thu, 19 Sep 2002, Matt Holland wrote:

> Hey all,
>
> Does anyone out there know how RedHat (7.3, if it matters) decides when
> (and if) to load the serial port driver, and if so, how to stop it from
> loading?  I ask because I've just started playing with lirc (Linux
> Infrared Remote Control -- very nifty) with my newly-built home-brew
> serial IR receiver, but the lirc_serial driver can't grab the port if
> the serial driver has already been loaded.  I compiled the serial driver
> as a module when I built my kernel, but I still get:
>
> Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT
> SHARE_IRQ SER
> IAL_PCI ISAPNP enabled
> ttyS00 at 0x03f8 (irq = 4) is a 16550A
> ttyS01 at 0x02f8 (irq = 3) is a 16550A
> ...
> lirc_serial: port 03f8 already in use, proceeding anyway
> lirc_serial: compile the serial port driver as module and
> lirc_serial: make sure this module is loaded first
> lirc_serial: auto-detected active low receiver
>
> in my dmesg output.  The problem is that the serial driver is getting
> loaded before anything listed in /etc/modules.conf.  Nothing works until
> I do:
>
> # setserial /dev/ttyS0 uart none
> # rmmod lirc_serial
> # insmod lirc_serial
>
> It's possible that I had to restart lircd after that... I don't remember
> for certain whether I did or not.  In any case, it seems clear that I
> could just put those commands (followed by the daemon restart, if
> necessary) at the end of rc.local, and learn to ignore the error
> messages during boot (after all, I have no problem ignoring X when it
> complains about missing fonts ;).  However, it seems like just stopping
> the serial module from loading in the first place would be the more
> elegant solution.
>
> For those eager Debian users out there... the lirc documentation
> mentioned modifying /etc/serial.conf on Debian... no such file in a
> RedHat installation.  Also, I grep'ed the init scripts for 'serial' and
> didn't find anything enlightening.
>
> Incidentally, for those of you who don't always sit *at* your computer
> when listening to mp3's, watching DVD's, whatever, I highly recommend
> looking into lirc (www.lirc.org).  I'm a firm believer that a little
> soldering now and then is good for the soul :)  I can't say enough about
> the coolness of this project!
>
> Thanks,
> Matt
>
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>

--
Mark K. Kim
http://www.cbreak.org/
PGP key available upon request.


_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.