I am trying to insert a kernel module using depmod and modprobe utilities in-order to resolve any dependencies. When I build the module it throws "Warning: modules_install: missing 'System.map' file. Skipping depmod."

And later when I try to execute modprobe it throws an error saying "modprobe: FATAL: Module i2c_eeprom_client.ko not found in directory /lib/modules/4.19.58-v7+"

Below is the make file I am using:

obj-m += i2c_eeprom_client.o
KDIR = /lib/modules/$(shell uname -r)/build

    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
    make -C $(KDIR) M=$(PWD) modules_install

    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

And below is the output of build:

make -C /lib/modules/4.19.58-v7+/build M=/home/pi/work/eeprom modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.58-v7+'
  Building modules, stage 2.   
  MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.19.58-v7+'
make -C /lib/modules/4.19.58-v7+/build M=/home/pi/work/eeprom 
make[1]: Entering directory '/usr/src/linux-headers-4.19.58-v7+'
  INSTALL /home/pi/work/eeprom/i2c_eeprom_client.ko
  DEPMOD  4.19.58-v7+
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-4.19.58-v7+'

How can i fix this problem ? Please help

Platform : Raspberry PI 3b+, Raspbian - linux 4.19.58-v7+

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.