Cannot install tty2com on Raspi3

6 views
Skip to first unread message

Andreas Kuhtz

unread,
Aug 24, 2018, 1:29:56 PM8/24/18
to SerialPundit

Hello Rishi,

How can I build and install the tty2com on Raspi3 with raspbian?
Currently I get the following error and the  /lib/modules/4.14.52-v7+/build directory is really not available.

pi@raspberrypi:~/github/serial-communication-manager/drivers/tty2com/linux $ sudo ./build.sh default
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions modules.order Module.symvers
make C=1 -C /lib/modules/4.14.52-v7+/build M=/home/pi/github/serial-communication-manager/drivers/tty2com/linux modules
make[1]: *** /lib/modules/4.14.52-v7+/build: No such file or directory.  Stop.
Makefile:29: recipe for target 'default' failed
make: *** [default] Error 2

Regards,
Andreas

Rishi Gupta

unread,
Aug 25, 2018, 1:06:44 AM8/25/18
to SerialPundit
Hi Andreas,

Please try this on rpi itself.
- copy tty2com.c and Makefile in a folder on rpi.
- cd into that folder and run make

/lib/modules/zzzzz/build on rpi root file system should have kernel headers installed.

Regards,
Rishi
Message has been deleted

Andreas Kuhtz

unread,
Aug 25, 2018, 4:41:24 AM8/25/18
to Rishi Gupta, SerialPundit
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


--
You received this message because you are subscribed to the Google Groups "SerialPundit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to SerialPundit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/SerialPundit/6f4bd724-dafc-47a4-bce8-b9ffc0a0167c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages