Skip to contentSkip to conversation

Split apart qemu-config

RFC PATCH In review Paul Eggleton 2 participants 9 messages Aug 20, 2012

lore
Share & tools
lore
#0 lore raw

cover Split apart qemu-config

*** Note: this is an RFC series, please do not merge yet! ***

Split apart qemu-config, replacing it with a task (task-core-device-devel) that is not specific to usage together with QEMU. oprofileui is now split into client and server parts, and together with the prevous work to merge dbus-launch back into the main dbus package, this makes things work much more smoothly when this task is installed with x11 removed from DISTRO_FEATURES. Additionally it was found that oprofileui was not correctly depending on oprofile itself, and this has also been fixed. (This is a reworking of a patch series I sent out some time ago.)

There is a remaining question however - is this task actually useful? For reference, it enables the following:

1) Use of distcc to accelerate compiling applications within the emulated environment using direct compilation on the host
2) Accessing the root filesystem via NFS
3) Remote profiling via oprofileui
4) Running applications in the target from the Anjuta IDE
5) bash shell

Whilst these might have minor utility on an individual basis, I can't honestly say that that the overall set seems particularly useful to me as a whole; and some of the parts are less useful than they used to be - is oprofile commonly used these days now that tools like perf are available? Is anyone actually using Anjuta for embedded development? For that matter, does anyone regularly build applications within QEMU emulated targets?

Please review the following changes for suitability for inclusion. If you have any objections or suggestions for improvement, please respond to the patches. If you agree with the changes, please provide your Acked-by.

The following changes since commit c39e823138cbf4210e17bdb95ca322ec0a6c8f78:

libpam: Fix missing DESTDIR for a mkdir causing build failures (2012-08-19 13:31:59 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/qemu-config
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/qemu-config

Paul Eggleton (7):
qemu-config: relicense as MIT
oprofileui: split server to separate recipe to avoid X11 dependency
qemu-config: split out anjuta-remote-run
oprofileui-server: move initscript from qemu-config
qemu-config: split out shutdown icon to its own recipe
qemu-config: split out export of root via NFS to its own recipe
qemu-config: turn into distcc-config and a task

 meta/recipes-bsp/qemu-config/qemu-config.bb        |   45 ---
 .../qemu-config/qemu-config/COPYING.GPL            |  339 --------------------
 .../devel-config/anjuta-remote-run.bb              |   19 ++
 .../anjuta-remote-run}/anjuta-remote-run           |    0
 .../recipes-devtools/devel-config/distcc-config.bb |   25 ++
 .../devel-config/distcc-config}/distcc.sh          |    2 +-
 .../devel-config/nfs-export-root.bb                |   17 +
 .../devel-config/nfs-export-root}/exports          |    0
 .../tasks/task-core-device-devel.bb                |   18 ++
 .../oprofile/oprofileui-server/init}               |    8 +-
 .../oprofile/oprofileui-server_git.bb              |   24 ++
 meta/recipes-kernel/oprofile/oprofileui.inc        |   11 +-
 meta/recipes-kernel/oprofile/oprofileui_git.bb     |   10 +-
 .../shutdown-desktop/shutdown-desktop.bb           |   20 ++
 .../shutdown-desktop}/shutdown.desktop             |    0
 meta/recipes-sato/tasks/task-core-x11-sato.bb      |    3 +-
 16 files changed, 141 insertions(+), 400 deletions(-)
 delete mode 100644 meta/recipes-bsp/qemu-config/qemu-config.bb
 delete mode 100644 meta/recipes-bsp/qemu-config/qemu-config/COPYING.GPL
 create mode 100644 meta/recipes-devtools/devel-config/anjuta-remote-run.bb
 rename meta/{recipes-bsp/qemu-config/qemu-config => recipes-devtools/devel-config/anjuta-remote-run}/anjuta-remote-run (100%)
 create mode 100644 meta/recipes-devtools/devel-config/distcc-config.bb
 rename meta/{recipes-bsp/qemu-config/qemu-config => recipes-devtools/devel-config/distcc-config}/distcc.sh (57%)
 create mode 100644 meta/recipes-devtools/devel-config/nfs-export-root.bb
 rename meta/{recipes-bsp/qemu-config/qemu-config => recipes-devtools/devel-config/nfs-export-root}/exports (100%)
 create mode 100644 meta/recipes-devtools/tasks/task-core-device-devel.bb
 rename meta/{recipes-bsp/qemu-config/qemu-config/qemu-autostart => recipes-kernel/oprofile/oprofileui-server/init} (74%)
 create mode 100644 meta/recipes-kernel/oprofile/oprofileui-server_git.bb
 create mode 100644 meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
 rename meta/{recipes-bsp/qemu-config/qemu-config => recipes-sato/shutdown-desktop/shutdown-desktop}/shutdown.desktop (100%)
