mirror of
https://github.com/AuxXxilium/kmod.git
synced 2025-02-20 08:26:55 +07:00
build: cache modules from playground
Now that we are able to build our own test modules, also allow to use cached modules so a) kernel headers are not required and b) distro maintainers are happy. It's still need a "--disable-test-modules" in the configure since the default is enabled. There's no license problems anymore since all modules come from our own repository, we ship the sources and the modules can be easily rebuilt.
This commit is contained in:
parent
7266ec4337
commit
23603f1f83
@ -230,7 +230,12 @@ build-module-playground:
|
||||
cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND) && \
|
||||
find $(top_builddir)/$(MODULE_PLAYGROUND) -type d -exec chmod +w {} \; ; \
|
||||
fi
|
||||
if BUILD_MODULES
|
||||
$(MAKE) -C $(MODULE_PLAYGROUND)
|
||||
else
|
||||
$(MAKE) -C $(MODULE_PLAYGROUND) FAKE_BUILD=1
|
||||
endif
|
||||
|
||||
|
||||
rootfs: build-module-playground
|
||||
$(CREATE_ROOTFS)
|
||||
|
@ -127,6 +127,11 @@ AC_ARG_ENABLE([manpages],
|
||||
[], enable_manpages=yes)
|
||||
AM_CONDITIONAL([BUILD_MANPAGES], [test "x$enable_manpages" = "xyes"])
|
||||
|
||||
AC_ARG_ENABLE([test-modules],
|
||||
AS_HELP_STRING([--disable-test-modules], [disable building test modules during make check: cached modules will be used @<:@default=enabled@:>@]),
|
||||
[], enable_test_modules=yes)
|
||||
AM_CONDITIONAL([BUILD_MODULES], [test "x$enable_test_modules" = "xyes"])
|
||||
|
||||
AC_ARG_ENABLE([logging],
|
||||
AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
|
||||
[], enable_logging=yes)
|
||||
@ -282,4 +287,5 @@ AC_MSG_RESULT([
|
||||
coverage: ${enable_coverage}
|
||||
doc: ${enable_gtk_doc}
|
||||
man: ${enable_manpages}
|
||||
test-modules: ${enable_test_modules}
|
||||
])
|
||||
|
1
testsuite/module-playground/.gitignore
vendored
1
testsuite/module-playground/.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
*o.cmd
|
||||
*.ko
|
||||
!mod-simple-*.ko
|
||||
!cache/*.ko
|
||||
*.mod.c
|
||||
.tmp_versions
|
||||
modules.order
|
||||
|
@ -38,6 +38,9 @@ else
|
||||
# normal makefile
|
||||
KDIR ?= /lib/modules/`uname -r`/build
|
||||
KVER ?= `uname -r`
|
||||
ifeq ($(FAKE_BUILD),)
|
||||
FAKE_BUILD=0
|
||||
endif
|
||||
|
||||
ARCH_SPECIFIC_MODULES := mod-simple-x86_64.ko mod-simple-i386.ko mod-simple-sparc64.ko
|
||||
MY_MODULES := $(filter-out $(ARCH_SPECIFIC_MODULES),$(wildcard *.ko))
|
||||
@ -48,8 +51,14 @@ mod-simple-%.ko: mod-simple-%.c Makefile.arch
|
||||
$(eval arch=$(patsubst mod-simple-%.ko,%,$@))
|
||||
$(MAKE) KDIR=$(KDIR_$(arch)) ARCH=$(arch) CROSS_COMPILE=$(CROSS_COMPILE_$(arch)) -f Makefile.arch
|
||||
|
||||
ifeq ($(FAKE_BUILD),0)
|
||||
modules:
|
||||
$(MAKE) -C $(KDIR) M=$$PWD
|
||||
else
|
||||
modules:
|
||||
@echo " CP cache/*.ko"
|
||||
@cp cache/*.ko .
|
||||
endif
|
||||
|
||||
arch-modules: $(ARCH_SPECIFIC_MODULES)
|
||||
|
||||
|
BIN
testsuite/module-playground/cache/mod-fake-cciss.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-fake-cciss.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-fake-hpsa.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-fake-hpsa.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-fake-scsi-mod.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-fake-scsi-mod.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-foo-a.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-foo-a.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-foo-b.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-foo-b.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-foo-c.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-foo-c.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-foo.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-foo.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-loop-a.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-loop-a.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-loop-b.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-loop-b.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-loop-c.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-loop-c.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-loop-d.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-loop-d.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-loop-e.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-loop-e.ko
vendored
Normal file
Binary file not shown.
BIN
testsuite/module-playground/cache/mod-simple.ko
vendored
Normal file
BIN
testsuite/module-playground/cache/mod-simple.ko
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user