mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
rename include to lkmc
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
ifeq ($(OBJECT_FILES),)
|
||||
# Hardcoding LKMC_MODULE_SUBDIRS here because is not defined.
|
||||
obj-m += $(addsuffix .o, $(notdir $(basename $(filter-out %.mod.c, $(wildcard $(BR2_EXTERNAL_LKMC_PATH)/kernel_modules/*.c)))))
|
||||
else
|
||||
# Trying to do:
|
||||
# $(MAKE) -C '$(LINUX_DIR)' M='$(M)' hello.ko hello2.ko
|
||||
# to restrict which modules are built leads to failures
|
||||
# when doing parallel builds. The only solution I could find
|
||||
# was to let the host select obj-m itself.
|
||||
obj-m += $(OBJECT_FILES)
|
||||
endif
|
||||
ccflags-y := -DDEBUG -g -std=gnu99 -Werror -Wno-declaration-after-statement -Wframe-larger-than=1000000000
|
||||
ccflags-y := \
|
||||
-DDEBUG \
|
||||
-ggdb3 \
|
||||
-std=gnu99 \
|
||||
-Werror \
|
||||
-Wframe-larger-than=1000000000 \
|
||||
-Wno-declaration-after-statement \
|
||||
$(CCFLAGS)
|
||||
|
||||
.PHONY: all
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <linux/printk.h> /* printk */
|
||||
#include <linux/uaccess.h> /* copy_from_user */
|
||||
|
||||
#include "../include/anonymous_inode.h"
|
||||
#include <lkmc/anonymous_inode.h>
|
||||
|
||||
static struct dentry *debugfs_file;
|
||||
static u32 myval = 1;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <linux/printk.h> /* printk */
|
||||
#include <linux/uaccess.h> /* copy_from_user, copy_to_user */
|
||||
|
||||
#include "../include/ioctl.h"
|
||||
#include <lkmc/ioctl.h>
|
||||
|
||||
static struct dentry *debugfs_file;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <linux/skbuff.h>
|
||||
#include <net/sock.h>
|
||||
|
||||
#include "../include/netlink.h"
|
||||
#include <lkmc/netlink.h>
|
||||
|
||||
struct sock *nl_sk = NULL;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#include "../include/ring0.h"
|
||||
#include <lkmc/ring0.h>
|
||||
|
||||
static int myinit(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user