Patchwork [RFC,7/7] qemu-config: turn into distcc-config and a task

login
register
mail settings
Submitter Paul Eggleton
Date Aug. 20, 2012, 10:32 a.m.
Message ID <daf70360948a15ca2be324a166a84cab97dde46c.1345458715.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/34935/
State New
Headers show

Comments

Paul Eggleton - Aug. 20, 2012, 10:32 a.m.
* 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

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 .../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

Patch

diff --git a/meta/recipes-bsp/qemu-config/qemu-config.bb b/meta/recipes-devtools/devel-config/distcc-config.bb
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
--- a/meta/recipes-bsp/qemu-config/qemu-config.bb
+++ b/meta/recipes-devtools/devel-config/distcc-config.bb
@@ -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
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/distcc.sh b/meta/recipes-devtools/devel-config/distcc-config/distcc.sh
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
--- a/meta/recipes-bsp/qemu-config/qemu-config/distcc.sh
+++ b/meta/recipes-devtools/devel-config/distcc-config/distcc.sh
@@ -1,4 +1,4 @@ 
-DISTCC_HOSTS="192.168.7.1"
+DISTCC_HOSTS="@DISTCC_HOSTS@"
 #DISTCC_VERBOSE="1"
 
 export DISTCC_HOSTS
diff --git a/meta/recipes-devtools/tasks/task-core-device-devel.bb b/meta/recipes-devtools/tasks/task-core-device-devel.bb
new file mode 100644
index 0000000..f4b608b
--- /dev/null
+++ b/meta/recipes-devtools/tasks/task-core-device-devel.bb
@@ -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 \
+    "
+