Signature · 1 line
1.7.9.5
#1 lore raw

RFC PATCH 1/7 qemu-config: relicense as MIT

These files are all trivial in nature; so avoid having to have another copy of COPYING.GPL just for this recipe - especially as it's about to be split apart.

(All of the files in SRC_URI have only ever been contributed to by employees of Intel and/or OpenedHand.)

---
 meta/recipes-bsp/qemu-config/qemu-config.bb        |    9 +-
 .../qemu-config/qemu-config/COPYING.GPL            |  339 --------------------
 2 files changed, 5 insertions(+), 343 deletions(-)
 delete mode 100644 meta/recipes-bsp/qemu-config/qemu-config/COPYING.GPL
meta/recipes-bsp/qemu-config/qemu-config.bb +5 -4
index 8305f3a..f3a29d1 100644
@@ -1,7 +1,9 @@
 DESCRIPTION = "Adds scripts to use distcc on the host system under qemu"
 
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
 
 COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemumips|qemuppc)"
 
@@ -11,8 +13,7 @@ SRC_URI = "file://distcc.sh \
            file://anjuta-remote-run \
            file://exports \
            file://shutdown.desktop \
-           file://qemu-autostart \
-           file://COPYING.GPL"
+           file://qemu-autostart"
 
 S = "${WORKDIR}"
 
meta/recipes-bsp/qemu-config/qemu-config/COPYING.GPL deleted +0 -339

339 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#2 lore raw

RFC PATCH 2/7 oprofileui: split server to separate recipe to avoid X11 dependency

In reply to Paul Eggleton

Increase SRCREV to include an upstream patch that fixes the configure script so that the server can be built separately without gtk+ and avahi-ui, and create a separate recipe for the server.

Also fix the RDEPENDS so that oprofile actually gets pulled in by the client and the server.

