diff options
-rw-r--r-- | meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils | 6 | ||||
-rw-r--r-- | meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.4.bb | 65 |
2 files changed, 69 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils index 3749b95ad..495601f08 100644 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils | |||
@@ -10,8 +10,10 @@ | |||
10 | ## | 10 | ## |
11 | ## ----------------------------------------------------------------------- | 11 | ## ----------------------------------------------------------------------- |
12 | 12 | ||
13 | INCLUDES = -I. -I../vboxsf | 13 | INCLUDES = -I. -I../vboxsf -I../vboxsf/include |
14 | CFLAGS = ${INCLUDES} | 14 | MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \ |
15 | -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST_R0 | ||
16 | CFLAGS = ${INCLUDES} ${MOD_DEFS} | ||
15 | LDFLAGS = | 17 | LDFLAGS = |
16 | 18 | ||
17 | SRCS = mount.vboxsf.c \ | 19 | SRCS = mount.vboxsf.c \ |
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.4.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.4.bb new file mode 100644 index 000000000..66068d198 --- /dev/null +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.4.bb | |||
@@ -0,0 +1,65 @@ | |||
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 | SRC_URI[md5sum] = "e25a6a1f3c113c373dc0433f9c2526f3" | ||
18 | SRC_URI[sha256sum] = "b9a14a7771059c55c44b97f8d4eef9bea84544f3e215e0caa563bc35e2f16aaf" | ||
19 | |||
20 | S = "${WORKDIR}/vbox_module" | ||
21 | |||
22 | export BUILD_TARGET_ARCH="${ARCH}" | ||
23 | export BUILD_TARGET_ARCH_x86-64="amd64" | ||
24 | export KERN_DIR="${STAGING_KERNEL_DIR}" | ||
25 | |||
26 | addtask export_sources before do_patch after do_unpack | ||
27 | |||
28 | do_export_sources() { | ||
29 | mkdir -p "${S}" | ||
30 | ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules ${T}/vbox_modules.tar.gz | ||
31 | tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz | ||
32 | |||
33 | # add a mount utility to use shared folder from VBox Addition Source Code | ||
34 | mkdir -p "${S}/utils" | ||
35 | install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils | ||
36 | install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils | ||
37 | install ${S}/../Makefile.utils ${S}/utils/Makefile | ||
38 | |||
39 | } | ||
40 | |||
41 | # compile and install mount utility | ||
42 | do_compile_append() { | ||
43 | oe_runmake 'LD=${CC}' 'LDFLAGS=${LDFLAGS}' -C ${S}/utils | ||
44 | } | ||
45 | |||
46 | module_do_install() { | ||
47 | MODULE_DIR=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/misc | ||
48 | install -d $MODULE_DIR | ||
49 | install -m 644 vboxguest.ko $MODULE_DIR | ||
50 | install -m 644 vboxsf.ko $MODULE_DIR | ||
51 | install -m 644 vboxvideo.ko $MODULE_DIR | ||
52 | } | ||
53 | |||
54 | do_install_append() { | ||
55 | install -d ${D}${base_sbindir} | ||
56 | install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir} | ||
57 | } | ||
58 | |||
59 | PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" | ||
60 | RRECOMMENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo" | ||
61 | |||
62 | FILES_${PN} = "${base_sbindir}" | ||
63 | |||
64 | # autoload if installed | ||
65 | KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo" | ||