I’m trying to build a linux driver to access the DM timers, and as this is my first attempt at doing so, I’m trying to start out easy and just get a driver hello world example written and I’m having issues with getting the linux headers from apt.
When I run the command:
sudo apt-get install linux-headers-$(uname -r)
I get the following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.14.108-ti-r144.2
E: Couldn't find any package by glob 'linux-headers-4.14.108-ti-r144.2'
E: Couldn't find any package by regex 'linux-headers-4.14.108-ti-r144.2'
I looked at the rcn.ee repository I found in another support post, and I can’t find the linux headers there either. Do they exist?? Do I need to update my sources.list?
ps, in the older days, cross built “linux-headers*.deb” (armhf target built on x86) didn’t always end up the correct arch for the files inside linux-headers*.deb, i forget when it was eventually fixed… but just a heads up…
Just build your module on your “x86” machine… You have the cross_complier and set the “KERNEL” directory as what you build against… (the scripts that built linux-image-4.14.108-ti-r144.2 have set all this up…)
I’ve got my cross-compilation working, but my driver build is failing because the omap_dm_timer* functions can’t be found… apparently I’m missing something, or I’m trying to use the wrong module.
I started out just trying to get a minimal driver built (one that does nothing, but does have the general requirements of a driver) and that build’s fine. Next, I tried to add the timer and create an interrupt that will be executed when that timer elapses. I followed the above example. This builds, but gives warnings about missing modules… loading it on the BeagleBone gives these errors:
[78956.154810] iesTimer: Unknown symbol omap_dm_timer_stop (err 0)
[78956.154837] iesTimer: Unknown symbol omap_dm_timer_set_source (err 0)
[78956.154850] iesTimer: Unknown symbol omap_dm_timer_get_fclk (err 0)
[78956.154863] iesTimer: Unknown symbol omap_dm_timer_set_match (err 0)
...
Does anyone have any ideas? I feel like I’m close, but I keep hitting a wall. This is my first attempt at linux driver code, so I’m very much a noob in this domain, sorry for my naivety.
Update
I did find some sourece code for pwm_omap_dmtimer* functions… maybe I should use those?
I’m planning on using it generate a periodic interrupt. The interrupt code will perform analog input into a buffer. I’ll use that input buffer in my application code to regulate my output signals.