相关的资源:
system/core/init/init.c
system/core/init/bootchart.c
system/core/init/README.BOOTCHART
* re-build init
cd android-source
$ touch system/core/init/init.c
$source build/envsetup.sh
$ m INIT_BOOTCHART=true PRODUCT-full_panda_-eng -j4
* set bootchart time out
(My development environment is boot from NFS Server with Hybird Arch)
$cd target-android/data
$touch bootchart-start
$echo 120 > bootchart-start
*see BootChart Logs
/android/data/bootchart # ls -lt
-rwxr-xr-x 1 root root 631673 Feb 27 2012 proc_stat.log
-rwxr-xr-x 1 root root 6902468 Feb 27 2012 proc_ps.log
-rwxr-xr-x 1 root root 668230 Feb 27 2012 proc_diskstats.log
-rw-rw-rw- 1 root root 329 Feb 27 2012 header
-rw-r--r-- 1 root root 0 Feb 27 2012 kernel_pacct
/android/data/bootchart #
* grab BootChart
** Modify script, because of adb is not available
- #!/bin/sh
-
#
-
# this script is used to retrieve the bootchart log generated
-
# by init when compiled with INIT_BOOTCHART=true.
-
#
-
# for all details, see //device/system/init/README.BOOTCHART
-
#
-
TMPDIR=/tmp/android-bootchart
-
TFTP_ROOT=/tftpboot/pandaboard01/android
-
rm -rf $TMPDIR
-
mkdir -p $TMPDIR
-
-
LOGROOT=$TFTP_ROOT/data/bootchart
-
TARBALL=bootchart.tgz
-
-
FILES="header proc_stat.log proc_ps.log proc_diskstats.log kernel_pacct"
-
-
for f in $FILES; do
-
cp $LOGROOT/$f $TMPDIR/$f 2>&1 > /dev/null
-
done
-
(cd $TMPDIR && tar -czf $TARBALL $FILES)
-
cp -f $TMPDIR/$TARBALL ./$TARBALL
-
echo "look at $TARBALL"
* Install BootChart at Host
** The Bootchart of Ubuntu doesn't seem to work at the moment, you can generate an image on your machine by doing the following:
1/ download the sources from
2/ unpack them
3/in the source directory,type 'ant 'to build the bootchart program
**firstly ,export JAVA_HOME at .profile, e.g.
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.26"
export PATH=$PATH:$JAVA_HOME/bin
4/type 'java -jar bootchart.jar path/to/bootchart.tgz
* Generate Boot Chart
$java -jar bootchart.jar path/to/bootchart.tgz
*retrieve the data from the target
**$cd data
**$ rm -r bootchart
**$ rm bootchart-start
##reboot
**$echo 120 > bootchart-start
##reboot
阅读(1694) | 评论(0) | 转发(0) |