mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 04:54:27 +01:00
Move files up on tree
This commit is contained in:
@@ -16,7 +16,7 @@ QEMU opens up, and you can run:
|
|||||||
rmmod hello
|
rmmod hello
|
||||||
rmmod hello2
|
rmmod hello2
|
||||||
|
|
||||||
Each module comes from a C file under `kernel_module/package/kernel_module/src/`.
|
Each module comes from a C file under `kernel_module/`. `head *.c` for module usage.
|
||||||
|
|
||||||
The Linux kernel version can be found with:
|
The Linux kernel version can be found with:
|
||||||
|
|
||||||
@@ -28,6 +28,6 @@ The Linux kernel version can be found with:
|
|||||||
1. Examples
|
1. Examples
|
||||||
1. [Host](host/)
|
1. [Host](host/)
|
||||||
1. Buildroot
|
1. Buildroot
|
||||||
1. [hello](kernel_module/package/kernel_module/src/hello.c)
|
1. [hello](kernel_module/hello.c)
|
||||||
1. [hello2](kernel_module/package/kernel_module/src/hello2.c)
|
1. [hello2](kernel_module/hello2.c)
|
||||||
1. [debugfs](kernel_module/package/kernel_module/src/debugfs.c)
|
1. [debugfs](kernel_module/debugfs.c)
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
source "$BR2_EXTERNAL_KERNEL_MODULE_PATH/package/kernel_module/Config.in"
|
config BR2_PACKAGE_KERNEL_MODULE
|
||||||
|
bool "kernel_module"
|
||||||
|
depends on BR2_LINUX_KERNEL
|
||||||
|
help
|
||||||
|
Linux Kernel Module Cheat.
|
||||||
|
|||||||
@@ -1 +1,20 @@
|
|||||||
include $(sort $(wildcard $(BR2_EXTERNAL_KERNEL_MODULE_PATH)/package/*/*.mk))
|
################################################################################
|
||||||
|
#
|
||||||
|
# kernel_module
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
KERNEL_MODULE_VERSION = 1.0
|
||||||
|
KERNEL_MODULE_SITE = $(BR2_EXTERNAL_KERNEL_MODULE_PATH)
|
||||||
|
KERNEL_MODULE_SITE_METHOD = local
|
||||||
|
|
||||||
|
define KERNEL_MODULE_BUILD_CMDS
|
||||||
|
$(MAKE) -C '$(@D)' LINUX_DIR='$(LINUX_DIR)' PWD='$(@D)' CC='$(TARGET_CC)' LD='$(TARGET_LD)'
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KERNEL_MODULE_INSTALL_TARGET_CMDS
|
||||||
|
$(INSTALL) -D -m 0755 $(@D)/*.ko '$(TARGET_DIR)'
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(kernel-module))
|
||||||
|
$(eval $(generic-package))
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
config BR2_PACKAGE_KERNEL_MODULE
|
|
||||||
bool "kernel_module"
|
|
||||||
depends on BR2_LINUX_KERNEL
|
|
||||||
help
|
|
||||||
Linux Kernel Module Cheat.
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# kernel_module
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
KERNEL_MODULE_VERSION = 1.0
|
|
||||||
KERNEL_MODULE_SITE = $(BR2_EXTERNAL_KERNEL_MODULE_PATH)/package/kernel_module/src
|
|
||||||
KERNEL_MODULE_SITE_METHOD = local
|
|
||||||
|
|
||||||
define KERNEL_MODULE_BUILD_CMDS
|
|
||||||
$(MAKE) -C '$(@D)' LINUX_DIR='$(LINUX_DIR)' PWD='$(@D)' CC='$(TARGET_CC)' LD='$(TARGET_LD)'
|
|
||||||
endef
|
|
||||||
|
|
||||||
define KERNEL_MODULE_INSTALL_TARGET_CMDS
|
|
||||||
$(INSTALL) -D -m 0755 $(@D)/*.ko '$(TARGET_DIR)'
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(kernel-module))
|
|
||||||
$(eval $(generic-package))
|
|
||||||
Reference in New Issue
Block a user