Part of the fix for [YOCTO #1690].

---
 .../oprofile/oprofileui-server_git.bb              |   13 +++++++++++++
 meta/recipes-kernel/oprofile/oprofileui.inc        |   11 ++---------
 meta/recipes-kernel/oprofile/oprofileui_git.bb     |   10 +++++++++-
 3 files changed, 24 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-kernel/oprofile/oprofileui-server_git.bb
meta/recipes-kernel/oprofile/oprofileui-server_git.bb new file +13 -0
new file mode 100644
index 0000000..b9f6a81
@@ -0,0 +1,13 @@
+require oprofileui.inc
+
+SRCREV = "82ecf8c6b53b84f80682a8312f9defa83a95f2a3"
+PV = "0.0+git${SRCPV}"
+PR = "r0"
+
+S = "${WORKDIR}/git"
+
+SRC_URI = "git://git.yoctoproject.org/oprofileui;protocol=git"
+
+EXTRA_OECONF += "--disable-client --enable-server"
+
+RDEPENDS_${PN} = "oprofile"
meta/recipes-kernel/oprofile/oprofileui.inc +2 -9
index ab14c38..9a9bc19 100644
@@ -8,16 +8,9 @@ SECTION = "x11"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-DEPENDS = "glib-2.0 gtk+ libglade libxml2 avahi-ui gconf"
+DEPENDS = "glib-2.0 avahi"
 
-inherit autotools pkgconfig gtk-icon-cache
-
-PACKAGES =+ "oprofileui-server oprofileui-viewer"
+inherit autotools pkgconfig
 
 EXTRA_OECONF = "--with-avahi"
 
-FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/"
-RDEPENDS_oprofile-viewer = "oprofile"
-
-FILES_oprofileui-server = "${bindir}/oprofile-server"
-RDEPENDS_oprofile-server = "oprofile"
meta/recipes-kernel/oprofile/oprofileui_git.bb +9 -1
index 3fe9bb4..2c6e96a 100644
@@ -1,10 +1,18 @@
 require oprofileui.inc
 
+DEPENDS += "gtk+ libglade libxml2 avahi-ui gconf"
+
 SRCREV = "82ecf8c6b53b84f80682a8312f9defa83a95f2a3"
 PV = "0.0+git${SRCPV}"
 PR = "r0"
 
 S = "${WORKDIR}/git"
 
-# Oprofileui at http://labs.o-hand.com/oprofileui/ is not maintained now.
 SRC_URI = "git://git.yoctoproject.org/oprofileui;protocol=git"
+
+EXTRA_OECONF += "--enable-client --disable-server"
+
+PACKAGES =+ "oprofileui-viewer"
+
+FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/"
+RDEPENDS_oprofileui-viewer = "oprofile"
Signature · 1 line
1.7.9.5
#3 lore raw

RFC PATCH 3/7 qemu-config: split out anjuta-remote-run

In reply to Paul Eggleton

Given that support for Anjuta is unlikely to be needed by everyone and is by no means specific to qemu, split it out to a separate recipe. The following changes were made in the process:

Also depend on dbus instead of dbus-x11 since dbus-launch is now back in he main dbus package

Part of the fix for [YOCTO #1690].

---
 meta/recipes-bsp/qemu-config/qemu-config.bb        |    6 +-----
 .../devel-config/anjuta-remote-run.bb              |   19 +++++++++++++++++++
 .../anjuta-remote-run}/anjuta-remote-run           |    0
 3 files changed, 20 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-devtools/devel-config/anjuta-remote-run.bb
 rename meta/{recipes-bsp/qemu-config/qemu-config => recipes-devtools/devel-config/anjuta-remote-run}/anjuta-remote-run (100%)
meta/recipes-bsp/qemu-config/qemu-config.bb +1 -5
index f3a29d1..3e44d7c 100644
@@ -10,7 +10,6 @@ COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemumips|qemuppc)"
 PR = "r25"
 
 SRC_URI = "file://distcc.sh \
-           file://anjuta-remote-run \
            file://exports \
            file://shutdown.desktop \
            file://qemu-autostart"
@@ -23,9 +22,6 @@ do_install() {
     install -m 0755 distcc.sh ${D}${sysconfdir}/profile.d/
     install -m 0644 exports ${D}${sysconfdir}/
     
-    install -d ${D}${bindir}
-    install -m 0755 anjuta-remote-run ${D}${bindir}/
-    
     install -d ${D}${datadir}/applications
     install -m 0644 shutdown.desktop ${D}${datadir}/applications/
 
@@ -38,7 +34,7 @@ pkg_postinst_${PN} () {
         sed -i $D${datadir}/applications/shutdown.desktop -e 's/^Exec=halt/Exec=reboot/'
 }
 
-RDEPENDS_${PN} = "distcc ${@base_contains('DISTRO_FEATURES', 'x11', 'dbus-x11', '', d)} task-core-nfs-server oprofileui-server rsync bash"
+RDEPENDS_${PN} = "distcc task-core-nfs-server oprofileui-server bash"
 
 inherit update-rc.d allarch
 
meta/recipes-devtools/devel-config/anjuta-remote-run.bb new file +19 -0
new file mode 100644
index 0000000..51fdf9e
@@ -0,0 +1,19 @@
+SUMMARY = "Provides on-device script for interaction with the Anjuta IDE"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://anjuta-remote-run"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 anjuta-remote-run ${D}${bindir}/
+}
+
+PACKAGES = "${PN}"
+RDEPENDS_${PN} = "dbus rsync"
+
+inherit allarch
+
meta/recipes-devtools/devel-config/anjuta-remote-run/anjuta-remote-run renamed from meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run +0 -0
similarity index 100%
rename from meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run
rename to meta/recipes-devtools/devel-config/anjuta-remote-run/anjuta-remote-run
Signature · 1 line
1.7.9.5
#4 lore raw

