编译powerdebug源码
来源:互联网 发布:java论坛源码 编辑:程序博客网 时间:2024/06/04 01:24
# 编译powerdebug源码
# v0.1 2013.12.11 ***
# 简介:powerdebug是linaro自己做的一个关于功耗的调试工具。之前的版本是0.6.4,
目前为止linaro网站上最新的版本是0.7.1
# 编译过程:
1. 下载powerdebug源代码:
http://releases.linaro.org/13.09/components/power-management/powerdebug/
2. 直接make编译,发现没有libncurses库
3. 下载ncurses库的源代码, configure, make, make install得到编译好的库
(1) http://ftp.gnu.org/pub/gnu/ncurses/
(2) ./configure --prefix=/vm/***/development/powerdebug/ncurses
--host=arm-linux --without-cxx
export CC=arm-linux-gnueabi-gcc
make
make install
注:--prefix 表明最后把编译好的库放到哪里, --host 表明库的运行在什么架构
的机器上,这里是在x86机器上编译放在arm机器上运行的库, --build(没有用
到) 表明是在什么机器上编译,这里是x86-linux,没有直接指出,编译的时候
会自动的检测到. --target(没有用到) 表明编译好的软件处理什么架构下的
程序, 一般用不到,在编译gcc源码的时候要用到
4. 改powerdebug的Makefile,在其中添加静态连接库的搜索路径
(1) LDFLAGS=-L/vm/***/development/powerdebug/ncurses
(2) $(CC) ${CFLAGS} $(OBJS) ${LDFLAGS} -lncurses -o powerdebug -v
注:直接在Makefile中加入(1), 在(2)所在的行中加入${LDFLAGS}
5. make编译得到可在arm平台上运行的powerdebug, adb push到相应的平台上:
到powerdebug路径下:make
adb push powerdebug /
6. 修改arm平台上的终端配置:
export TERM=xterm-256color
export TERM=/system/etc/terminfo
(注:export TERM=/system/etc/terminfo/x/xterm-256color,指定terminfo后面
的具体内容后会出现Error opening terminal: xterm-256color.)
# 最终结果:
1. root@android:/ # /powerdebug
failed to initialize clock details (check debugfs)
linaro的网站上有人提出这是一个bug:
https://bugs.launchpad.net/linaro-powerdebug/+bug/1229658
但是没有做任何调整后(只是依照上面,查看了一下clk和gpio目录),clock竟然有
了显示
1. clock栏的数据
PowerDebug 0.7.1 Clocks Regulators Sensors Gpio
Name Flags Rate Usecount Children
osc32khz 0x30 32KHZ 0 1
0 0 0
osc26mhz 0x30 26MHZ 0 15
8 8 0
apb_pclk 0x30 26MHZ 0 29
25 25 0
armpll0 0x30 1600MHZ 0 0
0 0 0
armpll1 0x30 1600MHZ 0 0
0 0 0
armpll2 0x30 1440MHZ 0 10
4 4 0
armpll3 0x30 1440MHZ 0 1
0 0 0
armpll4 0x30 1188MHZ 0 0
0 0 0
armpll5 0x30 1300MHZ 0 0
0 0 0
14mhz 0x30 14MHZ 0 0
0 0 0
orphans 0x0 0 0 2
2. Regulators栏数据
PowerDebug 0.7.1 Clocks Regulators Sensors Gpio
Name Status State Type UsersMicrovolts Min u-vo
regulator-dummy voltage 0 0 0
0
LDO0 enabled voltage 1 2850000 2850000
2850000
008G4B MMC 0 0 0
0
LDO1 enabled voltage 0 1800000 1700000
2000000
LDO2 enabled voltage 0 1150000 1050000
1400000
LDO3 enabled voltage 0 1250000 1050000
1400000
LDO4 enabled voltage 0 2500000 1500000
3000000
LDO5 enabled voltage 0 2700000 1500000
3000000
008G4B MMC 0 0 0
0
LDO6 enabled voltage 0 2700000 1500000
3000000
ts-mxt224e 0 0 0
# v0.1 2013.12.11 ***
# 简介:powerdebug是linaro自己做的一个关于功耗的调试工具。之前的版本是0.6.4,
目前为止linaro网站上最新的版本是0.7.1
# 编译过程:
1. 下载powerdebug源代码:
http://releases.linaro.org/13.09/components/power-management/powerdebug/
2. 直接make编译,发现没有libncurses库
3. 下载ncurses库的源代码, configure, make, make install得到编译好的库
(1) http://ftp.gnu.org/pub/gnu/ncurses/
(2) ./configure --prefix=/vm/***/development/powerdebug/ncurses
--host=arm-linux --without-cxx
export CC=arm-linux-gnueabi-gcc
make
make install
注:--prefix 表明最后把编译好的库放到哪里, --host 表明库的运行在什么架构
的机器上,这里是在x86机器上编译放在arm机器上运行的库, --build(没有用
到) 表明是在什么机器上编译,这里是x86-linux,没有直接指出,编译的时候
会自动的检测到. --target(没有用到) 表明编译好的软件处理什么架构下的
程序, 一般用不到,在编译gcc源码的时候要用到
4. 改powerdebug的Makefile,在其中添加静态连接库的搜索路径
(1) LDFLAGS=-L/vm/***/development/powerdebug/ncurses
(2) $(CC) ${CFLAGS} $(OBJS) ${LDFLAGS} -lncurses -o powerdebug -v
注:直接在Makefile中加入(1), 在(2)所在的行中加入${LDFLAGS}
5. make编译得到可在arm平台上运行的powerdebug, adb push到相应的平台上:
到powerdebug路径下:make
adb push powerdebug /
6. 修改arm平台上的终端配置:
export TERM=xterm-256color
export TERM=/system/etc/terminfo
(注:export TERM=/system/etc/terminfo/x/xterm-256color,指定terminfo后面
的具体内容后会出现Error opening terminal: xterm-256color.)
# 最终结果:
1. root@android:/ # /powerdebug
failed to initialize clock details (check debugfs)
linaro的网站上有人提出这是一个bug:
https://bugs.launchpad.net/linaro-powerdebug/+bug/1229658
但是没有做任何调整后(只是依照上面,查看了一下clk和gpio目录),clock竟然有
了显示
1. clock栏的数据
PowerDebug 0.7.1 Clocks Regulators Sensors Gpio
Name Flags Rate Usecount Children
osc32khz 0x30 32KHZ 0 1
0 0 0
osc26mhz 0x30 26MHZ 0 15
8 8 0
apb_pclk 0x30 26MHZ 0 29
25 25 0
armpll0 0x30 1600MHZ 0 0
0 0 0
armpll1 0x30 1600MHZ 0 0
0 0 0
armpll2 0x30 1440MHZ 0 10
4 4 0
armpll3 0x30 1440MHZ 0 1
0 0 0
armpll4 0x30 1188MHZ 0 0
0 0 0
armpll5 0x30 1300MHZ 0 0
0 0 0
14mhz 0x30 14MHZ 0 0
0 0 0
orphans 0x0 0 0 2
2. Regulators栏数据
PowerDebug 0.7.1 Clocks Regulators Sensors Gpio
Name Status State Type UsersMicrovolts Min u-vo
regulator-dummy voltage 0 0 0
0
LDO0 enabled voltage 1 2850000 2850000
2850000
008G4B MMC 0 0 0
0
LDO1 enabled voltage 0 1800000 1700000
2000000
LDO2 enabled voltage 0 1150000 1050000
1400000
LDO3 enabled voltage 0 1250000 1050000
1400000
LDO4 enabled voltage 0 2500000 1500000
3000000
LDO5 enabled voltage 0 2700000 1500000
3000000
008G4B MMC 0 0 0
0
LDO6 enabled voltage 0 2700000 1500000
3000000
ts-mxt224e 0 0 0
0 0
- 编译powerdebug源码
- 编译源码
- 源码编译
- 源码编译
- 源码编译
- QTP第三方调试器PowerDebug试用手记
- 编译android源码5---编译android源码
- android源码编译,模块编译
- CM源码(CyanogenMod)源码编译
- nginx源码浅析--源码编译
- 内核源码树编译
- JBOSS源码编译
- android源码的编译
- Android源码编译
- Android源码编译反思
- weka源码编译步骤
- Tomcat源码编译学习
- OSG源码编译
- .Net动态加载插件-反射
- centos6.5 64bit 安装 vsftp 的曲折道路
- 从Windows转向Linux教程 1
- 从Windows转向Linux教程 2
- disruptor
- 编译powerdebug源码
- SQL语言参考大全
- 基于visual Studio2013解决面试题之0205查找路径
- Understanding The Linux Kernel 3rd
- 学习笔记三:设计模式
- Boost程序库导论 1
- Boost程序库导论 2
- 深入分析Linux内核源码 1
- 深入分析Linux内核源码 2