diff options
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.bb | 78 |
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 @@ | |||
1 | SUMMARY = "VirtualBox Linux Guest Drivers" | ||
2 | SECTION = "core" | ||
3 | LICENSE = "GPL-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660" | ||
5 | |||
6 | DEPENDS = "virtual/kernel" | ||
7 | |||
8 | inherit module kernel-module-split | ||
9 | |||
10 | COMPATIBLE_MACHINE = "(qemux86|qemux86-64)" | ||
11 | |||
12 | VBOX_NAME = "VirtualBox-${PV}" | ||
13 | |||
14 | SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ | ||
15 | file://Makefile.utils \ | ||
16 | " | ||
17 | |||
18 | SRC_URI[md5sum] = "e731ea9c5c31096ec4c2a3bfba26665c" | ||
19 | SRC_URI[sha256sum] = "ee2759d47b0b4ac81b8b671c9485c87fb2db12c097b3e7e69b94c1291a8084e8" | ||
20 | |||
21 | S = "${WORKDIR}/vbox_module" | ||
22 | |||
23 | export BUILD_TARGET_ARCH="${ARCH}" | ||
24 | export BUILD_TARGET_ARCH_x86-64="amd64" | ||
25 | |||
26 | EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build'" | ||
27 | |||
28 | addtask export_sources before do_patch after do_unpack | ||
29 | |||
30 | do_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 | |||
43 | do_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 | ||
51 | do_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 | |||
59 | module_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 | |||
67 | do_install_append() { | ||
68 | install -d ${D}${base_sbindir} | ||
69 | install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir} | ||
70 | } | ||
71 | |||
72 | PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" | ||
73 | RRECOMMENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" | ||
74 | |||
75 | FILES_${PN} = "${base_sbindir}" | ||
76 | |||
77 | # autoload if installed | ||
78 | KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo" | ||