RFC PATCH 4/7 oprofileui-server: move initscript from qemu-config

In reply to Paul Eggleton

The qemu-config initscript was only starting oprofile-server, so move it to the oprofileui-server recipe.

---
 meta/recipes-bsp/qemu-config/qemu-config.bb        |   11 ++---------
 .../oprofile/oprofileui-server/init}               |    8 ++++----
 .../oprofile/oprofileui-server_git.bb              |   13 ++++++++++++-
 3 files changed, 18 insertions(+), 14 deletions(-)
 rename meta/{recipes-bsp/qemu-config/qemu-config/qemu-autostart => recipes-kernel/oprofile/oprofileui-server/init} (74%)
meta/recipes-bsp/qemu-config/qemu-config.bb +2 -9
index 3e44d7c..036d281 100644
@@ -11,8 +11,7 @@ PR = "r25"
 
 SRC_URI = "file://distcc.sh \
            file://exports \
-           file://shutdown.desktop \
-           file://qemu-autostart"
+           file://shutdown.desktop"
 
 S = "${WORKDIR}"
 
@@ -24,9 +23,6 @@ do_install() {
     
     install -d ${D}${datadir}/applications
     install -m 0644 shutdown.desktop ${D}${datadir}/applications/
-
-    install -d ${D}${sysconfdir}/init.d
-    install qemu-autostart ${D}${sysconfdir}/init.d/
 }
 
 pkg_postinst_${PN} () {
@@ -36,7 +32,4 @@ pkg_postinst_${PN} () {
 
 RDEPENDS_${PN} = "distcc task-core-nfs-server oprofileui-server bash"
 
-inherit update-rc.d allarch
-
-INITSCRIPT_NAME = "qemu-autostart"
-INITSCRIPT_PARAMS = "start 999 5 2 . stop 20 0 1 6 ."
+inherit allarch
meta/recipes-kernel/oprofile/oprofileui-server/init renamed from meta/recipes-bsp/qemu-config/qemu-config/qemu-autostart +4 -4
similarity index 74%
rename from meta/recipes-bsp/qemu-config/qemu-config/qemu-autostart
rename to meta/recipes-kernel/oprofile/oprofileui-server/init
index db2668e..2544ea4 100755
@@ -1,11 +1,11 @@
 #!/bin/sh
 ### BEGIN INIT INFO
-# Provides:          hddtemp
+# Provides:          oprofile-server
 # Required-Start:    $network
 # Required-Stop:     $network
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
-# Short-Description: OProfile server
+# Short-Description: OProfileUI server
 # Description:       
 ### END INIT INFO
 
@@ -13,13 +13,13 @@
 
 case "$1" in
   start)
-        echo "Starting automatic qemu services"
+        echo "Starting OProfileUI server"
 	. /etc/profile
 	/usr/bin/oprofile-server &
   ;;
 
   stop)
-        echo "Stopping qemu services"
+        echo "Stopping OProfileUI server"
         killproc oprofile-server
   ;;
 
meta/recipes-kernel/oprofile/oprofileui-server_git.bb +12 -1
index b9f6a81..e75923f 100644
@@ -6,8 +6,19 @@ PR = "r0"
 
 S = "${WORKDIR}/git"
 
