Closed z41dth3c0d3r closed 2 years ago
make
is confused by the spaces in the path. Please try renaming your working directory to _Linux_device_Driver_Devmodules or something like that.
Ok i've done that and right now i am using debian based distribution and now i got this!
and please note that path is /mnt/Programming/Programming/Linux_Device_Driver_Dev and not /mnt/Programming/Programming/Linux_Device_Driver_Dev_modules because in make -C /lib/modules/5.15.0-kali2-amd64/build M=/mnt/Programming/Programming/Linux_Device_Driver_Dev modules
'modules ' is in make file
make -C /lib/modules/5.15.0-kali2-amd64/build M=/mnt/Programming/Programming/Linux_Device_Driver_Dev modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-kali2-amd64'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc-11 (Debian 11.2.0-12) 11.2.0
You are using: gcc-11 (Debian 11.2.0-13) 11.2.0
make[2]: *** No rule to make target '/mnt/Programming/Programming/Linux_Device_Driver_Dev/hello.o', needed by '/mnt/Programming/Programming/Linux_Device_Driver_Dev/hello.mod'. Stop.
make[1]: *** [/usr/src/linux-headers-5.15.0-kali2-common/Makefile:1892: /mnt/Programming/Programming/Linux_Device_Driver_Dev] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-kali2-amd64'
make: *** [Makefile:10: modules] Error 2
okay i got it
can you hlp me with the same error please
My hello.c code
and my makefile
and the output when i run make