summaryrefslogtreecommitdiff
path: root/recipes/bootchart
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/bootchart
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/bootchart')
-rw-r--r--recipes/bootchart/bootchart_0.9.bb27
-rw-r--r--recipes/bootchart/files/handheld.patch105
2 files changed, 132 insertions, 0 deletions
diff --git a/recipes/bootchart/bootchart_0.9.bb b/recipes/bootchart/bootchart_0.9.bb
new file mode 100644
index 0000000000..98ff0c204d
--- /dev/null
+++ b/recipes/bootchart/bootchart_0.9.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process."
+LICENSE = "GPLv2"
+HOMEPAGE = "http://www.bootchart.org/"
+PR = "r1"
+
+#this only installs the loggers, you will need to run the renderers on your workstation
+#boot with 'init=/sbin/bootchartd' and do '/sbin/bootchartd stop' to end the logging
+
+#needed for a real /bin/sh and /bin/sleep
+DEPENDS = "bash coreutils acct"
+RDEPENDS = "bash coreutils acct"
+
+#this is a plain shell script
+PACKAGE_ARCH = "all"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/bootchart/bootchart-${PV}.tar.bz2\
+ file://handheld.patch;patch=1"
+
+
+do_install() {
+ install -d ${D}/sbin
+ install -d ${D}/etc
+ install -d ${D}/bootchart
+ install -m 755 ${S}/script/bootchartd ${D}/sbin
+ install -m 644 ${S}/script/bootchartd.conf ${D}/etc
+}
+
diff --git a/recipes/bootchart/files/handheld.patch b/recipes/bootchart/files/handheld.patch
new file mode 100644
index 0000000000..c3ded668bc
--- /dev/null
+++ b/recipes/bootchart/files/handheld.patch
@@ -0,0 +1,105 @@
+diff -ur bootchart-0.9-org/script/bootchartd bootchart-0.9/script/bootchartd
+--- bootchart-0.9-org/script/bootchartd 2005-11-13 19:40:01.000000000 +0200
++++ bootchart-0.9/script/bootchartd 2006-08-03 19:06:22.000000000 +0300
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ #
+ # Bootchart logger script
+ # Ziga Mahkovec <ziga.mahkovec@klika.si>
+@@ -43,10 +43,12 @@
+ # boot), a tmpfs is mounted in /mnt. The mount point is immediately
+ # released using a lazy umount, so the script must never leave that
+ # directory.
+- LOG_DIR="$( mktemp -d /tmp/bootchart.XXXXXX 2>/dev/null )"
++ #LOG_DIR="$( mktemp -d /tmp/bootchart.XXXXXX 2>/dev/null )"
++ LOG_DIR=""
+ if [ -z "$LOG_DIR" ]; then
+- LOG_DIR="/mnt"
+- LAZY_UMOUNT="yes"
++ LOG_DIR="/bootchart"
++ mkdir -p $LOG_DIR
++ #LAZY_UMOUNT="yes"
+ mount -n -t tmpfs -o size=$TMPFS_SIZE none "$LOG_DIR" >/dev/null 2>&1
+ fi
+ cd "$LOG_DIR"
+@@ -54,7 +56,7 @@
+ [ -n "$LAZY_UMOUNT" ] && umount -nfl "$LOG_DIR"
+
+ # Enable process accounting if configured
+- if [ "$PROCESS_ACCOUNTING" = "yes" ]; then
++ if [ "$PROCESS_ACCOUNTING" = "yes" -a -x /usr/sbin/accton ]; then
+ > kernel_pacct
+ accton kernel_pacct
+ fi
+@@ -153,7 +155,7 @@
+
+ # Stop process accounting if configured
+ local pacct=
+- if [ "$PROCESS_ACCOUNTING" = "yes" ]; then
++ if [ "$PROCESS_ACCOUNTING" = "yes" -a -x /usr/sbin/accton ]; then
+ accton
+ pacct=kernel_pacct
+ fi
+@@ -215,18 +217,34 @@
+ # Started by the kernel. Start the logger in background and exec
+ # init(1).
+ IN_INIT="yes"
+- echo "Starting bootchart logging"
+- start &
+
+ # Optionally, an alternative init(1) process may be specified using
+ # the kernel command line (e.g. "bootchart_init=/sbin/initng")
++ # Optionally, possible to override sample period using
++ # the kernel command line (e.g. "bootchart_sample_period=0.1")
+ init="/sbin/init"
+- for i in $@; do
++
++ #kparams=$@
++ # For some reason, handheld kernel doesn't pass command line here - fish for it
++ mount -t proc none /bootchart
++ kparams=`cat /bootchart/cmdline`
++ umount /bootchart
++
++ echo "Kernel params: $kparams"
++ for i in $kparams; do
+ if [ "${i%%=*}" = "bootchart_init" ]; then
+ init="${i#*=}"
+ break
+ fi
++ if [ "${i%%=*}" = "bootchart_sample_period" ]; then
++ SAMPLE_PERIOD="${i#*=}"
++ break
++ fi
+ done
++
++ echo "Starting bootchart logging, sample period: ${SAMPLE_PERIOD}s"
++ start &
++
+ exec $init $*
+ fi
+
+diff -ur bootchart-0.9-org/script/bootchartd.conf bootchart-0.9/script/bootchartd.conf
+--- bootchart-0.9-org/script/bootchartd.conf 2005-11-13 19:40:01.000000000 +0200
++++ bootchart-0.9/script/bootchartd.conf 2006-08-03 15:21:31.000000000 +0300
+@@ -10,16 +10,17 @@
+ BOOTLOG_LOCK=".lock"
+
+ # Sampling period (in seconds)
+-SAMPLE_PERIOD=0.2
++# Default 0.2 is not fine enough to catch peculiarities in OE-based distro
++SAMPLE_PERIOD=0.1
+
+ # Whether to enable and store BSD process accounting information. The
+ # kernel needs to be configured to enable v3 accounting
+ # (CONFIG_BSD_PROCESS_ACCT_V3). accton from the GNU accounting utilities
+ # is also required.
+-PROCESS_ACCOUNTING="no"
++PROCESS_ACCOUNTING="yes"
+
+ # Tarball for the various boot log files
+-BOOTLOG_DEST=/var/log/bootchart.tgz
++BOOTLOG_DEST=/bootchart.tgz
+
+ # Whether to automatically generate the boot chart once the boot logger
+ # completes. The boot chart will be generated in $AUTO_RENDER_DIR.