-SRC_URI = "git://git.yoctoproject.org/oprofileui;protocol=git"
+SRC_URI = "git://git.yoctoproject.org/oprofileui;protocol=git \
+           file://init"
 
 EXTRA_OECONF += "--disable-client --enable-server"
 
 RDEPENDS_${PN} = "oprofile"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/oprofileui-server
+}
+
+INITSCRIPT_NAME = "oprofileui-server"
+INITSCRIPT_PARAMS = "start 999 5 2 . stop 20 0 1 6 ."
+
+inherit update-rc.d
Signature · 1 line
1.7.9.5
#5 lore raw

RFC PATCH 5/7 qemu-config: split out shutdown icon to its own recipe

In reply to Paul Eggleton

Cleanly shutting down the machine from Sato is useful on other machines, not all of which have a power button that otherwise enables this, so make it not specific to qemu* and add it to task-core-x11-sato.

---
 meta/recipes-bsp/qemu-config/qemu-config.bb        |   11 +----------
 .../shutdown-desktop/shutdown-desktop.bb           |   20 ++++++++++++++++++++
 .../shutdown-desktop}/shutdown.desktop             |    0
 meta/recipes-sato/tasks/task-core-x11-sato.bb      |    3 ++-
 4 files changed, 23 insertions(+), 11 deletions(-)
 create mode 100644 meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
 rename meta/{recipes-bsp/qemu-config/qemu-config => recipes-sato/shutdown-desktop/shutdown-desktop}/shutdown.desktop (100%)
meta/recipes-bsp/qemu-config/qemu-config.bb +1 -10
index 036d281..351f8f3 100644
@@ -10,8 +10,7 @@ COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemumips|qemuppc)"
 PR = "r25"
 
 SRC_URI = "file://distcc.sh \
-           file://exports \
-           file://shutdown.desktop"
+           file://exports"
 
 S = "${WORKDIR}"
 
@@ -20,14 +19,6 @@ do_install() {
 
     install -m 0755 distcc.sh ${D}${sysconfdir}/profile.d/
     install -m 0644 exports ${D}${sysconfdir}/
-    
-    install -d ${D}${datadir}/applications
-    install -m 0644 shutdown.desktop ${D}${datadir}/applications/
-}
-
-pkg_postinst_${PN} () {
-    grep -q qemuarm $D${sysconfdir}/hostname && \
-        sed -i $D${datadir}/applications/shutdown.desktop -e 's/^Exec=halt/Exec=reboot/'
 }
 
 RDEPENDS_${PN} = "distcc task-core-nfs-server oprofileui-server bash"
meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb new file +20 -0
new file mode 100644
index 0000000..d0f507e
@@ -0,0 +1,20 @@
+SUMMARY = "Provides an icon to shut down the system cleanly"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://shutdown.desktop"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -d ${D}${datadir}/applications
+	install -m 0644 shutdown.desktop ${D}${datadir}/applications/
+}
+
+pkg_postinst_${PN} () {
+    grep -q qemuarm $D${sysconfdir}/hostname && \
+        sed -i $D${datadir}/applications/shutdown.desktop -e 's/^Exec=halt/Exec=reboot/'
+}
+
+inherit allarch
meta/recipes-sato/shutdown-desktop/shutdown-desktop/shutdown.desktop renamed from meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop +0 -0
similarity index 100%
rename from meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop
rename to meta/recipes-sato/shutdown-desktop/shutdown-desktop/shutdown.desktop
meta/recipes-sato/tasks/task-core-x11-sato.bb +2 -1
index cf294b3..be1ccb8 100644
@@ -6,7 +6,7 @@ DESCRIPTION = "Sato Tasks for Poky"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-PR = "r32"
+PR = "r33"
 
 PACKAGES = "\
     task-core-x11-sato \
@@ -34,6 +34,7 @@ RDEPENDS_task-core-x11-sato = "\
     sato-icon-theme \
     settings-daemon \
     gtk-sato-engine \
+    shutdown-desktop \
     gthumb \
     x11vnc \
     libsdl \
