I'll be using RHEL 7.4. My FPGA will have a serial port. That Tx/Rx data will go through Xillybus and appear as two named pipes on linux. How do I then make that look like a standard serial port, where one can use stty or setserial to configure it, and then write/read it?
Is there an easy way to do this?
Otherwise, below is text I posted at LinuxQuestions.org:
Under RHEL 7.4, I'm going to have some custom hardware and linux driver (Xilinx FPGA, Xillybus) that presents two named pipes, one Rx coming into the linux computer and one Tx going out. I would like to make that APPEAR to linux to be a standard serial port.
So I think I need a driver that gives the APPEARANCE of there being a standard serial port, that can be written or read from, and that can be configured via stty or setserial. I haven't gotten deep enough into this yet, and I'm hoping there will be easier ways to accomplish this, including just using existing programs or commands.
My lay understanding of what to do follows. Please correct or improve it for me! The best would be if I don't have to write any code at all. (I have written at least half a million of lines of code in the past. (I multiplied 20Klines by 40years to get 800K.))
For the Tx/Rx, I imagine that I would find some existing serial port driver code. The "top" layer would expose what looks like a regular serial port that can be written/read as well as configured via stty or setserial. I would then replace the "bottom" layer with writes to the Tx named pipe and reads from the Rx named pipe. For the control stuff, such as baud rate, I'd go through yet a third named pipe that I haven't otherwise mentioned.