Trying to compile adxl345 as a module in bbb but get error

52 views
Skip to first unread message

Mrigendra Chaubey

unread,
Oct 7, 2017, 4:33:51 AM10/7/17
to BeagleBoard
Hi all,

I have downloaded a debian image


I have attached a adxl345 accelerometer, and with user space tools its working fine.
Now I am trying to attach a kernel driver i.e in adxl345. I put the source files in 
/home/debian/Desktop/adxl345

and issued make.
I get this error

root@beaglebone:/home/debian/Desktop/adxl345# make
make -C /lib/modules/4.4.54-ti-r93/build M=/home/debian/Desktop/adxl345 modules
make[1]: *** /lib/modules/4.4.54-ti-r93/build: No such file or directory.  Stop.
Makefile:13: recipe for target 'default' failed
make: *** [default] Error 2

I checked 

root@beaglebone:/lib/modules/4.4.54-ti-r93# ls 
extra    modules.builtin modules.devname  modules.symbols.bin
kernel    modules.builtin.bin modules.order
modules.alias    modules.dep modules.softdep
modules.alias.bin  modules.dep.bin modules.symbols

there is no build directory. I tried to update kernel headers 
sudo apt-get install linux-headers-linux-headers-4.4.54-ti-r93

but it says

E: Unable to locate package linux-headers-linux-headers-4.4.54-ti-r93

How I am going to build the drivers?




Robert Nelson

unread,
Oct 7, 2017, 9:22:45 AM10/7/17
to Beagle Board
Oh, it's there, run "sudo apt update" first to update your apt cache..

Regards,

--
Robert Nelson
https://rcn-ee.com/

11209...@gmail.com

unread,
Nov 15, 2017, 7:18:39 AM11/15/17
to BeagleBoard
I have the same problem

在 2017年10月7日星期六 UTC-5上午3:33:51,Mrigendra Chaubey写道:
Reply all
Reply to author
Forward
0 new messages