Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101087
  • 博文数量: 21
  • 博客积分: 1192
  • 博客等级: 少尉
  • 技术积分: 227
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-22 11:00
文章分类

全部博文(21)

文章存档

2014年(1)

2012年(16)

2011年(4)

分类: 嵌入式

2012-02-27 11:08:30

相关的资源:
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
  1. #!/bin/sh
  2. #
  3. # this script is used to retrieve the bootchart log generated
  4. # by init when compiled with INIT_BOOTCHART=true.
  5. #
  6. # for all details, see //device/system/init/README.BOOTCHART
  7. #
  8. TMPDIR=/tmp/android-bootchart
  9. TFTP_ROOT=/tftpboot/pandaboard01/android
  10. rm -rf $TMPDIR
  11. mkdir -p $TMPDIR

  12. LOGROOT=$TFTP_ROOT/data/bootchart
  13. TARBALL=bootchart.tgz

  14. FILES="header proc_stat.log proc_ps.log proc_diskstats.log kernel_pacct"

  15. for f in $FILES; do
  16. cp $LOGROOT/$f $TMPDIR/$f 2>&1 > /dev/null
  17. done
  18. (cd $TMPDIR && tar -czf $TARBALL $FILES)
  19. cp -f $TMPDIR/$TARBALL ./$TARBALL
  20. 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) |
给主人留下些什么吧!~~