Signature · 1 line
1.7.9.5
#6 lore raw

RFC PATCH 6/7 qemu-config: split out export of root via NFS to its own recipe

In reply to Paul Eggleton

This need not be specific to qemu machines, allow it to be used elsewhere in isolation.

---
 meta/recipes-bsp/qemu-config/qemu-config.bb        |    7 ++-----
 .../devel-config/nfs-export-root.bb                |   17 +++++++++++++++++
 .../devel-config/nfs-export-root}/exports          |    0
 3 files changed, 19 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-devtools/devel-config/nfs-export-root.bb
 rename meta/{recipes-bsp/qemu-config/qemu-config => recipes-devtools/devel-config/nfs-export-root}/exports (100%)
meta/recipes-bsp/qemu-config/qemu-config.bb +2 -5
index 351f8f3..3ed07df 100644
@@ -9,18 +9,15 @@ COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemumips|qemuppc)"
 
 PR = "r25"
 
-SRC_URI = "file://distcc.sh \
-           file://exports"
+SRC_URI = "file://distcc.sh"
 
 S = "${WORKDIR}"
 
 do_install() {
     install -d ${D}${sysconfdir}/profile.d
-
     install -m 0755 distcc.sh ${D}${sysconfdir}/profile.d/
-    install -m 0644 exports ${D}${sysconfdir}/
 }
 
-RDEPENDS_${PN} = "distcc task-core-nfs-server oprofileui-server bash"
+RDEPENDS_${PN} = "distcc oprofileui-server bash"
 
 inherit allarch
meta/recipes-devtools/devel-config/nfs-export-root.bb new file +17 -0
new file mode 100644
index 0000000..41259ac
@@ -0,0 +1,17 @@
+SUMMARY = "Enables NFS access from any host to the entire filesystem (for development purposes)"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://exports"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -d ${D}${sysconfdir}
+	install -m 0644 exports ${D}${sysconfdir}/
+}
+
+RDEPENDS_${PN} = "task-core-nfs-server"
+
+inherit allarch
meta/recipes-devtools/devel-config/nfs-export-root/exports renamed from meta/recipes-bsp/qemu-config/qemu-config/exports +0 -0
similarity index 100%
rename from meta/recipes-bsp/qemu-config/qemu-config/exports
rename to meta/recipes-devtools/devel-config/nfs-export-root/exports
Signature · 1 line
1.7.9.5
#7 lore raw

RFC PATCH 7/7 qemu-config: turn into distcc-config and a task

In reply to Paul Eggleton

* Create a new task-core-device-devel which pulls in everything that qemu-config used to
* Move the remainder of qemu-config to distcc-config and allow DISTCC_HOSTS to be configured via a variable of the same name
* Use SUMMARY instead of DESCRIPTION for single-line description since DESCRIPTION is defaulted from SUMMARY if not set

---
 .../devel-config/distcc-config.bb}                 |   20 +++++++++++---------
 .../devel-config/distcc-config}/distcc.sh          |    2 +-
 .../tasks/task-core-device-devel.bb                |   18 ++++++++++++++++++
 3 files changed, 30 insertions(+), 10 deletions(-)
 rename meta/{recipes-bsp/qemu-config/qemu-config.bb => recipes-devtools/devel-config/distcc-config.bb} (44%)
 rename meta/{recipes-bsp/qemu-config/qemu-config => recipes-devtools/devel-config/distcc-config}/distcc.sh (57%)
 create mode 100644 meta/recipes-devtools/tasks/task-core-device-devel.bb
meta/recipes-devtools/devel-config/distcc-config.bb renamed from meta/recipes-bsp/qemu-config/qemu-config.bb +11 -9
similarity index 44%
rename from meta/recipes-bsp/qemu-config/qemu-config.bb
rename to meta/recipes-devtools/devel-config/distcc-config.bb
index 3ed07df..8deaa66 100644
@@ -1,23 +1,25 @@
-DESCRIPTION = "Adds scripts to use distcc on the host system under qemu"
+SUMMARY = "Sets up distcc for compilation on the target device"
 
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-
-COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemumips|qemuppc)"
-
-PR = "r25"
-
 SRC_URI = "file://distcc.sh"
 
 S = "${WORKDIR}"
 
