From b7ec500f46972e296c0830980397cae29d3f6969 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Wed, 18 Oct 2023 13:14:11 +0200 Subject: vbxguestdrivers: upgrade 7.0.10 -> 7.0.12 Signed-off-by: Gianfranco Costamagna Signed-off-by: Gianfranco Costamagna Signed-off-by: Khem Raj --- .../0001-vbox_fb-fix-kernel-v6.5-build.patch | 50 ------------ .../vboxguestdrivers/vboxguestdrivers_7.0.10.bb | 92 ---------------------- .../vboxguestdrivers/vboxguestdrivers_7.0.12.bb | 91 +++++++++++++++++++++ 3 files changed, 91 insertions(+), 142 deletions(-) delete mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-vbox_fb-fix-kernel-v6.5-build.patch delete mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.10.bb create mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.12.bb (limited to 'meta-oe/recipes-support') diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-vbox_fb-fix-kernel-v6.5-build.patch b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-vbox_fb-fix-kernel-v6.5-build.patch deleted file mode 100644 index 01969d4a11..0000000000 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-vbox_fb-fix-kernel-v6.5-build.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 4cf34517b0c793405dca154cc70c9b5d1a566a8a Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield -Date: Fri, 29 Sep 2023 14:52:50 -0400 -Subject: [PATCH] vbox_fb: fix kernel v6.5 build - -When building against the 6.5 kernel (and kernel headers), the following -build error is encountered: - - | vboxguestdrivers/7.0.10/vboxguestdrivers-7.0.10/vboxvideo/vbox_fb.c:194:24: error: 'drm_fb_helper_sys_fillrect' undeclared here (not in a function); did you mean 'drm_fb_helper_lastclose'? - | 194 | .fb_fillrect = drm_fb_helper_sys_fillrect, - | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ - | | drm_fb_helper_lastclose - | vboxguestdrivers/7.0.10/vboxguestdrivers-7.0.10/vboxvideo/vbox_fb.c:195:24: error: 'drm_fb_helper_sys_copyarea' undeclared here (not in a function); did you mean 'drm_fb_helper_set_par'? - | 195 | .fb_copyarea = drm_fb_helper_sys_copyarea, - | | ^~~~~~~~~~~~~~~~~~~~~~~~~~ - | | drm_fb_helper_set_par - | vboxguestdrivers/7.0.10/vboxguestdrivers-7.0.10/vboxvideo/vbox_fb.c:196:25: error: 'drm_fb_helper_sys_imageblit' undeclared here (not in a function) - | 196 | .fb_imageblit = drm_fb_helper_sys_imageblit, - | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ - -We backport a patch from vbox-dev to fix the issue. - -Upstream-Status: Submitted [https://www.mail-archive.com/vbox-dev@virtualbox.org/msg10129.html] - -Signed-off-by: Bruce Ashfield ---- - src/VBox/Additions/linux/drm/vbox_fb.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/VBox/Additions/linux/drm/vbox_fb.c b/src/VBox/Additions/linux/drm/vbox_fb.c -index 2a8c79ab..d453533c 100644 ---- a/src/VBox/Additions/linux/drm/vbox_fb.c -+++ b/src/VBox/Additions/linux/drm/vbox_fb.c -@@ -196,9 +196,13 @@ static struct fb_ops vboxfb_ops = { - .owner = THIS_MODULE, - .fb_check_var = drm_fb_helper_check_var, - .fb_set_par = drm_fb_helper_set_par, -+#if RTLNX_VER_MIN(6, 5, 0) -+ FB_DEFAULT_SYS_OPS, -+#else - .fb_fillrect = drm_fb_helper_sys_fillrect, - .fb_copyarea = drm_fb_helper_sys_copyarea, - .fb_imageblit = drm_fb_helper_sys_imageblit, -+#endif - .fb_pan_display = drm_fb_helper_pan_display, - .fb_blank = drm_fb_helper_blank, - .fb_setcmap = drm_fb_helper_setcmap, --- -2.34.1 - diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.10.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.10.bb deleted file mode 100644 index 8e90138244..0000000000 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.10.bb +++ /dev/null @@ -1,92 +0,0 @@ -SUMMARY = "VirtualBox Linux Guest Drivers" -SECTION = "core" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=fff5fe1c81dd6dc3d522e7862e44881e" - -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 \ - file://0001-vbox_fb-fix-kernel-v6.5-build.patch \ -" - -SRC_URI[sha256sum] = "0b1e6d8b7f87d017c7fae37f80586acff04f799ffc1d51e995954d6415dee371" - -S ?= "${WORKDIR}/vbox_module" -S:task-patch = "${WORKDIR}/${VBOX_NAME}" - -export VBOX_KBUILD_TARGET_ARCH="${ARCH}" -export VBOX_KBUILD_TARGET_ARCH:x86-64="amd64" - -EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KBUILD_VERBOSE=1" - -# otherwise 5.2.22 builds just vboxguest -MAKE_TARGETS = "all" - -addtask export_sources after do_patch before do_configure -do_export_sources[depends] += "virtual/kernel:do_shared_workdir" - -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 - - # some kernel versions have issues with stdarg.h and compatibility with - # the sysroot and libc-headers/uapi. If we include the file directly from - # the kernel source (STAGING_KERNEL_DIR) we get conflicting types on many - # structures, due to kernel .h files being found before libc .h files. - # if we grab just this one file from the source, and put it into our - # file structure, everything holds together - mkdir -p ${S}/vboxsf/include/linux - install ${STAGING_KERNEL_DIR}/include/linux/stdarg.h ${S}/vboxsf/include/linux -} - -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() { - oe_runmake all - oe_runmake 'LD=${CC}' 'EXTRA_CFLAGS=-I${STAGING_KERNEL_BUILDDIR}/include/' '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_7.0.12.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.12.bb new file mode 100644 index 0000000000..5574cdb2a4 --- /dev/null +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.0.12.bb @@ -0,0 +1,91 @@ +SUMMARY = "VirtualBox Linux Guest Drivers" +SECTION = "core" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=fff5fe1c81dd6dc3d522e7862e44881e" + +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[sha256sum] = "d76634c6ccf62503726a5aeae6c78a3462474c51a0ebe4942591ccc2d939890a" + +S ?= "${WORKDIR}/vbox_module" +S:task-patch = "${WORKDIR}/${VBOX_NAME}" + +export VBOX_KBUILD_TARGET_ARCH="${ARCH}" +export VBOX_KBUILD_TARGET_ARCH:x86-64="amd64" + +EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KBUILD_VERBOSE=1" + +# otherwise 5.2.22 builds just vboxguest +MAKE_TARGETS = "all" + +addtask export_sources after do_patch before do_configure +do_export_sources[depends] += "virtual/kernel:do_shared_workdir" + +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 + + # some kernel versions have issues with stdarg.h and compatibility with + # the sysroot and libc-headers/uapi. If we include the file directly from + # the kernel source (STAGING_KERNEL_DIR) we get conflicting types on many + # structures, due to kernel .h files being found before libc .h files. + # if we grab just this one file from the source, and put it into our + # file structure, everything holds together + mkdir -p ${S}/vboxsf/include/linux + install ${STAGING_KERNEL_DIR}/include/linux/stdarg.h ${S}/vboxsf/include/linux +} + +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() { + oe_runmake all + oe_runmake 'LD=${CC}' 'EXTRA_CFLAGS=-I${STAGING_KERNEL_BUILDDIR}/include/' '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 v1.2.3-54-g00ecf