summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/oprofile
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2012-12-19 14:51:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-26 11:34:07 +0000
commit845c2c0bd5db3ddab917d9945c2434b6e8c8c15b (patch)
treea40ac5a842d4c55eb65eb648ef4caa9b1bfd17e8 /meta/recipes-kernel/oprofile
parent2af073af00280e36295121e2a426ba88a4a39988 (diff)
downloadpoky-845c2c0bd5db3ddab917d9945c2434b6e8c8c15b.tar.gz
oprofile: use dynamic root home directory
Use stub "ROOTHOME" to replace "/home/root" in oprofile-root.patch, then we can substitute it with configured root home directory. (From OE-Core rev: 584fc5abe4ea08a92eff691af42300b5a26d2755) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/oprofile')
-rw-r--r--meta/recipes-kernel/oprofile/oprofile.inc1
-rw-r--r--meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch23
2 files changed, 15 insertions, 9 deletions
diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc
index b3ce852bba..23ddb14f38 100644
--- a/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/meta/recipes-kernel/oprofile/oprofile.inc
@@ -31,6 +31,7 @@ inherit autotools
31 31
32EXTRA_OECONF = "--with-kernel-support --without-x" 32EXTRA_OECONF = "--with-kernel-support --without-x"
33do_configure () { 33do_configure () {
34 find . -type f | xargs sed -i 's#ROOTHOME#${ROOT_HOME}#'
34 cp ${WORKDIR}/acinclude.m4 ${S}/ 35 cp ${WORKDIR}/acinclude.m4 ${S}/
35 autotools_do_configure 36 autotools_do_configure
36} 37}
diff --git a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
index db63a8e8da..f3fe4c9cb3 100644
--- a/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
+++ b/meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
@@ -4,6 +4,11 @@ Upstream-Status: inappropriate [OE specific]
4 4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com> 5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6 6
7Replace "/home/root" with stub "ROOTHOME", then substitute it with
8real root home directory which is configured dymanically.
9
10Signed-off-by: Kang Kai <kai.kang@windriver.com>
11
7diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.in 12diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.in
8--- oprofile-0.9.7.orig/doc/opcontrol.1.in 2011-07-04 21:25:04.000000000 -0500 13--- oprofile-0.9.7.orig/doc/opcontrol.1.in 2011-07-04 21:25:04.000000000 -0500
9+++ oprofile-0.9.7/doc/opcontrol.1.in 2012-07-02 14:02:16.358865420 -0500 14+++ oprofile-0.9.7/doc/opcontrol.1.in 2012-07-02 14:02:16.358865420 -0500
@@ -12,7 +17,7 @@ diff -ur oprofile-0.9.7.orig/doc/opcontrol.1.in oprofile-0.9.7/doc/opcontrol.1.i
12 .SH FILES 17 .SH FILES
13 .TP 18 .TP
14-.I /root/.oprofile/daemonrc 19-.I /root/.oprofile/daemonrc
15+.I /home/root/.oprofile/daemonrc 20+.I ROOTHOME/.oprofile/daemonrc
16 Configuration file for opcontrol 21 Configuration file for opcontrol
17 .TP 22 .TP
18 .I /var/lib/oprofile/samples/ 23 .I /var/lib/oprofile/samples/
@@ -24,7 +29,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1 oprofile-0.9.7/doc/oprofile.1
24 Configuration files 29 Configuration files
25 .TP 30 .TP
26-.I /root/.oprofile/daemonrc 31-.I /root/.oprofile/daemonrc
27+.I /home/root/.oprofile/daemonrc 32+.I ROOTHOME/.oprofile/daemonrc
28 Configuration file for opcontrol 33 Configuration file for opcontrol
29 .TP 34 .TP
30 .I /opt/oprofile-0.9.7-rc3/share/oprofile/ 35 .I /opt/oprofile-0.9.7-rc3/share/oprofile/
@@ -36,7 +41,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.1.in oprofile-0.9.7/doc/oprofile.1.in
36 Configuration files 41 Configuration files
37 .TP 42 .TP
38-.I /root/.oprofile/daemonrc 43-.I /root/.oprofile/daemonrc
39+.I /home/root/.oprofile/daemonrc 44+.I ROOTHOME/.oprofile/daemonrc
40 Configuration file for opcontrol 45 Configuration file for opcontrol
41 .TP 46 .TP
42 .I @prefix@/share/oprofile/ 47 .I @prefix@/share/oprofile/
@@ -48,7 +53,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html oprofile-0.9.7/doc/oprofile.html
48 <p> 53 <p>
49 Followed by list arguments for profiling set up. List of arguments 54 Followed by list arguments for profiling set up. List of arguments
50- saved in <code class="filename">/root/.oprofile/daemonrc</code>. 55- saved in <code class="filename">/root/.oprofile/daemonrc</code>.
51+ saved in <code class="filename">/home/root/.oprofile/daemonrc</code>. 56+ saved in <code class="filename">ROOTHOME/.oprofile/daemonrc</code>.
52 Giving this option is not necessary; you can just directly pass one 57 Giving this option is not necessary; you can just directly pass one
53 of the setup options, e.g. <span class="command"><strong>opcontrol --no-vmlinux</strong></span>. 58 of the setup options, e.g. <span class="command"><strong>opcontrol --no-vmlinux</strong></span>.
54 </p> 59 </p>
@@ -57,7 +62,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.html oprofile-0.9.7/doc/oprofile.html
57 <p> 62 <p>
58 Start data collection with either arguments provided by <code class="option">--setup</code> 63 Start data collection with either arguments provided by <code class="option">--setup</code>
59- or information saved in <code class="filename">/root/.oprofile/daemonrc</code>. Specifying 64- or information saved in <code class="filename">/root/.oprofile/daemonrc</code>. Specifying
60+ or information saved in <code class="filename">/home/root/.oprofile/daemonrc</code>. Specifying 65+ or information saved in <code class="filename">ROOTHOME/.oprofile/daemonrc</code>. Specifying
61 the addition <code class="option">--verbose</code> makes the daemon generate lots of debug data 66 the addition <code class="option">--verbose</code> makes the daemon generate lots of debug data
62 whilst it is running. 67 whilst it is running.
63 </p> 68 </p>
@@ -69,7 +74,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml oprofile-0.9.7/doc/oprofile.xml
69 <listitem><para> 74 <listitem><para>
70 Followed by list arguments for profiling set up. List of arguments 75 Followed by list arguments for profiling set up. List of arguments
71- saved in <filename>/root/.oprofile/daemonrc</filename>. 76- saved in <filename>/root/.oprofile/daemonrc</filename>.
72+ saved in <filename>/home/root/.oprofile/daemonrc</filename>. 77+ saved in <filename>ROOTHOME/.oprofile/daemonrc</filename>.
73 Giving this option is not necessary; you can just directly pass one 78 Giving this option is not necessary; you can just directly pass one
74 of the setup options, e.g. <command>opcontrol --no-vmlinux</command>. 79 of the setup options, e.g. <command>opcontrol --no-vmlinux</command>.
75 </para></listitem> 80 </para></listitem>
@@ -78,7 +83,7 @@ diff -ur oprofile-0.9.7.orig/doc/oprofile.xml oprofile-0.9.7/doc/oprofile.xml
78 <listitem><para> 83 <listitem><para>
79 Start data collection with either arguments provided by <option>--setup</option> 84 Start data collection with either arguments provided by <option>--setup</option>
80- or information saved in <filename>/root/.oprofile/daemonrc</filename>. Specifying 85- or information saved in <filename>/root/.oprofile/daemonrc</filename>. Specifying
81+ or information saved in <filename>/home/root/.oprofile/daemonrc</filename>. Specifying 86+ or information saved in <filename>ROOTHOME/.oprofile/daemonrc</filename>. Specifying
82 the addition <option>--verbose</option> makes the daemon generate lots of debug data 87 the addition <option>--verbose</option> makes the daemon generate lots of debug data
83 whilst it is running. 88 whilst it is running.
84 </para></listitem> 89 </para></listitem>
@@ -90,7 +95,7 @@ diff -ur oprofile-0.9.7.orig/gui/oprof_start_util.cpp oprofile-0.9.7/gui/oprof_s
90 string const get_config_dir() 95 string const get_config_dir()
91 { 96 {
92- return "/root"; 97- return "/root";
93+ return "/home/root"; 98+ return "ROOTHOME";
94 } 99 }
95 100
96 string daemon_pid; 101 string daemon_pid;
@@ -102,7 +107,7 @@ diff -ur oprofile-0.9.7.orig/utils/opcontrol oprofile-0.9.7/utils/opcontrol
102 107
103 # location for daemon setup information 108 # location for daemon setup information
104- SETUP_DIR="/root/.oprofile" 109- SETUP_DIR="/root/.oprofile"
105+ SETUP_DIR="/home/root/.oprofile" 110+ SETUP_DIR="ROOTHOME/.oprofile"
106 SETUP_FILE="$SETUP_DIR/daemonrc" 111 SETUP_FILE="$SETUP_DIR/daemonrc"
107 SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new" 112 SEC_SETUP_FILE="$SETUP_DIR/daemonrc_new"
108 113