summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb')
-rw-r--r--meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb78
1 files changed, 78 insertions, 0 deletions
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 000000000..e00db4d7e
--- /dev/null
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.2.8.bb
@@ -0,0 +1,78 @@
1SUMMARY = "VirtualBox Linux Guest Drivers"
2SECTION = "core"
3LICENSE = "GPL-2.0"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660"
5
6DEPENDS = "virtual/kernel"
7
8inherit module kernel-module-split
9
10COMPATIBLE_MACHINE = "(qemux86|qemux86-64)"
11
12VBOX_NAME = "VirtualBox-${PV}"
13
14SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \
15 file://Makefile.utils \
16"
17
18SRC_URI[md5sum] = "e731ea9c5c31096ec4c2a3bfba26665c"
19SRC_URI[sha256sum] = "ee2759d47b0b4ac81b8b671c9485c87fb2db12c097b3e7e69b94c1291a8084e8"
20
21S = "${WORKDIR}/vbox_module"
22
23export BUILD_TARGET_ARCH="${ARCH}"
24export BUILD_TARGET_ARCH_x86-64="amd64"
25
26EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build'"
27
28addtask export_sources before do_patch after do_unpack
29
30do_export_sources() {
31 mkdir -p "${S}"
32 ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules.sh ${T}/vbox_modules.tar.gz
33 tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz
34
35 # add a mount utility to use shared folder from VBox Addition Source Code
36 mkdir -p "${S}/utils"
37 install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils
38 install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils
39 install ${S}/../Makefile.utils ${S}/utils/Makefile
40
41}
42
43do_configure_prepend() {
44 # 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.
45 # 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.
46 mkdir -p ${WORKDIR}/${KERNEL_VERSION}
47 ln -snf ${STAGING_KERNEL_DIR} ${WORKDIR}/${KERNEL_VERSION}/build
48}
49
50# compile and install mount utility
51do_compile_append() {
52 oe_runmake 'LD=${CC}' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils
53 if ! [ -e vboxguest.ko -a -e vboxsf.ko -a -e vboxvideo.ko ] ; then
54 echo "ERROR: One of vbox*.ko modules wasn't built"
55 exit 1
56 fi
57}
58
59module_do_install() {
60 MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc
61 install -d $MODULE_DIR
62 install -m 644 vboxguest.ko $MODULE_DIR
63 install -m 644 vboxsf.ko $MODULE_DIR
64 install -m 644 vboxvideo.ko $MODULE_DIR
65}
66
67do_install_append() {
68 install -d ${D}${base_sbindir}
69 install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir}
70}
71
72PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
73RRECOMMENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
74
75FILES_${PN} = "${base_sbindir}"
76
77# autoload if installed
78KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo"