Status of kernel

Samuel Thibault samuel.thibault at ens-lyon.org
Sat Nov 12 17:18:44 EST 2016


Okash Khawaja, on Sat 12 Nov 2016 16:13:22 +0000, wrote:
> Could you explain your idea a bit more? I have been reading the driver code and
> want to contribute to this project.

Just copy/pasting some previous thoughts. The idea would be to make
speakup a tty line discipline, just like it is for a mouse, ppp, etc.

“
land? One of the goals of speakup is to be available before userland
works (otherwise we could as well just move the drivers to userland), so
we don't have any userland helper to set the line disciline up.

And even before setting up the line discipline, how can speakup open
the port?  We don't have a process context or /dev/, so we can't just
use sys_open and alike.  What we could use is some function which takes
a minor/major pair or a device name, and returns a filp, then we can
tty_set_ldisc(N_SPEAKUP) on file_tty(filp), but I don't know if such
thing exists?  That would probably be building a struct inode (getting
inspired from fs/ramfs/), then just open it? Something like:

struct inode *inode = new_inode(sb);

init_special_inode(inode, S_IFCHR, MKDEV(major, minor));
filp = get_empty_filp();
do_dentry_open(filp, inode, NULL, NULL);
struct tty_struct *tty = file_tty(filp);
tty_set_ldisc(tty, N_SPEAKUP);
”

Samuel


More information about the Speakup mailing list