MJR wrote:
- don't compile the serial driver into the kernel and don't load it.
Adam wrote:
Just out of interest, why do you want to not have a ttyS0 ? What are you
trying:
to achieve? if we know that perhaps we can come up with another plan :)
Ted wrote:
Anyway, as Adam says, it would help to know why you want Linux not to know about /dev/ttys0
I still need /dev/ttyS1 to work, since that's where my modem is connected, so disabling serial support altogether isn't really an option.
has it got a dark secret? Crossed the floor of the House to Windows, has it?
Crumbs, NO! If it had strayed to that extent, I would have personally drilled it out of the chassis and incinerated it by now....
The real problem is something of a convoluted story: I started off wanting to run a particular DOS programme using DOSemu. This DOS thing uses a serial port but has to be able to wiggle the RTS line properly. The reason for that is that it gets connected to an RS485 half-duplex system that uses RTS to switch between send and receive. The programme (which was written in Turbo/Power BASIC), when running on a proper DOS PC, writes to, and reads from, the UART's control registers to achieve the correct timing of RTS with respect to the transmitted data. That has all been working nicely for about 8 years on a variety of boxes fitted up with various flavours of DOS.
In trying to make this work on a Linux box, I discovered that the emulation of the serial port by DOSemu is less than perfect. It doesn't faithfully report back the state of the UART's registers, so that, when looking for the transmit shifter to empty in order to know when to switch RTS off, the programme gets the wrong information. Also, there's a problem with the timing relationship between when the transmitted data emanates from the hole on the back of the PC and when the RTS line toggles; I imagine that this is due to latency in Linux's emulation of the port to DOS programmes.
All in all, DOSemu hasn't come up with the goods for this DOS programme of mine, which I HAVE to get working for a client. The DOSemu list has, so far, seen fit not to afford me any help either: when I posted a query there, the response I got was, "What's RTS?", which doesn't exactly fill one with lots of confidence...
This brings me to the query I posted to the ALUG list. I thought that, maybe if I could persuade Linux that what my DOS programme looks on as COM1 (/dev/ttyS0) didn't actually exist, then it wouldn't emulate it; I could then set the relevant things in the DOSemu config file to allow my programme to have direct unhindered access to the UART. Until I can persuade Linux that the port isn't there, I can't do that. If I do, I get an error when DOSemu starts, reporting a conflict between COM1 and standard i/o port. Hence the question: how do I get Linux to ignore a serial port?
I hope that goes some way towards explaining the origin of my question. Sorry it's gone on a bit!
Thanks for your input, chaps!
Cheers,
Gerald.