init.h가 설치되지 않았습니다

init.h가 설치되지 않았습니다

그래서 manjaro로 간단한 커널 모듈을 만들어 보려고 합니다. 다음은 코드입니다

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>

static int __init helloWorldInit(void)
{
    pr_info("Hello World!\n");
    return 0;
}

static void __exit helloWorldExit(void)
{
    pr_info("Removed kernel module successfully");
}

module_init(helloWorldInit);
module_exit(helloWorldExit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("author");
MODULE_DESCRIPTION("Test kernel module");
MODULE_VERSION("2:1.0");

이것이 메이크파일이다

obj-m += helloWorld.o
KDIR = /lib/modules/$(shell uname -r)/build
all:
    make -C $(KDIR) M=$(shell pwd) modules
clean:
    make -C $(KDIR) M=$(shell pwd) clean

문제는 리눅스 헤더 패키지(linux515-headers)를 설치했는데 헤더 파일에 init.h가 없다는 점입니다. 어떻게 해야 합니까?

관련 정보