kmod/testsuite/module-playground
Lucas De Marchi aa9f6d89e7 build: Fix KDIR again
KDIR is not related to the what we configure in kmod's build. It's only
used in kmod to locate where the distro's kernel source/headers is,
which may be different from what we are configuring the (under
development) kmod with.

Remove the setting from meson/autotools and figure it out inside the
module-playground Makefile what should be used. For advanced use cases,
KDIR= can be passed to override the location.

For our own tests, which includes testing with a different module_directory,
scripts/setup-rootfs.sh will copy the module to the desired location
according to the map defined in the script.

Fixes: 27ff727326 ("testsuite: correct the default KDIR")
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/125
2024-09-11 14:39:10 -05:00
..
.gitignore testsuite: temporary drop cross compilation test, remove binaries 2024-09-02 20:12:33 -05:00
dummy.pkcs7 testsuite: add modinfo pkcs7 signature test 2019-02-04 13:49:13 -08:00
dummy.sha1 testsuite: port signature-check modules to module-playground 2015-02-21 15:51:42 -02:00
dummy.sha256 testsuite: port signature-check modules to module-playground 2015-02-21 15:51:42 -02:00
Kbuild testsuite: split-out Kbuild from Makefile 2024-09-02 20:12:33 -05:00
Makefile build: Fix KDIR again 2024-09-11 14:39:10 -05:00
Makefile.arch module-playground: allow to cross-compile modules 2015-02-21 11:40:27 -02:00
mod-fake-cciss.c testsuite: port modules-order-compressed to module-playground 2015-02-19 19:50:16 -02:00
mod-fake-hpsa.c testsuite: port modules-order-compressed to module-playground 2015-02-19 19:50:16 -02:00
mod-fake-scsi-mod.c testsuite: Fix warnings due to -Wmissing-prototypes 2024-04-29 16:20:30 -05:00
mod-foo-a.c testsuite: Fix warnings due to -Wmissing-prototypes 2024-04-29 16:20:30 -05:00
mod-foo-b.c testsuite: Fix warnings due to -Wmissing-prototypes 2024-04-29 16:20:30 -05:00
mod-foo-c.c testsuite: Fix warnings due to -Wmissing-prototypes 2024-04-29 16:20:30 -05:00
mod-foo.c testsuite: port test-dependencies to module-playground 2015-02-03 01:12:13 -02:00
mod-loop-a.c testsuite: depmod: add module dependency outside cyclic chain 2016-11-08 22:28:40 -02:00
mod-loop-b.c testsuite: depmod: add module dependency outside cyclic chain 2016-11-08 22:28:40 -02:00
mod-loop-c.c testsuite: port detect-loop test to module-playground 2015-02-09 14:07:31 -02:00
mod-loop-d.c testsuite: port detect-loop test to module-playground 2015-02-09 14:07:31 -02:00
mod-loop-e.c testsuite: port detect-loop test to module-playground 2015-02-09 14:07:31 -02:00
mod-loop-f.c testsuite: depmod: add module dependency outside cyclic chain 2016-11-08 22:28:40 -02:00
mod-loop-g.c testsuite: depmod: add module dependency outside cyclic chain 2016-11-08 22:28:40 -02:00
mod-loop-h.c testsuite: depmod: check netsted loops reporting 2017-02-22 04:50:22 -08:00
mod-loop-i.c testsuite: depmod: check netsted loops reporting 2017-02-22 04:50:22 -08:00
mod-loop-j.c testsuite: depmod: check netsted loops reporting 2017-02-22 04:50:22 -08:00
mod-loop-k.c testsuite: depmod: check netsted loops reporting 2017-02-22 04:50:22 -08:00
mod-loop.h testsuite: depmod: check netsted loops reporting 2017-02-22 04:50:22 -08:00
mod-simple.c module-playground: Add debugfs entry in mod-simple 2022-06-26 23:23:46 -07:00
mod-weakdep.c testsuite: add tests for weak dependencies 2024-06-14 14:16:17 -05:00
README testsuite: leave arch-specific modules in tree 2015-02-21 15:05:25 -02:00

Pre-compiled modules
====================

Some modules are pre-compiled due to needing cross-compilers present on the
build/dev machine which is inconvenient. Makefile is ready to compile them again
in case they are missing:

1) Prepare the linux kernel trees to build external modules, i.e.:

   kernel $ make ARCH=<arch> CROSS_COMPILER=<cross-compiler-prefix> defconfig
   kernel $ make ARCH=<arch> CROSS_COMPILER=<cross-compiler-prefix> modules_prepare

   For each architecture. See the Makefile to check which are the supported architectures.

2) Export the variables below to point to the right place:

   KDIR_<arch>:                for each architecture it needs to point to a
                               kernel tree configured as in (1)

   CROSS_COMPILER_<arch:       for each architecture it needs to point to the
			       correct toolchain prefix. Leave it blank if a
			       cross-compiler is not needed (example: you are
			       building a 32b module with a multilib compiler).


3) Remove every %-<arch>.ko. After this the build system will recreate them.