+# Default to the host machine for a running qemu session
+DISTCC_HOSTS ?= "192.168.7.1"
+
+do_configure() {
+	sed -i "s%@DISTCC_HOSTS@%${DISTCC_HOSTS}%" distcc.sh
+}
+
 do_install() {
-    install -d ${D}${sysconfdir}/profile.d
-    install -m 0755 distcc.sh ${D}${sysconfdir}/profile.d/
+	install -d ${D}${sysconfdir}/profile.d
+	install -m 0755 distcc.sh ${D}${sysconfdir}/profile.d/
 }
 
-RDEPENDS_${PN} = "distcc oprofileui-server bash"
+RDEPENDS_${PN} = "distcc"
 
 inherit allarch
meta/recipes-devtools/devel-config/distcc-config/distcc.sh renamed from meta/recipes-bsp/qemu-config/qemu-config/distcc.sh +1 -1
similarity index 57%
rename from meta/recipes-bsp/qemu-config/qemu-config/distcc.sh
rename to meta/recipes-devtools/devel-config/distcc-config/distcc.sh
index a2b543d..b420593 100644
@@ -1,4 +1,4 @@
-DISTCC_HOSTS="192.168.7.1"
+DISTCC_HOSTS="@DISTCC_HOSTS@"
 #DISTCC_VERBOSE="1"
 
 export DISTCC_HOSTS
meta/recipes-devtools/tasks/task-core-device-devel.bb new file +18 -0
new file mode 100644
index 0000000..f4b608b
@@ -0,0 +1,18 @@
+SUMMARY = "Provides a small set of tools for development on the device"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+inherit task
+
+RPROVIDES_${PN} = "qemu-config"
+RREPLACES_${PN} = "qemu-config"
+
+RDEPENDS_${PN} = "\
+    distcc-config \
+    oprofileui-server \
+    nfs-export-root \
+    anjuta-remote-run \
+    bash \
+    "
+
Signature · 1 line
1.7.9.5
#8 lore raw
In reply to Paul Eggleton
Quoted 11 lines · Paul Eggleton

*** Note: this is an RFC series, please do not merge yet! ***

Split apart qemu-config, replacing it with a task (task-core-device-devel) that is not specific to usage together with QEMU. oprofileui is now split into client and server parts, and together with the prevous work to merge dbus-launch back into the main dbus package, this makes things work much more smoothly when this task is installed with x11 removed from DISTRO_FEATURES. Additionally it was found that oprofileui was not correctly depending on oprofile itself, and this has also been fixed. (This is a reworking of a patch series I sent out some time ago.)

Quoted 8 lines

There is a remaining question however - is this task actually useful? For reference, it enables the following:

1) Use of distcc to accelerate compiling applications within the emulated environment using direct compilation on the host
2) Accessing the root filesystem via NFS
3) Remote profiling via oprofileui
4) Running applications in the target from the Anjuta IDE

There has been no development work on Anjuta for 22 months now (according to git logs) so is this even supported any more? I gave it a go once, but never really got anywhere.

Quoted 10 lines

5) bash shell

Whilst these might have minor utility on an individual basis, I can't honestly say that that the overall set seems particularly useful to me as a whole; and some of the parts are less useful than they used to be - is oprofile commonly used these days now that tools like perf are available? Is anyone actually using Anjuta for embedded development? For that matter, does anyone regularly build applications within QEMU emulated targets?

Personally, I have never used QEMU for developing embedded software due to the fact that the hardware for the proposed application to run on is always quite specific.

Regards,

Signature · 5 lines
  Jack Mitchell ([email protected])
  Embedded Systems Engineer
  http://www.embed.me.uk

--