Patchwork [RFC] kdbus: add git version

login
register
mail settings
Submitter Koen Kooi
Date Jan. 20, 2014, 4:40 p.m.
Message ID <1390236004-18570-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/65281/
State New
Headers show

Comments

Koen Kooi - Jan. 20, 2014, 4:40 p.m.
This builds the kernel portion of the kdbus implementation. Userspace support needs systemd git and/or a special glib-2.0 branch.

Due to the use of task_cgroup_path() a 3.11.x or newer kernel is needed.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-core/dbus/kdbus_git.bb |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 meta/recipes-core/dbus/kdbus_git.bb
Ross Burton - Jan. 20, 2014, 4:49 p.m.
On 20 January 2014 16:40, Koen Kooi <koen@dominion.thruhere.net> wrote:
> This builds the kernel portion of the kdbus implementation. Userspace support needs systemd git and/or a special glib-2.0 branch.

As awesome as kdbus could be it's very much fresh code, can this live
outside of oe-core for now?

Great to see it though, presumably you'll be making recipes for
systemd/glib?  For what it's worth you might find
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/gtk3git&id=fc7c87f1f038f7b816318e2102ecb1c67ec50065
useful for the glib part after changing SRCREV (been meaning to send
that in for ages).

Ross
Martin Jansa - Jan. 20, 2014, 4:57 p.m.
On Mon, Jan 20, 2014 at 04:49:29PM +0000, Burton, Ross wrote:
> On 20 January 2014 16:40, Koen Kooi <koen@dominion.thruhere.net> wrote:
> > This builds the kernel portion of the kdbus implementation. Userspace support needs systemd git and/or a special glib-2.0 branch.
> 
> As awesome as kdbus could be it's very much fresh code, can this live
> outside of oe-core for now?

FWIW: it will be welcome with new systemd version in meta-openembedded/meta-systemd

Only disadvantage of it will be that current DEFAULT_PREFERENCE behavior
doesn't allow to demote this "experimental" version. So people using
meta-systemd will always get this one unless they set PREFERRED_VERSION
to version in oe-core.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=2964

> Great to see it though, presumably you'll be making recipes for
> systemd/glib?  For what it's worth you might find
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/gtk3git&id=fc7c87f1f038f7b816318e2102ecb1c67ec50065
> useful for the glib part after changing SRCREV (been meaning to send
> that in for ages).
> 
> Ross
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Paul Eggleton - Jan. 20, 2014, 5:09 p.m.
On Monday 20 January 2014 17:57:27 Martin Jansa wrote:
> On Mon, Jan 20, 2014 at 04:49:29PM +0000, Burton, Ross wrote:
> > On 20 January 2014 16:40, Koen Kooi <koen@dominion.thruhere.net> wrote:
> > > This builds the kernel portion of the kdbus implementation. Userspace
> > > support needs systemd git and/or a special glib-2.0 branch.> 
> > As awesome as kdbus could be it's very much fresh code, can this live
> > outside of oe-core for now?
> 
> FWIW: it will be welcome with new systemd version in
> meta-openembedded/meta-systemd
> 
> Only disadvantage of it will be that current DEFAULT_PREFERENCE behavior
> doesn't allow to demote this "experimental" version. So people using
> meta-systemd will always get this one unless they set PREFERRED_VERSION
> to version in oe-core.
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=2964

Surely then the better answer would be to use a different layer, rather than 
mixing all three of "legacy" RPROVIDES/RREPLACES/RCONFLICTS, additional 
systemd support not yet integrated into OE-Core (WIP) and the bleeding edge 
components we're now discussing?

Cheers,
Paul
Martin Jansa - Jan. 20, 2014, 5:36 p.m.
On Mon, Jan 20, 2014 at 05:09:05PM +0000, Paul Eggleton wrote:
> On Monday 20 January 2014 17:57:27 Martin Jansa wrote:
> > On Mon, Jan 20, 2014 at 04:49:29PM +0000, Burton, Ross wrote:
> > > On 20 January 2014 16:40, Koen Kooi <koen@dominion.thruhere.net> wrote:
> > > > This builds the kernel portion of the kdbus implementation. Userspace
> > > > support needs systemd git and/or a special glib-2.0 branch.> 
> > > As awesome as kdbus could be it's very much fresh code, can this live
> > > outside of oe-core for now?
> > 
> > FWIW: it will be welcome with new systemd version in
> > meta-openembedded/meta-systemd
> > 
> > Only disadvantage of it will be that current DEFAULT_PREFERENCE behavior
> > doesn't allow to demote this "experimental" version. So people using
> > meta-systemd will always get this one unless they set PREFERRED_VERSION
> > to version in oe-core.
> > 
> > https://bugzilla.yoctoproject.org/show_bug.cgi?id=2964
> 
> Surely then the better answer would be to use a different layer, rather than 
> mixing all three of "legacy" RPROVIDES/RREPLACES/RCONFLICTS, additional 
> systemd support not yet integrated into OE-Core (WIP) and the bleeding edge 
> components we're now discussing?

In ideal world there should be some variable which says that the recipe
isn't preferred by default (unless explicitly asked for by P_V),
unfortunately DEFAULT_PREFERENCE is already taken.
Koen Kooi - Jan. 20, 2014, 5:38 p.m.
Op 20 jan. 2014, om 17:49 heeft Burton, Ross <ross.burton@intel.com> het volgende geschreven:

> On 20 January 2014 16:40, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> This builds the kernel portion of the kdbus implementation. Userspace support needs systemd git and/or a special glib-2.0 branch.
> 
> As awesome as kdbus could be it's very much fresh code, can this live
> outside of oe-core for now?

Sure. I haven't decided if I want to go all the way and make glib/qt/etc use kdnus natively instead of the systemd compat mode. I only need enough to do a presentation on this at ELC :)

> Great to see it though, presumably you'll be making recipes for
> systemd/glib?  For what it's worth you might find
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/gtk3git&id=fc7c87f1f038f7b816318e2102ecb1c67ec50065
> useful for the glib part after changing SRCREV (been meaning to send
> that in for ages).

I'm waiting for systemd 209 to get released which will have the needed bits, I'm testing locally with a systemd_git.bb recipe. It's very nice to be able to drop connman and dbus-daemon for small images.

regards,

Koen

Patch

diff --git a/meta/recipes-core/dbus/kdbus_git.bb b/meta/recipes-core/dbus/kdbus_git.bb
new file mode 100644
index 0000000..327901d
--- /dev/null
+++ b/meta/recipes-core/dbus/kdbus_git.bb
@@ -0,0 +1,22 @@ 
+SUMMARY = "Kernel 'dbus-like' code for the Linux kernel"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://bus.c;beginline=7;endline=10;md5=7d4e724c14885945ad54d05f469f6d0b"
+
+inherit module
+
+PV = "0.0"
+
+SRCREV = "cc55ddf6e5ab685a991fa587c0c7539cc2b95cdf"
+SRC_URI = "git://github.com/gregkh/kdbus.git;protocol=https"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_DIR}"
+
+# there's no modules_install target and the install target uses 'uname -r', so install the module manually
+# '/lib/modules/${KERNEL_VERSION}' is lifted straight from module-strip.bbclass
+do_install() {
+	install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/kdbus
+	install -m0644 kdbus.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/kdbus
+}