summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.2.bb
diff options
context:
space:
mode:
authorGianfranco Costamagna <locutusofborg@debian.org>2025-09-16 11:06:54 +0200
committerKhem Raj <raj.khem@gmail.com>2025-09-16 09:59:14 -0700
commit1f35112e6f4072d0d860d555526290a832ca9394 (patch)
treef272067a63cb5dc58080e4c2b6d80225cc58bfe9 /meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.2.bb
parent997e47c59063306bf3174c6099d59206f00fd512 (diff)
downloadmeta-openembedded-1f35112e6f4072d0d860d555526290a832ca9394.tar.gz
vboxguestdrivers: Upgrade to 7.2.2
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org> Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.2.bb')
-rw-r--r--meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.2.bb91
1 files changed, 91 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.2.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.2.bb
new file mode 100644
index 0000000000..9b01964334
--- /dev/null
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.2.bb
@@ -0,0 +1,91 @@
1SUMMARY = "VirtualBox Linux Guest Drivers"
2SECTION = "core"
3LICENSE = "GPL-3.0-only"
4LIC_FILES_CHKSUM = "file://${UNPACKDIR}/${VBOX_NAME}/COPYING;md5=217590d3a513571b94632edf5fa1169a"
5
6DEPENDS = "virtual/kernel"
7
8inherit module kernel-module-split
9
10COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm64)"
11
12VBOX_NAME = "VirtualBox-${PV}"
13
14SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \
15 file://Makefile.utils \
16"
17SRC_URI[sha256sum] = "b0e63bfb855327aecf1122cda33390c33734e5ffed72f123f5edf786a8ce1393"
18
19S ?= "${UNPACKDIR}/vbox_module"
20S:task-unpack = "${UNPACKDIR}/${VBOX_NAME}"
21S:task-patch = "${UNPACKDIR}/${BP}"
22
23export VBOX_KBUILD_TARGET_ARCH = "${ARCH}"
24export VBOX_KBUILD_TARGET_ARCH:x86-64 = "amd64"
25
26EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KBUILD_VERBOSE=1 CC='${CC} ${DEBUG_PREFIX_MAP} -ffile-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}'"
27
28# otherwise 5.2.22 builds just vboxguest
29MAKE_TARGETS = "all"
30
31addtask export_sources before do_patch after do_unpack
32do_export_sources[depends] += "virtual/kernel:do_shared_workdir"
33
34do_export_sources() {
35 mkdir -p "${S}"
36 ${UNPACKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules.sh ${T}/vbox_modules.tar.gz
37 tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz
38
39 # add a mount utility to use shared folder from VBox Addition Source Code
40 mkdir -p "${S}/utils"
41 install ${UNPACKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils
42 install ${UNPACKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils
43 install ${UNPACKDIR}/Makefile.utils ${S}/utils/Makefile
44
45 # some kernel versions have issues with stdarg.h and compatibility with
46 # the sysroot and libc-headers/uapi. If we include the file directly from
47 # the kernel source (STAGING_KERNEL_DIR) we get conflicting types on many
48 # structures, due to kernel .h files being found before libc .h files.
49 # if we grab just this one file from the source, and put it into our
50 # file structure, everything holds together
51 mkdir -p ${S}/vboxsf/include/linux
52 install ${STAGING_KERNEL_DIR}/include/linux/stdarg.h ${S}/vboxsf/include/linux
53}
54
55do_configure:prepend() {
56 # 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.
57 # vboxguestdrivers/5.2.6-r0/vbox_module/vboxguest/Makefile.include.header:108: *** The kernel build folder path must end in <version>/build, or the variable KERN_VER must be set. Stop.
58 mkdir -p ${WORKDIR}/${KERNEL_VERSION}
59 ln -snf ${STAGING_KERNEL_DIR} ${WORKDIR}/${KERNEL_VERSION}/build
60}
61
62# compile and install mount utility
63do_compile() {
64 oe_runmake all
65 oe_runmake 'LD=${CC}' 'EXTRA_CFLAGS=-I${STAGING_KERNEL_BUILDDIR}/include/' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils
66 if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then
67 echo "ERROR: One of vbox*.ko modules wasn't built"
68 exit 1
69 fi
70}
71
72module_do_install() {
73 MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc
74 install -d $MODULE_DIR
75 install -m 644 vboxguest.ko $MODULE_DIR
76 install -m 644 vboxsf.ko $MODULE_DIR
77 install -m 644 vboxvideo.ko $MODULE_DIR
78}
79
80do_install:append() {
81 install -d ${D}${base_sbindir}
82 install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir}
83}
84
85PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
86RRECOMMENDS:${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
87
88FILES:${PN} = "${base_sbindir}"
89
90# autoload if installed
91KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo"