Build Kernel loadable module for lego sensors

Hello,

I am using lego sensor connected with BrickPi3 stacked on Raspberrypi. I am able to read the sensor value from the raspberrypi.
But, I would like to compile the lego driver modules for Raspberrypi Kernel so that it will be available under /sys/class/lego-sensor. Currently there is no such directory (/sys/class/lego-sensor).

I came across this git repository with lego drivers for linux. GitHub - ev3dev/lego-linux-drivers: LEGO MINDSTORMS and LEGO WeDo drivers for Linux from the ev3dev project

I cloned that repository and used make command to build the module but it is not generating a .ko file. I am not sure where I am going wrong.

As per my understanding, I can use insmod command to insert the kernel module (.ko) to the running kernel once it is built.
Can someone please help me in how can I build a module for lego hardware.

Thanks for your time and consideration.

Best Regards
Deepak

1 Like

Unfortunately, building kernel modules is outside most everyone’s experience here, and that mission, if you decide to accept it, will require a great deal of research and experimentation on your part.

Dexter Industries and/or Modular Robotics provides the basic robot and a vast amount of software to help you use it.  Unfortunately, more advanced topics like this are beyond the scope of the basic educational software that is provided.

If you browse the topics here, you will notice that a lot of advanced research is being done by myself, (browser control and multi-booting), as well as @cyclicalobsessive and @KeithW who are the acknowledged experts in ROS and advanced sensors.

This, (kernel modules), is something you can research and contribute to if you wish.

If you do, please post your research and results here so others can learn from your experience.

1 Like