mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
rename kernel_module to kernel_modules, start README mass factorings
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
config BR2_PACKAGE_GEM5
|
||||
bool "gem5"
|
||||
help
|
||||
gem5 system simulator. Only builds the m5 guest instrumentation
|
||||
tool for now, not the simulator itself.
|
||||
Only for the m5 guest instrumentation tool of the gem5 system simulator,
|
||||
does not build the simulator itself.
|
||||
|
||||
http://gem5.org
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
name: KERNEL_MODULE
|
||||
@@ -1,5 +1,5 @@
|
||||
config BR2_PACKAGE_KERNEL_MODULE
|
||||
bool "kernel_module"
|
||||
config BR2_PACKAGE_KERNEL_MODULES
|
||||
bool "kernel_modules"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
help
|
||||
Linux Kernel Module Cheat.
|
||||
@@ -1,4 +1,4 @@
|
||||
obj-m += $(addsuffix .o, $(notdir $(basename $(filter-out %.mod.c, $(wildcard $(BR2_EXTERNAL_KERNEL_MODULE_PATH)/*.c)))))
|
||||
obj-m += $(addsuffix .o, $(notdir $(basename $(filter-out %.mod.c, $(wildcard $(BR2_EXTERNAL_KERNEL_MODULES_PATH)/*.c)))))
|
||||
ccflags-y := -DDEBUG -g -std=gnu99 -Werror -Wno-declaration-after-statement -Wframe-larger-than=1000000000
|
||||
|
||||
.PHONY: all clean
|
||||
1
packages/kernel_modules/external.desc
Normal file
1
packages/kernel_modules/external.desc
Normal file
@@ -0,0 +1 @@
|
||||
name: KERNEL_MODULES
|
||||
@@ -1,24 +1,24 @@
|
||||
################################################################################
|
||||
#
|
||||
# kernel_module
|
||||
# kernel_modules
|
||||
#
|
||||
################################################################################
|
||||
|
||||
KERNEL_MODULE_VERSION = 1.0
|
||||
KERNEL_MODULE_SITE = $(BR2_EXTERNAL_KERNEL_MODULE_PATH)
|
||||
KERNEL_MODULE_SITE_METHOD = local
|
||||
KERNEL_MODULES_VERSION = 1.0
|
||||
KERNEL_MODULES_SITE = $(BR2_EXTERNAL_KERNEL_MODULES_PATH)
|
||||
KERNEL_MODULES_SITE_METHOD = local
|
||||
|
||||
ifeq ($(BR2_PACKAGE_EIGEN),y)
|
||||
KERNEL_MODULE_DEPENDENCIES += eigen
|
||||
KERNEL_MODULES_DEPENDENCIES += eigen
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LIBDRM),y)
|
||||
KERNEL_MODULE_DEPENDENCIES += libdrm
|
||||
KERNEL_MODULES_DEPENDENCIES += libdrm
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_OPENBLAS),y)
|
||||
KERNEL_MODULE_DEPENDENCIES += openblas
|
||||
KERNEL_MODULES_DEPENDENCIES += openblas
|
||||
endif
|
||||
|
||||
define KERNEL_MODULE_BUILD_CMDS
|
||||
define KERNEL_MODULES_BUILD_CMDS
|
||||
$(MAKE) -C '$(@D)/user' $(TARGET_CONFIGURE_OPTS) \
|
||||
BR2_PACKAGE_EIGEN="$(BR2_PACKAGE_EIGEN)" \
|
||||
BR2_PACKAGE_LIBDRM="$(BR2_PACKAGE_LIBDRM)" \
|
||||
@@ -26,7 +26,7 @@ define KERNEL_MODULE_BUILD_CMDS
|
||||
;
|
||||
endef
|
||||
|
||||
define KERNEL_MODULE_INSTALL_TARGET_CMDS
|
||||
define KERNEL_MODULES_INSTALL_TARGET_CMDS
|
||||
# The modules are already installed by the kernel-module package type
|
||||
# under /lib/modules/**, but let's also copy the modules to the root
|
||||
# for insmod convenience.
|
||||
@@ -3,7 +3,7 @@
|
||||
# We can almost do everything from the Makefile itself by using default values for
|
||||
#
|
||||
# LINUX_DIR ?= "/lib/modules/$(uname -r)/build"
|
||||
# BR2_EXTERNAL_KERNEL_MODULE_PATH="$(pwd)"
|
||||
# BR2_EXTERNAL_KERNEL_MODULES_PATH="$(pwd)"
|
||||
#
|
||||
# The problem with that is that if you define those variables in your environment,
|
||||
# the build breaks, so this is more portable.
|
||||
@@ -20,5 +20,5 @@ while getopts j: OPT; do
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND - 1))
|
||||
make -j "$j" KERNEL_MODULE_PATH="$(pwd)" LINUX_DIR="/lib/modules/$(uname -r)/build" "$@"
|
||||
make -j "$j" KERNEL_MODULES_PATH="$(pwd)" LINUX_DIR="/lib/modules/$(uname -r)/build" "$@"
|
||||
make -C user/ -j "$j" "$@"
|
||||
Reference in New Issue
Block a user