2020-03-13 17:44:14 +01:00
|
|
|
Index: VirtualBox-6.1.4/src/VBox/HostDrivers/linux/Makefile
|
2019-12-19 06:12:48 +01:00
|
|
|
===================================================================
|
2020-03-13 17:44:14 +01:00
|
|
|
--- VirtualBox-6.1.4.orig/src/VBox/HostDrivers/linux/Makefile
|
|
|
|
+++ VirtualBox-6.1.4/src/VBox/HostDrivers/linux/Makefile
|
2020-01-20 21:15:41 +01:00
|
|
|
@@ -35,9 +35,6 @@ endif
|
|
|
|
ifneq ($(wildcard $(CURDIR)/vboxnetadp/Makefile),)
|
|
|
|
obj-m += vboxnetadp/
|
|
|
|
endif
|
|
|
|
-ifneq ($(wildcard $(CURDIR)/vboxpci/Makefile),)
|
|
|
|
- obj-m += vboxpci/
|
|
|
|
-endif
|
|
|
|
|
|
|
|
else # ! KERNELRELEASE
|
|
|
|
|
|
|
|
@@ -45,10 +42,11 @@ else # ! KERNELRELEASE
|
2019-12-19 06:12:48 +01:00
|
|
|
|
|
|
|
KBUILD_VERBOSE ?=
|
|
|
|
KERN_VER ?= $(shell uname -r)
|
2020-01-20 21:15:41 +01:00
|
|
|
-.PHONY: all install clean check unload load vboxdrv vboxnetflt vboxnetadp \
|
|
|
|
- vboxpci
|
2019-12-19 06:12:48 +01:00
|
|
|
+PWD ?= $(shell pwd)
|
|
|
|
+
|
2020-01-20 21:15:41 +01:00
|
|
|
+.PHONY: all install clean check unload load vboxdrv vboxnetflt vboxnetadp
|
|
|
|
|
|
|
|
-all: vboxdrv vboxnetflt vboxnetadp vboxpci
|
|
|
|
+all: vboxdrv vboxnetflt vboxnetadp
|
2019-12-19 06:12:48 +01:00
|
|
|
|
2020-01-20 21:15:41 +01:00
|
|
|
# We want to build on Linux 2.6.18 and later kernels.
|
|
|
|
ifneq ($(filter-out 1.% 2.0.% 2.1.% 2.2.% 2.3.% 2.4.% 2.5.%,$(KERN_VER)),)
|
|
|
|
@@ -64,6 +62,7 @@ vboxnetflt: vboxdrv
|
2019-12-19 06:12:48 +01:00
|
|
|
if [ -f vboxdrv/Module.symvers ]; then \
|
|
|
|
cp vboxdrv/Module.symvers vboxnetflt; \
|
|
|
|
fi; \
|
|
|
|
+ export KBUILD_EXTRA_SYMBOLS=${PWD}/vboxnetflt/Module.symvers; \
|
|
|
|
echo "=== Building 'vboxnetflt' module ==="; \
|
2020-03-13 17:44:14 +01:00
|
|
|
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) KBUILD_EXTRA_SYMBOLS=$(abspath vboxnetflt/Module.symvers) -C vboxnetflt || exit 1; \
|
2019-12-19 06:12:48 +01:00
|
|
|
cp vboxnetflt/vboxnetflt.ko .; \
|
2020-01-20 21:15:41 +01:00
|
|
|
@@ -75,41 +74,29 @@ vboxnetadp: vboxdrv
|
2019-12-19 06:12:48 +01:00
|
|
|
if [ -f vboxdrv/Module.symvers ]; then \
|
|
|
|
cp vboxdrv/Module.symvers vboxnetadp; \
|
|
|
|
fi; \
|
|
|
|
+ export KBUILD_EXTRA_SYMBOLS=${PWD}/vboxnetadp/Module.symvers; \
|
|
|
|
echo "=== Building 'vboxnetadp' module ==="; \
|
2020-03-13 17:44:14 +01:00
|
|
|
- $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) KBUILD_EXTRA_SYMBOLS=$(abspath vboxnetadp/Module.symvers) -C vboxnetadp || exit 1; \
|
|
|
|
+ $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) KBUILD_EXTRA_SYMBOLS=$(abspath vboxpci/Module.symvers) -C vboxnetadp || exit 1; \
|
2019-12-19 06:12:48 +01:00
|
|
|
cp vboxnetadp/vboxnetadp.ko .; \
|
|
|
|
echo; \
|
|
|
|
fi
|
2020-01-20 21:15:41 +01:00
|
|
|
|
|
|
|
-vboxpci: vboxdrv
|
|
|
|
- @if [ -d vboxpci ]; then \
|
|
|
|
- if [ -f vboxdrv/Module.symvers ]; then \
|
|
|
|
- cp vboxdrv/Module.symvers vboxpci; \
|
|
|
|
- fi; \
|
|
|
|
- echo "=== Building 'vboxpci' module ==="; \
|
2020-03-13 17:44:14 +01:00
|
|
|
- $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) KBUILD_EXTRA_SYMBOLS=$(abspath vboxpci/Module.symvers) -C vboxpci || exit 1; \
|
2020-01-20 21:15:41 +01:00
|
|
|
- cp vboxpci/vboxpci.ko .; \
|
|
|
|
- echo; \
|
|
|
|
- fi
|
|
|
|
-
|
2019-12-19 06:12:48 +01:00
|
|
|
install:
|
|
|
|
@$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxdrv install
|
|
|
|
@if [ -d vboxnetflt ]; then \
|
|
|
|
+ export KBUILD_EXTRA_SYMBOLS=${PWD}/vboxnetflt/Module.symvers; \
|
|
|
|
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetflt install; \
|
|
|
|
fi
|
|
|
|
@if [ -d vboxnetadp ]; then \
|
|
|
|
+ export KBUILD_EXTRA_SYMBOLS=${PWD}/vboxnetadp/Module.symvers; \
|
|
|
|
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetadp install; \
|
|
|
|
fi
|
2020-01-20 21:15:41 +01:00
|
|
|
- @if [ -d vboxpci ]; then \
|
|
|
|
- $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxpci install; \
|
|
|
|
- fi
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
vboxdrv:
|
|
|
|
vboxnetflt:
|
|
|
|
vboxnetadp:
|
|
|
|
-vboxpci:
|
|
|
|
install:
|
|
|
|
|
|
|
|
endif
|
|
|
|
@@ -122,16 +109,13 @@ clean:
|
|
|
|
@if [ -d vboxnetadp ]; then \
|
|
|
|
$(MAKE) -C vboxnetadp clean; \
|
2019-12-19 06:12:48 +01:00
|
|
|
fi
|
2020-01-20 21:15:41 +01:00
|
|
|
- @if [ -d vboxpci ]; then \
|
|
|
|
- $(MAKE) -C vboxpci clean; \
|
|
|
|
- fi
|
|
|
|
- rm -f vboxdrv.ko vboxnetflt.ko vboxnetadp.ko vboxpci.ko
|
|
|
|
+ rm -f vboxdrv.ko vboxnetflt.ko vboxnetadp.ko
|
|
|
|
|
|
|
|
check:
|
|
|
|
@$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxdrv check
|
|
|
|
|
|
|
|
unload:
|
|
|
|
- @for module in vboxpci vboxnetadp vboxnetflt vboxdrv; do \
|
|
|
|
+ @for module in vboxnetadp vboxnetflt vboxdrv; do \
|
|
|
|
if grep "^$$module " /proc/modules >/dev/null; then \
|
|
|
|
echo "Removing previously installed $$module module"; \
|
|
|
|
/sbin/rmmod $$module; \
|
|
|
|
@@ -139,7 +123,7 @@ unload:
|
|
|
|
done
|
|
|
|
|
|
|
|
load: unload
|
|
|
|
- @for module in vboxdrv vboxnetflt vboxnetadp vboxpci; do \
|
|
|
|
+ @for module in vboxdrv vboxnetflt vboxnetadp; do \
|
|
|
|
if test -f $$module.ko; then \
|
|
|
|
echo "Installing $$module module"; \
|
|
|
|
/sbin/insmod $$module.ko; \
|
2020-03-13 17:44:14 +01:00
|
|
|
Index: VirtualBox-6.1.4/src/VBox/Additions/linux/Makefile
|
2020-01-20 21:15:41 +01:00
|
|
|
===================================================================
|
2020-03-13 17:44:14 +01:00
|
|
|
--- VirtualBox-6.1.4.orig/src/VBox/Additions/linux/Makefile
|
|
|
|
+++ VirtualBox-6.1.4/src/VBox/Additions/linux/Makefile
|
2020-01-20 21:15:41 +01:00
|
|
|
@@ -24,6 +24,7 @@ obj-m = vboxguest/ vboxsf/ vboxvideo/
|
|
|
|
else # ! KERNELRELEASE
|
|
|
|
|
|
|
|
KBUILD_VERBOSE =
|
|
|
|
+PWD ?= $(shell pwd)
|
|
|
|
ifeq ($(KBUILD_VERBOSE),)
|
|
|
|
VBOX_QUIET := @
|
|
|
|
VBOX_QUIET_SH := @
|
|
|
|
@@ -49,6 +50,7 @@ vboxsf: vboxguest
|
|
|
|
if [ -f vboxguest/Module.symvers ]; then \
|
|
|
|
cp vboxguest/Module.symvers vboxsf; \
|
|
|
|
fi; \
|
|
|
|
+ export KBUILD_EXTRA_SYMBOLS=${PWD}/vboxsf/Module.symvers; \
|
|
|
|
echo "=== Building 'vboxsf' module ==="; \
|
|
|
|
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) KBUILD_EXTRA_SYMBOLS=$(abspath vboxsf/Module.symvers) -C vboxsf || exit 1; \
|
|
|
|
if [ -f vboxsf/vboxsf.ko ]; then \
|
|
|
|
@@ -64,6 +66,7 @@ vboxvideo:
|
|
|
|
if [ -f vboxguest/Module.symvers ]; then \
|
|
|
|
cp vboxguest/Module.symvers vboxvideo; \
|
|
|
|
fi; \
|
|
|
|
+ export KBUILD_EXTRA_SYMBOLS=${PWD}/vboxvideo/Module.symvers; \
|
|
|
|
echo "=== Building 'vboxvideo' module ==="; \
|
|
|
|
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) KBUILD_EXTRA_SYMBOLS=$(abspath vboxvideo/Module.symvers) -C vboxvideo || exit 1; \
|
|
|
|
if [ -f vboxvideo/vboxvideo.ko ]; then \
|
|
|
|
@@ -77,9 +80,11 @@ vboxvideo:
|
|
|
|
install:
|
|
|
|
$(VBOX_QUIET)$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest install
|
|
|
|
$(VBOX_QUIET_SH)if [ -d vboxsf ]; then \
|
|
|
|
+ export KBUILD_EXTRA_SYMBOLS=${PWD}/vboxsf/Module.symvers; \
|
|
|
|
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxsf install; \
|
|
|
|
fi
|
|
|
|
$(VBOX_QUIET_SH)if [ -d vboxvideo ]; then \
|
|
|
|
+ export KBUILD_EXTRA_SYMBOLS=${PWD}/vboxvideo/Module.symvers; \
|
|
|
|
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvideo install; \
|
|
|
|
fi
|
|
|
|
|