Linux: modpost does not build anything

前端 未结 12 1095
-上瘾入骨i
-上瘾入骨i 2020-12-20 14:58

I am having problems getting any kernel modules to build on my machine. Whenever I build a module, modpost always says there are zero modules:

MODPOST 0 modu         


        
12条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-20 15:16

    Try to remove modules string from the Makefile:

    obj-m = hello.o
    KVERSION = $(shell uname -r)
    all:
            make -C /lib/modules/$(KVERSION)/build M=$(shell pwd) # <--
    clean:
            make -C /lib/modules/$(KVERSION)/build M=$(shell pwd) clean
    

提交回复
热议问题