All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] vboxguestdrivers: import recipe from meta-luneos
@ 2015-03-02  8:02 Martin Jansa
  2015-03-02 10:22 ` Koen Kooi
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2015-03-02  8:02 UTC (permalink / raw)
  To: openembedded-devel

* useful to run our qemu* builds inside VirtualBox

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../vboxguestdrivers/Makefile.utils                | 43 ++++++++++++++
 .../vboxguestdrivers/vboxguestdrivers_4.3.22.bb    | 65 ++++++++++++++++++++++
 2 files changed, 108 insertions(+)
 create mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils
 create mode 100644 meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_4.3.22.bb

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 0000000..3749b95
--- /dev/null
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/Makefile.utils
@@ -0,0 +1,43 @@
+## -----------------------------------------------------------------------
+##
+##   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
+##
+##   This program is free software; you can redistribute it and/or modify
+##   it under the terms of the GNU General Public License as published by
+##   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+##   Boston MA 02111-1307, USA; either version 2 of the License, or
+##   (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+INCLUDES = -I. -I../vboxsf
+CFLAGS	 = ${INCLUDES}
+LDFLAGS	 =
+
+SRCS     = mount.vboxsf.c \
+           vbsfmount.c
+
+OBJS	 = $(patsubst %.c,%.o,$(notdir $(SRCS)))
+
+.SUFFIXES: .c .o .i .s .S
+
+
+all: mount.vboxsf
+
+clean:
+	-rm -f *.o mount.vboxsf
+
+spotless: clean
+	-rm -f *~
+
+mount.vboxsf: $(OBJS)
+	$(CC) $(LDFLAGS) -o $@ $^
+
+%.o: %.c
+	$(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
+%.i: %.c
+	$(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
+%.s: %.c
+	$(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
+
+-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 0000000..0e12ea7
--- /dev/null
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_4.3.22.bb
@@ -0,0 +1,65 @@
+SUMMARY = "VirtualBox Linux Guest Drivers"
+SECTION = "core"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/${VBOX_NAME}/COPYING;md5=e197d5641bb35b29d46ca8c4bf7f2660"
+
+DEPENDS = "virtual/kernel"
+
+inherit module kernel-module-split
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64)"
+
+VBOX_NAME = "VirtualBox-${PV}"
+
+SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \
+           file://Makefile.utils \
+"
+SRC_URI[md5sum] = "fc21ecc1044dc13cd6c6b601823c6df3"
+SRC_URI[sha256sum] = "0d41e044589d3371f765a98ddc071d9cf9788289f72b7efbb5db64f5488c8eba"
+
+S = "${WORKDIR}/vbox_module"
+
+export BUILD_TARGET_ARCH="${ARCH}"
+export BUILD_TARGET_ARCH_x86-64="amd64"
+export KERN_DIR="${STAGING_KERNEL_DIR}"
+
+addtask export_sources before do_patch after do_unpack
+
+do_export_sources() {
+    mkdir -p "${S}"
+    ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/export_modules ${T}/vbox_modules.tar.gz
+    tar -C "${S}" -xzf ${T}/vbox_modules.tar.gz
+
+    # add a mount utility to use shared folder from VBox Addition Source Code
+    mkdir -p "${S}/utils"
+    install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c ${S}/utils
+    install ${WORKDIR}/${VBOX_NAME}/src/VBox/Additions/linux/sharedfolders/vbsfmount.c ${S}/utils
+    install ${S}/../Makefile.utils ${S}/utils/Makefile
+
+}
+
+# compile and install mount utility
+do_compile_append() {
+    oe_runmake -C ${S}/utils
+}
+
+module_do_install() {
+    MODULE_DIR=${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/misc
+    install -d $MODULE_DIR
+    install -m 644 vboxguest.ko $MODULE_DIR
+    install -m 644 vboxsf.ko $MODULE_DIR
+    install -m 644 vboxvideo.ko $MODULE_DIR
+}
+
+do_install_append() {
+    install -d ${D}${base_sbindir}
+    install -m 755 ${S}/utils/mount.vboxsf ${D}${base_sbindir}
+}
+
+PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
+RDEPENDS_${PN} += "kernel-module-vboxguest kernel-module-vboxsf kernel-module-vboxvideo"
+
+FILES_${PN} = "${base_sbindir}"
+
+# autoload if installed
+KERNEL_MODULE_AUTOLOAD += "vboxguest vboxsf vboxvideo"
-- 
2.3.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] vboxguestdrivers: import recipe from meta-luneos
  2015-03-02  8:02 [meta-oe][PATCH] vboxguestdrivers: import recipe from meta-luneos Martin Jansa
@ 2015-03-02 10:22 ` Koen Kooi
  2015-03-02 10:26   ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2015-03-02 10:22 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Jansa schreef op 02-03-15 om 09:02:
> * useful to run our qemu* builds inside VirtualBox
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- 
> .../vboxguestdrivers/Makefile.utils                | 43 ++++++++++++++ 
> .../vboxguestdrivers/vboxguestdrivers_4.3.22.bb    | 65
> ++++++++++++++++++++++

> +PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf
> kernel-module-vboxvideo" +RDEPENDS_${PN} += "kernel-module-vboxguest
> kernel-module-vboxsf kernel-module-vboxvideo"

Please don't ever RDEPEND on kernel modules, even when the recipe will build
them, it sets a bad precedent.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFU9DnmMkyGM64RGpERAu+jAJ92mQgg4UU7QBoaClZcMsh7Bd/8+wCggBRt
iXq6vplV1z4aJMxG2xY9+nk=
=SREn
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] vboxguestdrivers: import recipe from meta-luneos
  2015-03-02 10:22 ` Koen Kooi
@ 2015-03-02 10:26   ` Martin Jansa
  2015-03-02 10:55     ` Florian Boor
  2015-03-03  9:19     ` Koen Kooi
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Jansa @ 2015-03-02 10:26 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

