summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/vboxguestdrivers
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2015-03-02 08:10:22 +0100
committerMartin Jansa <Martin.Jansa@gmail.com>2015-03-06 07:33:40 +0100
commit5fffea1646b7a3db5c4a35b9b5fcc0ddadb63496 (patch)
tree58e6cd55f89ecc83353e2748012def946d7801f4 /meta-oe/recipes-support/vboxguestdrivers
parent308aeec34f79282691e1add962f79810e2374401 (diff)
downloadmeta-openembedded-5fffea1646b7a3db5c4a35b9b5fcc0ddadb63496.tar.gz
vboxguestdrivers: import recipe from meta-luneos
* useful to run our qemu* builds inside VirtualBox Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/vboxguestdrivers')
-rw-r--r--meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils43
-rw-r--r--meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_4.3.22.bb65
2 files changed, 108 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils
new file mode 100644
index 000000000..3749b95ad
--- /dev/null
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils
@@ -0,0 +1,43 @@
1## -----------------------------------------------------------------------
2##
3## Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
4##
5## This program is free software; you can redistribute it and/or modify
6## it under the terms of the GNU General Public License as published by
7## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8## Boston MA 02111-1307, USA; either version 2 of the License, or
9## (at your option) any later version; incorporated herein by reference.
10##
11## -----------------------------------------------------------------------
12
13INCLUDES = -I. -I../vboxsf
14CFLAGS = ${INCLUDES}
15LDFLAGS =
16
17SRCS = mount.vboxsf.c \
18 vbsfmount.c
19
20OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
21
22.SUFFIXES: .c .o .i .s .S
23
24
25all: mount.vboxsf
26
27clean:
28 -rm -f *.o mount.vboxsf
29
30spotless: clean
31 -rm -f *~
32
33mount.vboxsf: $(OBJS)
34 $(CC) $(LDFLAGS) -o $@ $^
35
36%.o: %.c
37 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
38%.i: %.c
39 $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
40%.s: %.c
41 $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
42
43-include .*.d *.tmp
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_4.3.22.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_4.3.22.bb
new file mode 100644
index 000000000..46a7be17a
--- /dev/null
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_4.3.22.bb
@@ -0,0 +1,65 @@
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"
17SRC_URI[md5sum] = "fc21ecc1044dc13cd6c6b601823c6df3"
18SRC_URI[sha256sum] = "0d41e044589d3371f765a98ddc071d9cf9788289f72b7efbb5db64f5488c8eba"
19
20S = "${WORKDIR}/vbox_module"
21
22export BUILD_TARGET_ARCH="${ARCH}"
23export BUILD_TARGET_ARCH_x86-64="amd64"
24export KERN_DIR="${STAGING_KERNEL_DIR}"
25
26addtask export_sources before do_patch after do_unpack
27
28do_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
42do_compile_append() {
43 oe_runmake -C ${S}/utils
44}
45
46module_do_install() {
47 MODULE_DIR=${D}${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
54do_install_append() {
55 install -d ${D}${base_sbindir}
56 install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir}
57}
58
59PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
60RRECOMMENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
61
62FILES_${PN} = "${base_sbindir}"
63
64# autoload if installed
65KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo"