Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow volatility profile building from custom sources #839

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 17 additions & 3 deletions tools/linux/Makefile
@@ -1,15 +1,29 @@
obj-m += module.o
KDIR ?= /
KVER ?= $(shell uname -r)
KDIR ?= /lib/modules/$(KVER)/build
PREFIX ?= /

# Example
# Make module for currently running kernel:
# make
#
# Make module for other kernel installed locally.
# make KVER=3.10.0-862.14.4.el7.x86_64
#
# Make module for kernel which is not installed, but are installed kernel headers from kernel-devel
# make KVER=3.10.0-862.14.4.el7.x86_64 KDIR=/usr/src/kernels/3.10.0-862.14.4.el7.x86_64
#
# Make module for custom kernel source
# make KVER=6.1.0-orion KDIR=/home/example/src/kernel-6.1.0
#

-include version.mk

all: dwarf

dwarf: module.c
$(MAKE) -C $(KDIR)/lib/modules/$(KVER)/build CONFIG_DEBUG_INFO=y M="$(PWD)" modules
$(MAKE) V=1 -C $(KDIR) CONFIG_DEBUG_INFO=y M="$(PWD)" modules
dwarfdump -di module.ko > module.dwarf
$(MAKE) -C $(KDIR)/lib/modules/$(KVER)/build M="$(PWD)" clean

clean:
$(MAKE) -C $(KDIR)/lib/modules/$(KVER)/build M="$(PWD)" clean
Expand Down