On Mon, Mar 02, 2015 at 11:22:30AM +0100, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Martin Jansa schreef op 02-03-15 om 09:02:
> > * useful to run our qemu* builds inside VirtualBox
> > 
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- 
> > .../vboxguestdrivers/Makefile.utils                | 43 ++++++++++++++ 
> > .../vboxguestdrivers/vboxguestdrivers_4.3.22.bb    | 65
> > ++++++++++++++++++++++
> 
> > +PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf
> > kernel-module-vboxvideo" +RDEPENDS_${PN} += "kernel-module-vboxguest
> > kernel-module-vboxsf kernel-module-vboxvideo"
> 
> Please don't ever RDEPEND on kernel modules, even when the recipe will build
> them, it sets a bad precedent.

I think it makes sense in this case.. nobody will ever include them in
kernel image and vboxguestdrivers utils don't make much sense without
the modules installed.

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> 
> iD8DBQFU9DnmMkyGM64RGpERAu+jAJ92mQgg4UU7QBoaClZcMsh7Bd/8+wCggBRt
> iXq6vplV1z4aJMxG2xY9+nk=
> =SREn
> -----END PGP SIGNATURE-----
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] vboxguestdrivers: import recipe from meta-luneos
  2015-03-02 10:26   ` Martin Jansa
@ 2015-03-02 10:55     ` Florian Boor
  2015-03-02 11:33       ` Martin Jansa
  2015-03-03  9:19     ` Koen Kooi
  1 sibling, 1 reply; 6+ messages in thread
From: Florian Boor @ 2015-03-02 10:55 UTC (permalink / raw)
  To: openembedded-devel

Hi,

On 02.03.2015 11:26, Martin Jansa wrote:
>> Please don't ever RDEPEND on kernel modules, even when the recipe will 
>> build them, it sets a bad precedent.

> I think it makes sense in this case.. nobody will ever include them in 
> kernel image and vboxguestdrivers utils don't make much sense without the 
> modules installed.

I see its unlikely but in some cases (e.g. highly secure environments) you do
not want to use modules at all. So unless there is a real need to depend on
the modules I would just recommend it.

Greetings

Florian

-- 
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        florian.boor@kernelconcepts.de
                                        http://www.kernelconcepts.de/en


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] vboxguestdrivers: import recipe from meta-luneos
  2015-03-02 10:55     ` Florian Boor
@ 2015-03-02 11:33       ` Martin Jansa
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2015-03-02 11:33 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

On Mon, Mar 02, 2015 at 11:55:54AM +0100, Florian Boor wrote:
> Hi,
> 
> On 02.03.2015 11:26, Martin Jansa wrote:
> >> Please don't ever RDEPEND on kernel modules, even when the recipe will 
> >> build them, it sets a bad precedent.
> 
> > I think it makes sense in this case.. nobody will ever include them in 
> > kernel image and vboxguestdrivers utils don't make much sense without the 
> > modules installed.
> 
> I see its unlikely but in some cases (e.g. highly secure environments) you do
> not want to use modules at all. So unless there is a real need to depend on
> the modules I would just recommend it.

In such environment you won't be installing vboxguestdrivers package, right?

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [meta-oe][PATCH] vboxguestdrivers: import recipe from meta-luneos
  2015-03-02 10:26   ` Martin Jansa
  2015-03-02 10:55     ` Florian Boor
@ 2015-03-03  9:19     ` Koen Kooi
  1 sibling, 0 replies; 6+ messages in thread
From: Koen Kooi @ 2015-03-03  9:19 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Jansa schreef op 02-03-15 om 11:26:
> On Mon, Mar 02, 2015 at 11:22:30AM +0100, Koen Kooi wrote: Martin Jansa
> schreef op 02-03-15 om 09:02:
>>>> * useful to run our qemu* builds inside VirtualBox
>>>> 
>>>> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- 
>>>> .../vboxguestdrivers/Makefile.utils                | 43
>>>> ++++++++++++++ .../vboxguestdrivers/vboxguestdrivers_4.3.22.bb    |
>>>> 65 ++++++++++++++++++++++
> 
>>>> +PACKAGES += "kernel-module-vboxguest kernel-module-vboxsf 
>>>> kernel-module-vboxvideo" +RDEPENDS_${PN} +=
>>>> "kernel-module-vboxguest kernel-module-vboxsf
>>>> kernel-module-vboxvideo"
> 
> Please don't ever RDEPEND on kernel modules, even when the recipe will
> build them, it sets a bad precedent.
> 
>> I think it makes sense in this case.. nobody will ever include them in 
>> kernel image and vboxguestdrivers utils don't make much sense without 
>> the modules installed.

I agree completely with that, my objection is setting a bad precedent that
people will copy/paste into other recipes.
I see v2 has RRECOMMENDS, thank you for changing it.

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFU9XykMkyGM64RGpERAtp/AJ9/M6P16FGCn/EvTXEWCygoon+NHACfWKPA
j0bXmjsmVkWxKsJ+e5Ulaog=
=H4No
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-03  9:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-02  8:02 [meta-oe][PATCH] vboxguestdrivers: import recipe from meta-luneos Martin Jansa
2015-03-02 10:22 ` Koen Kooi
2015-03-02 10:26   ` Martin Jansa
2015-03-02 10:55     ` Florian Boor
2015-03-02 11:33       ` Martin Jansa
2015-03-03  9:19     ` Koen Kooi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.