diff options
Diffstat (limited to 'meta/recipes-bsp/qemu-config')
7 files changed, 105 insertions, 0 deletions
diff --git a/meta/recipes-bsp/qemu-config/qemu-config.bb b/meta/recipes-bsp/qemu-config/qemu-config.bb new file mode 100644 index 0000000000..fc59320282 --- /dev/null +++ b/meta/recipes-bsp/qemu-config/qemu-config.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | DESCRIPTION = "Adds scripts to use distcc on the host system under qemu" | ||
2 | LICENSE = "GPL" | ||
3 | RDEPENDS = "distcc task-poky-nfs-server oprofileui-server rsync bash" | ||
4 | PR = "r17" | ||
5 | |||
6 | SRC_URI = "file://distcc.sh \ | ||
7 | file://anjuta-remote-run \ | ||
8 | file://exports \ | ||
9 | file://shutdown.desktop \ | ||
10 | file://qemu-autostart" | ||
11 | |||
12 | S = "${WORKDIR}" | ||
13 | |||
14 | COMPATIBLE_MACHINE = "(qemuarm|qemux86)" | ||
15 | PACKAGE_ARCH = "all" | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}${sysconfdir}/profile.d | ||
19 | |||
20 | install -m 0755 distcc.sh ${D}${sysconfdir}/profile.d/ | ||
21 | install -m 0644 exports ${D}${sysconfdir}/ | ||
22 | |||
23 | install -d ${D}${bindir} | ||
24 | install -m 0755 anjuta-remote-run ${D}${bindir}/ | ||
25 | |||
26 | install -d ${D}${datadir}/applications | ||
27 | install -m 0644 shutdown.desktop ${D}${datadir}/applications/ | ||
28 | |||
29 | install -d ${D}/etc/init.d | ||
30 | install qemu-autostart ${D}/etc/init.d/ | ||
31 | } | ||
32 | |||
33 | inherit update-rc.d | ||
34 | |||
35 | INITSCRIPT_NAME = "qemu-autostart" | ||
36 | INITSCRIPT_PARAMS = "start 999 5 2 . stop 20 0 1 6 ." | ||
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run b/meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run new file mode 100644 index 0000000000..620e3a705b --- /dev/null +++ b/meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run | |||
@@ -0,0 +1,7 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | . /etc/profile | ||
4 | export DISPLAY=:0 | ||
5 | dbus-launch $@ | ||
6 | |||
7 | |||
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/distcc.sh b/meta/recipes-bsp/qemu-config/qemu-config/distcc.sh new file mode 100644 index 0000000000..a2b543d6b8 --- /dev/null +++ b/meta/recipes-bsp/qemu-config/qemu-config/distcc.sh | |||
@@ -0,0 +1,4 @@ | |||
1 | DISTCC_HOSTS="192.168.7.1" | ||
2 | #DISTCC_VERBOSE="1" | ||
3 | |||
4 | export DISTCC_HOSTS | ||
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/exports b/meta/recipes-bsp/qemu-config/qemu-config/exports new file mode 100644 index 0000000000..b7257aa008 --- /dev/null +++ b/meta/recipes-bsp/qemu-config/qemu-config/exports | |||
@@ -0,0 +1 @@ | |||
/ *(rw,no_root_squash,async) | |||
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/qemu-autostart b/meta/recipes-bsp/qemu-config/qemu-config/qemu-autostart new file mode 100755 index 0000000000..db2668eb4e --- /dev/null +++ b/meta/recipes-bsp/qemu-config/qemu-config/qemu-autostart | |||
@@ -0,0 +1,37 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: hddtemp | ||
4 | # Required-Start: $network | ||
5 | # Required-Stop: $network | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 0 1 6 | ||
8 | # Short-Description: OProfile server | ||
9 | # Description: | ||
10 | ### END INIT INFO | ||
11 | |||
12 | . /etc/init.d/functions | ||
13 | |||
14 | case "$1" in | ||
15 | start) | ||
16 | echo "Starting automatic qemu services" | ||
17 | . /etc/profile | ||
18 | /usr/bin/oprofile-server & | ||
19 | ;; | ||
20 | |||
21 | stop) | ||
22 | echo "Stopping qemu services" | ||
23 | killproc oprofile-server | ||
24 | ;; | ||
25 | |||
26 | restart) | ||
27 | $0 stop | ||
28 | sleep 1 | ||
29 | $0 start | ||
30 | ;; | ||
31 | |||
32 | *) | ||
33 | echo "usage: $0 { start | stop | restart }" | ||
34 | ;; | ||
35 | esac | ||
36 | |||
37 | exit 0 | ||
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop b/meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop new file mode 100644 index 0000000000..b973d4318e --- /dev/null +++ b/meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop | |||
@@ -0,0 +1,10 @@ | |||
1 | [Desktop Entry] | ||
2 | Encoding=UTF-8 | ||
3 | Type=Application | ||
4 | Name=Shutdown | ||
5 | Comment=Close down the machine safely | ||
6 | Exec=reboot | ||
7 | Icon=system-shutdown | ||
8 | Terminal=false | ||
9 | Categories=Utility; | ||
10 | StartupNotify=true \ No newline at end of file | ||
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop b/meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop new file mode 100644 index 0000000000..272688922c --- /dev/null +++ b/meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop | |||
@@ -0,0 +1,10 @@ | |||
1 | [Desktop Entry] | ||
2 | Encoding=UTF-8 | ||
3 | Type=Application | ||
4 | Name=Shutdown | ||
5 | Comment=Close down the machine safely | ||
6 | Exec=halt | ||
7 | Icon=system-shutdown | ||
8 | Terminal=false | ||
9 | Categories=Utility; | ||
10 | StartupNotify=true \ No newline at end of file | ||