Patching the kernel to read encoders

Hello!, I just got my beaglebone black last week and already got the GPIO and PWM libraries working nicely,
However for my project, I need to read 2 quadrature encoders to measure the speed of 2 different and I found
this library that seems like the perfect solution for me, since it has a python API, however I really have no
idea how to patch the beaglebone kernel to get it to work, and the guide is a little bit “over my head”, since
it’s my first time working with linux, so I never had to deal with the kernel very much.

I was wondering if someone has a simpler guide on how to patch and install the kernel on the Beaglebone Black,
I don’t understand if I have to build the kernel in another system and then get it on the BBB or just build it
directly on the BBB, and when I build it and patch it, how do I get it to work…

Thanks in advance for any help


I just did it and I followed the instruction on

and then you can patch the whole with


It should be straightforward BUT please note that you should read the Soc Manual because the default settings Teknoman choose for the eQep not necessarly will match what you will need (for example when do you want your counts conter to reset?)

There are customization options for the encoders. You can use quadrature and non-quadrature encoders with the library. Also, the reset on timer is configurable.

I'll add some more documentation on the pin outs and add the other pin configuration.

Nathaniel Lewis