Merge 18f81a253938887b6a5b2e39ca9d31946b272b82 into 25bef4626e6c5ccf5b433e1c22b6b1bd59e6f1bd

This commit is contained in:
Joseph Tingiris 2025-03-03 23:35:04 +00:00 committed by GitHub
commit a9e4e7d631
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,20 @@ else
ifdef SYSSRC
KERNEL_SOURCES := $(SYSSRC)
else
# if it's set then prefer dkms ${kernelvar} over uname -r, error if they don't match
KERNEL_UNAME ?= $(kernelver)
KERNEL_UNAME ?= $(shell uname -r)
ifeq ($(kernelver),)
# kernelver is not set
else
# ensure kernelver matches a (potentially) given KERNEL_UNAME or error
ifeq ($(kernelver),$(KERNEL_UNAME))
$(info KERNEL_UNAME = $(KERNEL_UNAME))
else
$(error KERNEL_UNAME '$(KERNEL_UNAME)' is not equal to dkms kernelver '$(kernelver)')
endif
endif
KERNEL_MODLIB := /lib/modules/$(KERNEL_UNAME)
KERNEL_SOURCES := $(shell ((test -d $(KERNEL_MODLIB)/source && echo $(KERNEL_MODLIB)/source) || (test -d $(KERNEL_MODLIB)/build/source && echo $(KERNEL_MODLIB)/build/source)) || echo $(KERNEL_MODLIB)/build)
endif