Building tdevmon.ko for OpenWrt

Im trying to build tdevmon driver for openwrt from source, i know next to nothing about openwrt build process
and this is a great opportunity to learn, said driver is a low level serial "hook" that sends and recieves data over ssh to an application called ioninja that can interpret data and send it back.

mostly its used for analysis and debugging modbus and serial communication in general.
Driver and service exists for windows and linux both but im trying to use it on openwrt device.

If anyoune can point me in right direction as to learn how to create kernel module and package in openwrt correctly i would thank you very much .