WireGuard Archive on lore.kernel.org
 help / color / 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	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makefile: rework kernel version logic
  2019-08-21  3:52 [PATCH] Makefile: rework kernel version logic Mikkmar
@ 2019-08-27 22:56 ` Jason A. Donenfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Jason A. Donenfeld @ 2019-08-27 22:56 UTC (permalink / raw)
  To: Mikkmar; +Cc: WireGuard mailing list

This patch doesn't apply. Can you resubmit using git-send-email?
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: [PATCH] Makefile: rework kernel version logic
  2019-08-28 13:01 Mikk
@ 2019-08-28 13:42 ` Jason A. Donenfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Jason A. Donenfeld @ 2019-08-28 13:42 UTC (permalink / raw)
  To: Mikk; +Cc: WireGuard mailing list

Merged as: https://git.zx2c4.com/WireGuard/commit/?id=dcca03f27879701d7377109517176a3aae86619f

Every place else uses KERNELRELEASE, so I've changed the variable to that.

Thanks for the patch.

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

^ permalink raw reply	[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	[flat|nested] 4+ messages in thread

end of thread, back to index

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

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox