mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
modules: rename packages/kernel_modules to packages/lkmc
Then inside, split packages/lkmc into kernel_modules and userland, to keep userland out of the kernel_modules parent path, which makes no sense. Copy built modules and userland to the output rootfs overlay. Document Linux distro tradeoffs.
This commit is contained in:
17
packages/lkmc/kernel_modules/Makefile
Normal file
17
packages/lkmc/kernel_modules/Makefile
Normal file
@@ -0,0 +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
|
||||
|
||||
.PHONY: all
|
||||
|
||||
all:
|
||||
$(MAKE) -C '$(LINUX_DIR)' M='$(M)'
|
||||
Reference in New Issue
Block a user