xxorde / librekinect

Depth data from a kinect sensor! Small and fast kernel driver. Also for embedded devices like the raspberry pi!
407 stars 68 forks source link

Make not working - gspca.ko not created. Make load - error - gspca.ko: missing file #26

Closed YadavKapil closed 9 years ago

YadavKapil commented 9 years ago

Hi,

Make_load is not working because of missing gspca.ko file. So, may be, make command is not working properly (thats why gspca.ko is not present ). I have already done changes in Makefile for raspberry pi 2 as mentioned in #15 and bug correction as in #14 . But I dont know the way to fix this problem.

Here are the outputs - make

pi@raspberrypi ~/librekinect $ sudo make
make pc
make[1]: Entering directory '/home/pi/librekinect'
make -C /lib/modules/3.18.11-v7/build M= modules
make[2]: Entering directory '/usr/src/linux'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[3]: 'include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  Building modules, stage 2.
  MODPOST 1361 modules
make[2]: Leaving directory '/usr/src/linux'
make[1]: Leaving directory '/home/pi/librekinect'

make load

pi@raspberrypi ~/librekinect $ sudo make load
make unload_drivers
make[1]: Entering directory '/home/pi/librekinect'
sudo sh unload_drivers.sh
tried to unload all related drivers (and possibly more ;)
make[1]: Leaving directory '/home/pi/librekinect'
sudo modprobe videodev
sudo insmod gspca.ko
Error: could not load module gspca.ko: No such file or directory
Makefile:42: recipe for target 'load' failed
make: *** [load] Error 1

file system after make load

pi@raspberrypi ~/librekinect $ ls
gspca.c  gspca.h  kinect.c  Makefile  readme.md  unload_drivers.sh
pi@raspberrypi ~/librekinect $ 

What could be the problem ?

EDIT1 : I think the problem is that M= is not set in this line in output of Make command - Make -C /lib/modules/3.18.11-v7/build M= modules . How could I solve it ?

EDIT2 : I solved the problem by putting fixed path instead of pwd in Makefile. Still, If someone knows the cause of pwd not working, please share it with me.

$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
- - - - >
$(MAKE) -C $(KERNELDIR) M=/home/pi/librekinect modules

Thanks

YadavKapil commented 9 years ago

I solved the problem by putting fixed path instead of pwd in Makefile. Still, If someone knows the cause of pwd not working, please share it with me.

$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
- - - - >
$(MAKE) -C $(KERNELDIR) M=/home/pi/librekinect modules