Skip to content

Commit 298e2c0

Browse files
jmltp@loplof.deevgeni
authored andcommitted
Allow build of modules for not-running kernel versions
The current Makefile always sets KVER and some other variables to the version of the currently running kernel and does not allow overriding this value. So installing a newer kernel and building and installing the modules for the new version will not work before activation of the new kernel. With this patch, the following can be done: export KVER=<newly-installed-kernel-version> echo "Kernel version to build for: $KVER" export MOD_DIR=/lib/modules/${KVER}/extra/ KVER=${KVER} MOD_DIR=${MOD_DIR} HDAPS=1 make Signed-off-by: Joerg Mayer <jmayer@loplof.de>
1 parent 72d23ff commit 298e2c0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ifndef TP_MODULES
22
# This part runs as a normal, top-level Makefile:
33
X:=$(shell false)
4-
KVER := $(shell uname -r)
5-
KBASE := /lib/modules/$(KVER)
6-
KSRC := $(KBASE)/source
7-
KBUILD := $(KBASE)/build
8-
MOD_DIR := $(KBASE)/kernel
4+
KVER ?= $(shell uname -r)
5+
KBASE ?= /lib/modules/$(KVER)
6+
KSRC ?= $(KBASE)/source
7+
KBUILD ?= $(KBASE)/build
8+
MOD_DIR ?= $(KBASE)/kernel
99
PWD := $(shell pwd)
1010
IDIR := include/linux
1111
TP_DIR := drivers/platform/x86

0 commit comments

Comments
 (0)