Hi Rishi,
Thank you for your answer. Just a quick feedback.
I installed the headers with:
sudo apt-get install raspberrypi-kernel-headers
Then I had to install sparse:
sudo apt-get install sparse
Then run make and the driver was build.
I loaded the driver and I think it shoud work, but haven't verified yet.
pi@raspberrypi:~/github/serial-communication-manager/drivers/tty2com/linux $ sudo insmod ./tty2com.ko max_num_vtty_dev=1 init_num_nm_pair=1 init_num_lb_dev=1
pi@raspberrypi:~/github/serial-communication-manager/drivers/tty2com/linux $ modinfo tty2com.ko
filename: /home/pi/github/serial-communication-manager/drivers/tty2com/linux/tty2com.ko
version: v1.0
license: GPL v2
description: Serial port null modem emulation driver
author: Rishi Gupta
srcversion: 976181F91628E463B1CDCD5
depends:
name: tty2com
vermagic: 4.14.62-v7+ SMP mod_unload modversions ARMv7 p2v8
parm: max_num_vtty_dev:Maximum number of virtual tty devices this driver can create. (ushort)
parm: init_num_nm_pair:Number of standard null modem pairs to be created at load time. (ushort)
parm: init_num_lb_dev:Number of standard loopback tty devices to be created at load time. (ushort)
parm: minor_begin:Minor number of device nodes i.e. starting index of device nodes. (int)
Best regards,
Andreas