Summary: | init-script "/etc/init.d/serial" runs to late (should be runned prior to "/etc/init.d/modules"...) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Daniel <deepee> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | VERIFIED WORKSFORME | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Daniel
2005-10-23 10:47:02 UTC
setserial should maybe say it needs modules ... really though, you shouldnt be putting setserial into the boot runlevel thus avoiding the whole issue ... (In reply to comment #1) It's exactly the opposit, I ment: To resolve my problem /etc/init.d/serial has to be run *prior* to /etc/init.d/modules. this init script order works: 1.) serial: set "uart none" for my ttyS2 2.) modules: modprobe lirc_serial irq=11 io=0x800 this init script order failes to load the lirc_serial module: 1.) modules: load lirc_serial (<<-- FAIL! syslog: /dev/ttyS2 is already in use) 2.) serial: set's the ttyS2-port to "uart none" correctly, but has no effect, because "module" has already been run (modprobe lirc_serial failed already!) ------8<----cut here----8<---- $ cat /etc/serial.conf /dev/ttyS2 uart none ------8<----cut here----8<---- ------8<----cut here----8<---- $ cat /etc/modules.autoload.d/kernel-2.6 #QuadPort-Ethernet: sundance #LVM2: dm-mod #Internal NT-mode ISDN HFC Card: zaphfc modes=1 # lirc specific modules lirc_dev # following module cannot be loaded because serial port is occupied by # kernel. Workaround: run setserial (via /etc/init.d/serial) prior! # put "/dev/ttyS2 uart none" into "/etc/serial.conf" lirc_serial irq=11 io=0xd800 debug=1 ------8<----cut here----8<---- Here are my serial-ports (ttyS0/1 onboard and ttyS2/3 on a PCI-Card (irq11)): ------8<----cut here----8<---- $ dmesg | grep ttyS Kernel command line: root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev console=ttyS0 splash=verbose,theme:emergence video=vesafb:mtrr,ywrap,1024x768-32@85 ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A ttyS2 at I/O 0xd800 (irq = 11) is a 16550A ttyS3 at I/O 0xd808 (irq = 11) is a 16550A ------8<----cut here----8<---- > setserial should maybe say it needs modules ... No. Specifying "need serial" within modules (and additionally adding serial to runlevel boot) is in my opinion a possible solution - but I'm also aware that this will perhabs cause some other problems regarding serial kernel module loading (needed by setserial?!) > really though, you shouldnt be > putting setserial into the boot runlevel thus avoiding the whole issue ... I do not had added /etc/init.d/serial to "boot" runlevel (while I filled the above bug). I also tried adding serial to "boot" after I filled the above bugzilla request, but this doesn't work either... ( I'm not really a gentoo- init-script-dependency-expert ;-( ) As a workaround I added the "setserial /dev/ttyS2 uart none" command and the "modprobe lirc_serial..." command into lirc init-script. But I would be more happy to use the gentoo-mechanism by adding lirc_serial to /etc/modules.autoload.d/kernel-2.6 to load all modules. Many thanks for your help! in that case i dont think changing either script is appropriate you should add this to a local file (say /etc/modules.d/serial): pre-install lirc_serial /bin/setserial -b /dev/ttyS2 uart none then remove the setserial init.d script: `rc-update del setserial` just add lirc_serial to your modules autoload and next time you boot, everything should fall into place just in case someone will have the same problem some days and perhab's get directed to this entrie. Here are some more details: (In reply to comment #3) > you should add this to a local file (say /etc/modules.d/serial): > pre-install lirc_serial /bin/setserial -b /dev/ttyS2 uart none that's a great hint! Thx a lot! But only adding does not work. ;-) Run "modules-update" to rebuild the modprobe.conf! > then remove the setserial init.d script: `rc-update del setserial` just a typo: "rc-update del serial" > just add lirc_serial to your modules autoload and next time you boot, > everything should fall into place in general yes, but it does not worked out of the box (for me) because I use some extra module options for lirc_serial, so I had to add an "options" statement into /etc/modules.d/serial after running modules-update and a reboot everything worked as you prognosed! content of my "/etc/modules.d/serial" file: ----8<------8<---- options lirc_serial irq=11 io=0xd800 pre-install lirc_serial /bin/setserial -b /dev/ttyS2 uart none ----8<------8<---- finally after running modules-update again, both entries were present in /etc/modprobe.conf! Works like a charm! Thanks a lot! |