diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2015-03-02 08:10:22 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-03-06 07:33:40 +0100 |
commit | 5fffea1646b7a3db5c4a35b9b5fcc0ddadb63496 (patch) | |
tree | 58e6cd55f89ecc83353e2748012def946d7801f4 | |
parent | 308aeec34f79282691e1add962f79810e2374401 (diff) | |
download | meta-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>
-rw-r--r-- | meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils | 43 | ||||
-rw-r--r-- | meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_4.3.22.bb | 65 |
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 | |||
13 | INCLUDES = -I. -I../vboxsf | ||
14 | CFLAGS = ${INCLUDES} | ||
15 | LDFLAGS = | ||
16 | |||
17 | SRCS = mount.vboxsf.c \ | ||
18 | vbsfmount.c | ||
19 | |||
20 | OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS))) | ||
21 | |||
22 | .SUFFIXES: .c .o .i .s .S | ||
23 | |||
24 | |||
25 | all: mount.vboxsf | ||
26 | |||
27 | clean: | ||
28 | -rm -f *.o mount.vboxsf | ||
29 | |||
30 | spotless: clean | ||
31 | -rm -f *~ | ||
32 | |||
33 | mount.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 @@ | |||
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] = "fc21ecc1044dc13cd6c6b601823c6df3" | ||
18 | SRC_URI[sha256sum] = "0d41e044589d3371f765a98ddc071d9cf9788289f72b7efbb5db64f5488c8eba" | ||
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 -C ${S}/utils | ||
44 | } | ||
45 | |||
46 | module_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 | |||
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" | ||