Commit Graph

4 Commits

Author SHA1 Message Date
Mathias Krause
578fc08b82 memory_driver: Support overriding kernel directory
Support compiling the module against a different kernel version than the
currently running one by allowing to set either KVER or KDIR variables
on the make commandline.

Also modernize the makefile slightly and make use of the kernel's
'clean' target to ensure to remove all generated files.

Signed-off-by: Mathias Krause <minipli@grsecurity.net>
2023-10-10 13:35:33 +09:00
Mathias Krause
3c44056efe memory_driver: Ensure PWD points to the current directory
Building crash.ko broke in commit 74ac929712 ("Support for multiple
jobs to build crash"), as PWD won't be updated on recursive calls to
'make' and will still point to the upper directory.

This leads to the 'all' target trying to build modules in the top level
directory -- where there are none.

Fix that by updating PWD to the current directory.

Fixes: 74ac929712 ("Support for multiple jobs to build crash")
Reported-by: Lianbo Jiang <lijiang@redhat.com>
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
2023-10-10 13:35:33 +09:00
Kazuhito Hagio
cf42161624 memory_driver: Fix memory driver module build with Linux 5.4 and later
With Linux 5.4 and later kernels that contain commit
7e35b42591c058b91282f95ce3b2cf0c05ffe93d ("kbuild: remove SUBDIRS
support"), "make" command in the memory_driver directory doesn't
build crash memory driver module as expected.  Add "M=" to fix.

Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
2020-11-09 15:25:20 +09:00
Dave Anderson
03e3937ec7 Initial commit: crash-7.0.4 2014-01-28 16:46:11 -05:00