From 6d2624125fb91e152e0de7c0c2b5141dee23c5c0 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 2 Mar 2018 00:42:08 +0000 Subject: vboxguestdrivers: upgrade to 5.2.8 * 5.1.26 doesn't build with 4.15 kernel Signed-off-by: Martin Jansa Signed-off-by: Armin Kuster --- .../linux-4.15.0-rc8-VBoxGuestAdditions-amd64.diff | 90 ---------------------- .../vboxguestdrivers/vboxguestdrivers_5.2.6.bb | 81 ------------------- .../vboxguestdrivers/vboxguestdrivers_5.2.8.bb | 78 +++++++++++++++++++ 3 files changed, 78 insertions(+), 171 deletions(-) delete mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/linux-4.15.0-rc8-VBoxGuestAdditions-amd64.diff delete mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.6.bb create mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/linux-4.15.0-rc8-VBoxGuestAdditions-amd64.diff b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/linux-4.15.0-rc8-VBoxGuestAdditions-amd64.diff deleted file mode 100644 index 23a9021f04..0000000000 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/linux-4.15.0-rc8-VBoxGuestAdditions-amd64.diff +++ /dev/null @@ -1,90 +0,0 @@ -Based on: -https://raw.githubusercontent.com/mjmaravillo/misc/master/linux-4.15.0-rc8-VBoxGuestAdditions-amd64.diff - -Upstream-Status: Pending (hopefully new vbox will be released soon with proper 4.15 support, this patch isn't backwards compatible) - ---- vbox_module.orig/vboxvideo/vbox_mode.c 2018-02-18 16:42:47.000000000 +0000 -+++ vbox_module/vboxvideo/vbox_mode.c 2018-02-18 16:55:14.466029313 +0000 -@@ -396,7 +396,7 @@ - - /* pick the encoder ids */ - if (enc_id) -- return drm_encoder_find(connector->dev, enc_id); -+ return drm_encoder_find(connector->dev, NULL, enc_id); - - return NULL; - } ---- vbox_module.orig/vboxguest/VBoxGuest-linux.c 2018-02-18 16:42:28.000000000 +0000 -+++ vbox_module/vboxguest/VBoxGuest-linux.c 2018-02-18 16:54:36.793049118 +0000 -@@ -1058,7 +1058,7 @@ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) - - /** log and dbg_log parameter setter. */ --static int vgdrvLinuxParamLogGrpSet(const char *pszValue, struct kernel_param *pParam) -+static int vgdrvLinuxParamLogGrpSet(const char *pszValue, const struct kernel_param *pParam) - { - if (g_fLoggerCreated) - { -@@ -1073,7 +1073,7 @@ - } - - /** log and dbg_log parameter getter. */ --static int vgdrvLinuxParamLogGrpGet(char *pszBuf, struct kernel_param *pParam) -+static int vgdrvLinuxParamLogGrpGet(char *pszBuf, const struct kernel_param *pParam) - { - PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance(); - *pszBuf = '\0'; -@@ -1084,7 +1084,7 @@ - - - /** log and dbg_log_flags parameter setter. */ --static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, struct kernel_param *pParam) -+static int vgdrvLinuxParamLogFlagsSet(const char *pszValue, const struct kernel_param *pParam) - { - if (g_fLoggerCreated) - { -@@ -1098,7 +1098,7 @@ - } - - /** log and dbg_log_flags parameter getter. */ --static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, struct kernel_param *pParam) -+static int vgdrvLinuxParamLogFlagsGet(char *pszBuf, const struct kernel_param *pParam) - { - PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance(); - *pszBuf = '\0'; -@@ -1109,7 +1109,7 @@ - - - /** log and dbg_log_dest parameter setter. */ --static int vgdrvLinuxParamLogDstSet(const char *pszValue, struct kernel_param *pParam) -+static int vgdrvLinuxParamLogDstSet(const char *pszValue, const struct kernel_param *pParam) - { - if (g_fLoggerCreated) - { -@@ -1123,7 +1123,7 @@ - } - - /** log and dbg_log_dest parameter getter. */ --static int vgdrvLinuxParamLogDstGet(char *pszBuf, struct kernel_param *pParam) -+static int vgdrvLinuxParamLogDstGet(char *pszBuf, const struct kernel_param *pParam) - { - PRTLOGGER pLogger = pParam->name[0] == 'd' ? RTLogDefaultInstance() : RTLogRelGetDefaultInstance(); - *pszBuf = '\0'; -@@ -1134,7 +1134,7 @@ - - - /** r3_log_to_host parameter setter. */ --static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, struct kernel_param *pParam) -+static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, const struct kernel_param *pParam) - { - if ( pszValue == NULL - || *pszValue == '\0' -@@ -1152,7 +1152,7 @@ - } - - /** r3_log_to_host parameter getter. */ --static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, struct kernel_param *pParam) -+static int vgdrvLinuxParamR3LogToHostGet(char *pszBuf, const struct kernel_param *pParam) - { - strcpy(pszBuf, g_DevExt.fLoggingEnabled ? "enabled" : "disabled"); - return strlen(pszBuf); diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.6.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.6.bb deleted file mode 100644 index c018b789f2..0000000000 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.6.bb +++ /dev/null @@ -1,81 +0,0 @@ -SUMMARY = "VirtualBox Linux Guest Drivers" -SECTION = "core" -LICENSE = "GPL-2.0" -LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660" - -DEPENDS = "virtual/kernel" - -inherit module kernel-module-split - -COMPATIBLE_MACHINE = "(qemux86|qemux86-64)" - -VBOX_NAME = "VirtualBox-${PV}" - -SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ - file://Makefile.utils \ -" - -# For default linux-yocto 4.15 -SRC_URI += "file://linux-4.15.0-rc8-VBoxGuestAdditions-amd64.diff" - -SRC_URI[md5sum] = "4490d6929dfae41cdf05e34f583318c8" -SRC_URI[sha256sum] = "fe705288ee50efcce10ff4c80e461a1c7091e461a7b55f98842fa1c9772ca4e7" - -S = "${WORKDIR}/vbox_module" - -export BUILD_TARGET_ARCH="${ARCH}" -export BUILD_TARGET_ARCH_x86-64="amd64" - -EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build'" - -addtask export_sources before do_patch after do_unpack - -do_export_sources() { - mkdir -p "${S}" - ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules.sh ${T}/vbox_modules.tar.gz - tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz - - # add a mount utility to use shared folder from VBox Addition Source Code - mkdir -p "${S}/utils" - install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils - install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils - install ${S}/../Makefile.utils ${S}/utils/Makefile - -} - -do_configure_prepend() { - # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:99: *** The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set. Stop. - # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:108: *** The kernel build folder path must end in /build, or the variable KERN_VER must be set. Stop. - mkdir -p ${WORKDIR}/${KERNEL_VERSION} - ln -snf ${STAGING_KERNEL_DIR} ${WORKDIR}/${KERNEL_VERSION}/build -} - -# compile and install mount utility -do_compile_append() { - oe_runmake 'LD=${CC}' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils - if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then - echo "ERROR: One of vbox*.ko modules wasn't built" - exit 1 - fi -} - -module_do_install() { - MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc - install -d $MODULE_DIR - install -m 644 vboxguest.ko $MODULE_DIR - install -m 644 vboxsf.ko $MODULE_DIR - install -m 644 vboxvideo.ko $MODULE_DIR -} - -do_install_append() { - install -d ${D}${base_sbindir} - install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir} -} - -PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" -RRECOMMENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" - -FILES_${PN} = "${base_sbindir}" - -# autoload if installed -KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo" diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb new file mode 100644 index 0000000000..e00db4d7e0 --- /dev/null +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb @@ -0,0 +1,78 @@ +SUMMARY = "VirtualBox Linux Guest Drivers" +SECTION = "core" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660" + +DEPENDS = "virtual/kernel" + +inherit module kernel-module-split + +COMPATIBLE_MACHINE = "(qemux86|qemux86-64)" + +VBOX_NAME = "VirtualBox-${PV}" + +SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ + file://Makefile.utils \ +" + +SRC_URI[md5sum] = "e731ea9c5c31096ec4c2a3bfba26665c" +SRC_URI[sha256sum] = "ee2759d47b0b4ac81b8b671c9485c87fb2db12c097b3e7e69b94c1291a8084e8" + +S = "${WORKDIR}/vbox_module" + +export BUILD_TARGET_ARCH="${ARCH}" +export BUILD_TARGET_ARCH_x86-64="amd64" + +EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build'" + +addtask export_sources before do_patch after do_unpack + +do_export_sources() { + mkdir -p "${S}" + ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules.sh ${T}/vbox_modules.tar.gz + tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz + + # add a mount utility to use shared folder from VBox Addition Source Code + mkdir -p "${S}/utils" + install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils + install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils + install ${S}/../Makefile.utils ${S}/utils/Makefile + +} + +do_configure_prepend() { + # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:99: *** The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set. Stop. + # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:108: *** The kernel build folder path must end in /build, or the variable KERN_VER must be set. Stop. + mkdir -p ${WORKDIR}/${KERNEL_VERSION} + ln -snf ${STAGING_KERNEL_DIR} ${WORKDIR}/${KERNEL_VERSION}/build +} + +# compile and install mount utility +do_compile_append() { + oe_runmake 'LD=${CC}' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils + if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then + echo "ERROR: One of vbox*.ko modules wasn't built" + exit 1 + fi +} + +module_do_install() { + MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc + install -d $MODULE_DIR + install -m 644 vboxguest.ko $MODULE_DIR + install -m 644 vboxsf.ko $MODULE_DIR + install -m 644 vboxvideo.ko $MODULE_DIR +} + +do_install_append() { + install -d ${D}${base_sbindir} + install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir} +} + +PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" +RRECOMMENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" + +FILES_${PN} = "${base_sbindir}" + +# autoload if installed +KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo" -- cgit 1.2.3-korg