virtualbox: 5.1.26 -> 5.2.0

This commit is contained in:
Tim Steinbach
2017-11-15 10:14:44 -05:00
parent 8562538f1f
commit dd53d0f1a0
9 changed files with 246 additions and 56 deletions
@@ -7,6 +7,14 @@ stdenv.mkDerivation {
"fortify" "pic" "stackprotector"
];
patches = [
./fix_kerndir.patch
./fix_kbuild.patch
];
KERN_DIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
INCLUDE_BASE = "${virtualbox.modsrc}";
makeFlags = [
"-C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"INSTALL_MOD_PATH=$(out)"
@@ -0,0 +1,85 @@
diff --git a/vboxdrv/Makefile b/vboxdrv/Makefile
index e262c61..4af8dac 100644
--- a/vboxdrv/Makefile
+++ b/vboxdrv/Makefile
@@ -131,7 +131,7 @@ ifdef VBOX_WITH_NATIVE_DTRACE
MOD_OBJS += SUPDrvDTrace.o
endif
-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
+MOD_INCL = $(addprefix -I$(INCLUDE_BASE)/$(MOD_NAME),/ /include /r0drv/linux)
ifdef VBOX_WITH_NATIVE_DTRACE
MOD_INCL += -I/usr/include/linux -I/usr/include
endif
@@ -157,7 +157,7 @@ ifdef VBOX_WITH_TEXT_MODMEM_HACK
endif
# build defs
-MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h \
+MOD_CFLAGS = -include include/VBox/SUPDrvMangling.h \
-fno-omit-frame-pointer -fno-pie
include $(obj)/Makefile.include.footer
diff --git a/vboxnetadp/Makefile b/vboxnetadp/Makefile
index e262c61..4af8dac 100644
--- a/vboxnetadp/Makefile
+++ b/vboxnetadp/Makefile
@@ -34,7 +34,7 @@ MOD_OBJS += math/gcc/divdi3.o \
math/gcc/umoddi3.o
endif
-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
+MOD_INCL = $(addprefix -I$(INCLUDE_BASE)/$(MOD_NAME),/ /include /r0drv/linux)
MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX \
-DRT_WITH_VBOX -DVBOX_WITH_HARDENING \
-Wno-declaration-after-statement
@@ -59,6 +59,6 @@ ifdef VBOX_USE_INSERT_PAGE
endif
# build defs
-MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
+MOD_CFLAGS = -include include/VBox/SUPDrvMangling.h -fno-pie
include $(obj)/Makefile.include.footer
diff --git a/vboxnetflt/Makefile b/vboxnetflt/Makefile
index e262c61..4af8dac 100644
--- a/vboxnetflt/Makefile
+++ b/vboxnetflt/Makefile
@@ -38,7 +38,7 @@ MOD_OBJS += math/gcc/divdi3.o \
math/gcc/umoddi3.o
endif
-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
+MOD_INCL = $(addprefix -I$(INCLUDE_BASE)/$(MOD_NAME),/ /include /r0drv/linux)
MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
-DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING \
-Wno-declaration-after-statement
@@ -63,6 +63,6 @@ ifdef VBOX_USE_INSERT_PAGE
endif
# build defs
-MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
+MOD_CFLAGS = -include include/VBox/SUPDrvMangling.h -fno-pie
include $(obj)/Makefile.include.footer
diff --git a/vboxpci/Makefile b/vboxpci/Makefile
index e262c61..4af8dac 100644
--- a/vboxpci/Makefile
+++ b/vboxpci/Makefile
@@ -38,7 +38,7 @@ MOD_OBJS += math/gcc/divdi3.o \
math/gcc/umoddi3.o
endif
-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
+MOD_INCL = $(addprefix -I$(INCLUDE_BASE)/$(MOD_NAME),/ /include /r0drv/linux)
MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX \
-DRT_WITH_VBOX -DVBOX_WITH_HARDENING
ifeq ($(BUILD_TARGET_ARCH),amd64)
@@ -60,6 +60,6 @@ ifdef VBOX_USE_INSERT_PAGE
endif
# build defs
-MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
+MOD_CFLAGS = -include include/VBox/SUPDrvMangling.h -fno-pie
include $(obj)/Makefile.include.footer
@@ -0,0 +1,48 @@
diff --git a/vboxdrv/Makefile.include.header b/vboxdrv/Makefile.include.header
index 8df1eb4d25..5a3e5604e7 100644
--- a/vboxdrv/Makefile.include.header
+++ b/vboxdrv/Makefile.include.header
@@ -117,7 +117,6 @@ else # neq($(KERNELRELEASE),)
endif # neq($(KERNELRELEASE),)
# Kernel build folder
-KERN_DIR := /lib/modules/$(KERN_VER)/build
ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
$(error Error: unable to find the headers of the Linux kernel to build against. \
Specify KERN_VER=<version> and run Make again)
diff --git a/vboxnetadp/Makefile.include.header b/vboxnetadp/Makefile.include.header
index 8df1eb4d25..5a3e5604e7 100644
--- a/vboxnetadp/Makefile.include.header
+++ b/vboxnetadp/Makefile.include.header
@@ -117,7 +117,6 @@ else # neq($(KERNELRELEASE),)
endif # neq($(KERNELRELEASE),)
# Kernel build folder
-KERN_DIR := /lib/modules/$(KERN_VER)/build
ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
$(error Error: unable to find the headers of the Linux kernel to build against. \
Specify KERN_VER=<version> and run Make again)
diff --git a/vboxnetflt/Makefile.include.header b/vboxnetflt/Makefile.include.header
index 8df1eb4d25..5a3e5604e7 100644
--- a/vboxnetflt/Makefile.include.header
+++ b/vboxnetflt/Makefile.include.header
@@ -117,7 +117,6 @@ else # neq($(KERNELRELEASE),)
endif # neq($(KERNELRELEASE),)
# Kernel build folder
-KERN_DIR := /lib/modules/$(KERN_VER)/build
ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
$(error Error: unable to find the headers of the Linux kernel to build against. \
Specify KERN_VER=<version> and run Make again)
diff --git a/vboxpci/Makefile.include.header b/vboxpci/Makefile.include.header
index 8df1eb4d25..5a3e5604e7 100644
--- a/vboxpci/Makefile.include.header
+++ b/vboxpci/Makefile.include.header
@@ -117,7 +117,6 @@ else # neq($(KERNELRELEASE),)
endif # neq($(KERNELRELEASE),)
# Kernel build folder
-KERN_DIR := /lib/modules/$(KERN_VER)/build
ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
$(error Error: unable to find the headers of the Linux kernel to build against. \
Specify KERN_VER=<version> and run Make again)