wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: rework kernel version logic
@ 2019-08-21  3:52 Mikkmar
  2019-08-27 22:56 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Mikkmar @ 2019-08-21  3:52 UTC (permalink / raw)
  To: wireguard

From 9a959c2a542d3c7f584e26dca2673dd7dd1ef8fb Mon Sep 17 00:00:00 2001
From: Mikk <mikkmar@airmail.cc>
Date: Wed, 21 Aug 2019 06:48:02 +0300
Subject: [PATCH] Makefile: rework kernel version logic

This makes depmod actually work when building/installing the module for
a kernel other than the currently running one

Signed-off-by: Mikk <mikkmar@airmail.cc>
---
 src/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 24b2ba0..d0d6c4d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,8 @@
 #
 # Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All
Rights Reserved.

-KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+KVER ?= $(shell uname -r)
+KERNELDIR ?= /lib/modules/$(KVER)/build
 PREFIX ?= /usr
 DESTDIR ?=
 SRCDIR ?= $(PREFIX)/src
@@ -45,7 +46,7 @@ clean:

 module-install:
 	@$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
-	$(DEPMOD) -a
+	$(DEPMOD) -a $(KVER)

 install: module-install tools-install

-- 
2.23.0

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] Makefile: rework kernel version logic
@ 2019-08-28 13:01 Mikk
  2019-08-28 13:42 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Mikk @ 2019-08-28 13:01 UTC (permalink / raw)
  To: wireguard

This makes depmod actually work when building/installing the module for a kernel other than the currently running one

Signed-off-by: Mikk <mikkmar@airmail.cc>
---
 src/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 24b2ba0..d0d6c4d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,8 @@
 #
 # Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
 
-KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+KVER ?= $(shell uname -r)
+KERNELDIR ?= /lib/modules/$(KVER)/build
 PREFIX ?= /usr
 DESTDIR ?=
 SRCDIR ?= $(PREFIX)/src
@@ -45,7 +46,7 @@ clean:
 
 module-install:
 	@$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
-	$(DEPMOD) -a
+	$(DEPMOD) -a $(KVER)
 
 install: module-install tools-install
 
-- 
2.23.0

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-28 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21  3:52 [PATCH] Makefile: rework kernel version logic Mikkmar
2019-08-27 22:56 ` Jason A. Donenfeld
2019-08-28 13:01 Mikk
2019-08-28 13:42 ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).