mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 09:49:33 +02:00
ubootchart: add a launcher to stop the profiling, alternatives to optionally replace /sbin/init, and cleanly pretend to be /sbin/init
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3071 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
21
meta-extras/packages/ubootchart/files/pass-args.patch
Normal file
21
meta-extras/packages/ubootchart/files/pass-args.patch
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Index: ubootchartd
|
||||||
|
===================================================================
|
||||||
|
--- ubootchartd (revision 9)
|
||||||
|
+++ ubootchartd (working copy)
|
||||||
|
@@ -7,9 +7,11 @@
|
||||||
|
# can read.
|
||||||
|
. /etc/ubootchart/ubootchart.conf
|
||||||
|
|
||||||
|
-####################################################
|
||||||
|
-# Now start capturing the stats:
|
||||||
|
-####################################################
|
||||||
|
-/sbin/ubootchartd_bin &
|
||||||
|
-exec $init_prog
|
||||||
|
+if [ $$ -eq 1 ]; then
|
||||||
|
+ ####################################################
|
||||||
|
+ # Now start capturing the stats:
|
||||||
|
+ ####################################################
|
||||||
|
+ /sbin/ubootchartd_bin &
|
||||||
|
+fi
|
||||||
|
|
||||||
|
+exec $init_prog "$@"
|
||||||
3
meta-extras/packages/ubootchart/files/ubootchart-stop
Normal file
3
meta-extras/packages/ubootchart/files/ubootchart-stop
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
kill -USR1 $(pidof ubootchartd_bin)
|
||||||
6
meta-extras/packages/ubootchart/files/ubootchart.desktop
Normal file
6
meta-extras/packages/ubootchart/files/ubootchart.desktop
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Exec=/sbin/ubootchart-stop
|
||||||
|
Name=Stop Bootchart
|
||||||
|
Type=Application
|
||||||
|
Categories=Programming;
|
||||||
@@ -2,22 +2,37 @@ DESCRIPTION = "A boot profiling tool"
|
|||||||
HOMEPAGE = "http://code.google.com/p/ubootchart/"
|
HOMEPAGE = "http://code.google.com/p/ubootchart/"
|
||||||
LICENSE = "GPLv3"
|
LICENSE = "GPLv3"
|
||||||
PV = "0.0+r${SRCREV}"
|
PV = "0.0+r${SRCREV}"
|
||||||
|
PR = "r2"
|
||||||
|
|
||||||
|
RRECOMMENDS = "acct"
|
||||||
|
|
||||||
SRC_URI = "svn://ubootchart.googlecode.com/svn/;proto=http;module=trunk \
|
SRC_URI = "svn://ubootchart.googlecode.com/svn/;proto=http;module=trunk \
|
||||||
file://sysvinit.patch;patch=1;pnum=0"
|
file://sysvinit.patch;patch=1;pnum=0 \
|
||||||
|
file://pass-args.patch;patch=1;pnum=0 \
|
||||||
|
file://ubootchart-stop \
|
||||||
|
file://ubootchart.desktop"
|
||||||
|
|
||||||
S = "${WORKDIR}/trunk"
|
S = "${WORKDIR}/trunk"
|
||||||
|
|
||||||
|
inherit update-alternatives
|
||||||
|
|
||||||
|
ALTERNATIVE_NAME = "init"
|
||||||
|
ALTERNATIVE_LINK = "${base_sbindir}/init"
|
||||||
|
ALTERNATIVE_PATH = "${base_sbindir}/ubootchartd"
|
||||||
|
ALTERNATIVE_PRIORITY = "20"
|
||||||
|
|
||||||
do_compile() {
|
do_compile() {
|
||||||
${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} ${INCLUDES} ${S}/ubootchartd_bin.c -o ubootchartd_bin
|
${CC} ${CFLAGS} ${LDFLAGS} ${LIBS} ${INCLUDES} ${S}/ubootchartd_bin.c -o ubootchartd_bin
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -m 0755 -d ${D}/sbin ${D}/etc/ubootchart
|
install -m 0755 -d ${D}/sbin ${D}/etc/ubootchart ${D}/usr/share/applications
|
||||||
install -m 0755 ${S}/ubootchartd_bin ${D}/sbin
|
install -m 0755 ${S}/ubootchartd_bin ${D}/sbin
|
||||||
install -m 0755 ${S}/ubootchartd ${D}/sbin
|
install -m 0755 ${S}/ubootchartd ${D}/sbin
|
||||||
install -m 0644 ${S}/ubootchart.conf ${D}/etc/ubootchart
|
install -m 0644 ${S}/ubootchart.conf ${D}/etc/ubootchart
|
||||||
install -m 0755 ${S}/start.sh ${D}/etc/ubootchart
|
install -m 0755 ${S}/start.sh ${D}/etc/ubootchart
|
||||||
install -m 0755 ${S}/finish.sh ${D}/etc/ubootchart
|
install -m 0755 ${S}/finish.sh ${D}/etc/ubootchart
|
||||||
|
|
||||||
|
install -m 0755 ${WORKDIR}/ubootchart-stop ${D}/sbin
|
||||||
|
install -m 0644 ${WORKDIR}/ubootchart.desktop ${D}/usr/share/applications
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user