mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-22 17:55:57 +01:00
Remove redundant kernel module build commands.
They were rebuilding every time. Fix run find for no patches
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
obj-m += $(addsuffix .o, $(notdir $(basename $(wildcard $(BR2_EXTERNAL_KERNEL_MODULE_PATH)/*.c))))
|
||||
ccflags-y := -DDEBUG -g -std=gnu99 -Wno-declaration-after-statement
|
||||
|
||||
.PHONY: all clean test
|
||||
.PHONY: all clean
|
||||
|
||||
all: test
|
||||
all:
|
||||
$(MAKE) -C '$(LINUX_DIR)' M='$(PWD)' modules
|
||||
|
||||
clean:
|
||||
$(MAKE) -C '$(LINUX_DIR)' M='$(PWD)' clean
|
||||
|
||||
test:
|
||||
$(MAKE) -C '$(PWD)/test'
|
||||
|
||||
@@ -9,18 +9,10 @@ KERNEL_MODULE_SITE = $(BR2_EXTERNAL_KERNEL_MODULE_PATH)
|
||||
KERNEL_MODULE_SITE_METHOD = local
|
||||
|
||||
define KERNEL_MODULE_BUILD_CMDS
|
||||
$(MAKE) \
|
||||
-C '$(@D)' \
|
||||
ARCH='$(KERNEL_ARCH)' \
|
||||
CC='$(TARGET_CC)' \
|
||||
CROSS_COMPILE='$(TARGET_CROSS)' \
|
||||
LD='$(TARGET_LD)' \
|
||||
LINUX_DIR='$(LINUX_DIR)' \
|
||||
PWD='$(@D)'
|
||||
$(MAKE) -C '$(@D)/test' CC="$(TARGET_CC)" LD="$(TARGET_LD)"
|
||||
endef
|
||||
|
||||
define KERNEL_MODULE_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0655 $(@D)/*.ko '$(TARGET_DIR)'
|
||||
$(INSTALL) -D -m 0755 $(@D)/test/*.out '$(TARGET_DIR)'
|
||||
endef
|
||||
|
||||
|
||||
2
run
2
run
@@ -19,7 +19,7 @@ case "$arch" in
|
||||
defconfig=qemu_arm_versatile_defconfig
|
||||
;;
|
||||
esac
|
||||
for p in "$(find '../buildroot_patches/' -maxdepth 1 -name '*.patch' -print)"; do
|
||||
for p in $(find '../buildroot_patches/' -maxdepth 1 -name '*.patch' -print); do
|
||||
patch -N -r - -p 1 <"$p" || :
|
||||
done
|
||||
make BR2_EXTERNAL="$(pwd)/../kernel_module" "$defconfig"
|
||||
|
||||
Reference in New Issue
Block a user