Hello,Attached there are two patches to get the D-Bus daemon working on the PXA270.
First, there are some modifications to the dbus.make file ('dbus.make.diff'), particularly the install section is affected. In the original, the daemon was not copied to the target root. Also the dbus-monitor, dbus-send and dbus-uuidgen in the 'tools/' directory are only wrapper scripts. The binaries itself are located in 'tools/.libs'. Further I've fixed some typos in the symlinks pointing to libdbus.
Second, there's a patch to the source (which is included in a patch for the 'ptxdist-trunk/patches/dbus-0.94/generic' directory ('patches-dbus-0.94.diff'), so it can be applied automatically using 'ptxdist'). This patch modifies the 'system.conf.in' template in the 'bus/' source directory. I'm not sure if these modifications are appropriate. I'm not sure about my assumptions, but here some thougts (I'm not really familiar with D-Bus yet):
* As OSELAS only knows the user root(?), the bus is run as root * Services dir directive according to [1] * The rest seems feasible to meI agree with point 1) of [1], that we only need a system bus in an embedded system. What do others think about that? Maybe we could add a configuration option to the ptxdist config. I've only taken a look at the system bus config so far, I think the session bus config needs some patching too. I did not do any tests with the session bus!
With the supplied patches, the build should work with 'ptxdist go' (it did for me).
Steps to get D-Bus running (once it is compiled):* Create the following directories: '/etc/dbus-1/system.d', '/var/run/dbus', '/tmp/services'. The latter two directories must be created after every reboot, as they are inside a ramdisk.
* Launch D-Bus with 'dbus-daemon --system' * Use bus (e.g. using 'dbus-monitor --system') Known issues: * Per-session bus is not tested and unlikely to work * Manual creation of directories is nasty* Please note: the whole thing is not tested out-and-out, so if you find any discrepancies, let us know.
I hope to be able to contribute some more patches for configuration (dbus.in) and an init script to get rid of the recreation of the above directories soon.
Regards, Roland [1] http://lists.freedesktop.org/archives/dbus/2005-October/003526.html
--- dbus.make.orig 2006-10-19 18:39:58.000000000 +0200 +++ dbus.make 2006-10-19 22:05:46.000000000 +0200 @@ -63,9 +63,9 @@ # # autoconf # -DBUS_AUTOCONF := \ - $(CROSS_AUTOCONF_USR) \ - --enable-abstract-sockets=yes +DBUS_AUTOCONF := $(CROSS_AUTOCONF_USR) \ + --enable-abstract-sockets=yes \ + --localstatedir=/var $(STATEDIR)/dbus.prepare: $(dbus_prepare_deps_default) @$(call targetinfo, $@) @@ -115,27 +115,19 @@ @$(call install_fixup,dbus,DEPENDS,) @$(call install_fixup,dbus,DESCRIPTION,missing) - @$(call install_copy, dbus, 0, 0, 0644, \ - $(DBUS_DIR)/dbus/.libs/libdbus-1.so.3.2.0, \ - /usr/lib/libdbus-1.so.3.2.0) - @$(call install_link, dbus, libdbus-1.so.3.2.0, /usr/lib/libdbos-1.so.3) - @$(call install_link, dbus, libdbus-1.so.3.2.0, /usr/lib/libdbos-1.so) - - @$(call install_copy, dbus, 0, 0, 0755, \ - $(DBUS_DIR)/tools/dbus-send, \ - /usr/bin/dbus-send) - - @$(call install_copy, dbus, 0, 0, 0755, \ - $(DBUS_DIR)/tools/dbus-launch, \ - /usr/bin/dbus-launch) - - @$(call install_copy, dbus, 0, 0, 0755, \ - $(DBUS_DIR)/tools/dbus-cleanup-sockets, \ - /usr/bin/dbus-cleanup-sockets) - - @$(call install_copy, dbus, 0, 0, 0755, \ - $(DBUS_DIR)/tools/dbus-uuidgen, \ - /usr/bin/dbus-uuidgen) + @$(call install_copy, dbus, 0, 0, 0755, $(DBUS_DIR)/bus/dbus-daemon, /usr/bin/dbus-daemon) + @$(call install_copy, dbus, 0, 0, 0755, $(DBUS_DIR)/tools/dbus-cleanup-sockets, /usr/bin/dbus-cleanup-sockets) + @$(call install_copy, dbus, 0, 0, 0755, $(DBUS_DIR)/tools/dbus-launch, /usr/bin/dbus-launch) + @$(call install_copy, dbus, 0, 0, 0755, $(DBUS_DIR)/tools/.libs/dbus-monitor, /usr/bin/dbus-monitor) + @$(call install_copy, dbus, 0, 0, 0755, $(DBUS_DIR)/tools/.libs/dbus-send, /usr/bin/dbus-send) + @$(call install_copy, dbus, 0, 0, 0755, $(DBUS_DIR)/tools/.libs/dbus-uuidgen, /usr/bin/dbus-uuidgen) + + @$(call install_copy, dbus, 0, 0, 0644, $(DBUS_DIR)/dbus/.libs/libdbus-1.so.3.2.0, /usr/lib/libdbus-1.so.3.2.0) + @$(call install_link, dbus, libdbus-1.so.3.2.0, /usr/lib/libdbus-1.so.3) + @$(call install_link, dbus, libdbus-1.so.3.2.0, /usr/lib/libdbus-1.so) + + @$(call install_copy, dbus, 0, 0, 0644, $(DBUS_DIR)/bus/system.conf, /etc/dbus-1/system.conf) + @$(call install_copy, dbus, 0, 0, 0644, $(DBUS_DIR)/bus/session.conf, /etc/dbus-1/session.conf) @$(call install_finish,dbus)
diff -Nur generic.orig/dbus-0.94-config.diff generic/dbus-0.94-config.diff --- generic.orig/dbus-0.94-config.diff 1970-01-01 01:00:00.000000000 +0100 +++ generic/dbus-0.94-config.diff 2006-10-19 22:09:30.000000000 +0200 @@ -0,0 +1,40 @@ +diff -Nur dbus-0.94.orig/bus/system.conf.in dbus-0.94/bus/system.conf.in +--- dbus-0.94.orig/bus/system.conf.in 2006-08-03 22:34:36.000000000 +0200 ++++ dbus-0.94/bus/system.conf.in 2006-10-19 21:50:24.000000000 +0200 +@@ -1,11 +1,4 @@ +-<!-- This configuration file controls the systemwide message bus. +- Add a system-local.conf and edit that rather than changing this +- file directly. --> +- +-<!-- Note that there are any number of ways you can hose yourself +- security-wise by screwing up this file; in particular, you +- probably don't want to listen on any more addresses, add any more +- auth mechanisms, run as a different user, etc. --> ++<!-- This configuration file controls the systemwide message bus. --> + + <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +@@ -14,8 +7,8 @@ + <!-- Our well-known bus type, do not change this --> + <type>system</type> + +- <!-- Run as special user --> +- <user>@DBUS_USER@</user> ++ <!-- Run as root (as OSELAS has only root) --> ++ <user>root</user> + + <!-- Fork into daemon mode --> + <fork/> +@@ -53,10 +46,8 @@ + holes in the above policy for specific services. --> + <includedir>system.d</includedir> + +- <!-- This is included last so local configuration can override what's +- in this standard file --> +- <include ignore_missing="yes">system-local.conf</include> +- + <include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include> + ++ <!-- .service files are placed here --> ++ <servicedir>@DBUS_SESSION_SOCKET_DIR@/services</servicedir> + </busconfig> diff -Nur generic.orig/series generic/series --- generic.orig/series 2006-10-19 18:37:13.000000000 +0200 +++ generic/series 2006-10-19 22:13:42.000000000 +0200 @@ -1,2 +1,3 @@ dbus-0.94-abstract-sockets.diff dbus-0.94-reconf.diff.bz2 +dbus-0.94-config.diff
pgpj4TFO2BUHb.pgp
Description: PGP signature
-- ptxdist mailing list [email protected]
