LTP在arm-linux-交叉编译环境上的安装
来源:互联网 发布:热门网络歌曲 编辑:程序博客网 时间:2024/05/16 06:13
一、 LTP 交叉编译:
1. 运行configure命令:
./configure CC=arm-none-linux-gnueabi-gcc --build=i686-pc-linux-gnu --target=arm-linux --host=arm-linux CFLAGS="-static" LDFLAGS="-static -pthread”
2. make
[make 过程中遇到的Error的修改]
(1) strip: Unable to recognise the format of the input file `test_arch_stripped'
make[4]: *** [test_arch_stripped] Error 1
解决方法: 只要在运行make命令,就OK了。
(2) /opt/toolchains/arm-2009q3/bin/../arm-none-linux-gnueabi/libc/usr/lib/libc.a(syslog.o): In function `openlog':
syslog.c:(.text+0x448): multiple definition of `openlog'…….
make[4]: *** [random-access] Error 1
解决方法:将./testcases/kernel/fs/fs-bench/random-access.c文件中的openlog变量全部替换掉:
:%s/openlog/test_openlog/g
(3) /opt/toolchains/arm-2009q3/bin/../arm-none-linux-gnueabi/libc/usr/lib/libc.a(syslog.o): In function `openlog':
syslog.c:(.text+0x448): multiple definition of `openlog'…..
make[4]: *** [random-access-del-create] Error 1
解决方法:将./testcases/kernel/fs/fs-bench/ random-access-del-create.c文件中的openlog变量全部替换掉:
:%s/openlog/openlog_test/g
3. 运行 sudo make install; /opt/ltp下就是可以在Android上运行的binary。
二、 LTP 运行环境的建立
由于LTP运行脚本中,用到很多shell的命令,而android的adb shell只支持部分linux标准的bash shell中的部分命令,所以需要用busybox。
1. 导入busybox
adb remount
adb push c:\busybox /data/busybox
adb shell
2. 在adb shell中设置busybox的权限
chmod 777 /data/busybox
3. 从busybox中导出需要支持的命令:
(1) 建立shell
- mount -o remount /dev/block/mmcblk0p9 /system
- cd /system/bin;
- rm sh;
- ln -s /data/busybox sh
(2) 在/system/bin中建立如下软连接:
- mount -o remount /dev/block/mmcblk0p9 /system
- cd /system/bin
- ln -s /data/busybox dirname
- ln -s /data/busybox basename
- rm rm;
- ln -s /data/busybox rm
- rm mkdir;
- ln -s /data/busybox mkdir
- ln -s /data/busybox mktemp
- ln -s /data/busybox awk
- ln -s /data/busybox grep
- ln -s /data/busybox sed
- ln -s /data/busybox cut
- ln -s /data/busybox free
- ln -s /data/busybox head
- ln -s /data/busybox ldd
- ln -s /data/busybox fdformat
- ln -s /data/busybox touch
- ln -s /data/busybox tr
4. 导入编译好的binary
adb push c:\ltp_arm.tgz /data/
5. 解压源文件
/data/busybox tar -xzvf ltp_arm.tgz
6. 设置权限。
/data/busybox chmod 777 ltp -R
三、 LTP测试运行:
1.在adb shell中运行如下命令:
mount -o remount rootfs /
2.运行LTP测试的命令:
cd /data/ltp
/data/busybox ./runltp -p -l /tmp/resultlog.20051221 -d /tmp -o /tmp/ltpscreen.20051221 -t 1m
./runltp -p -l /tmp/resultlog.20051221 -d /tmp -o /tmp/ltpscreen.20051221 -t 1m
具体的测试项需要继续研究。。。
1. 运行configure命令:
./configure CC=arm-none-linux-gnueabi-gcc --build=i686-pc-linux-gnu --target=arm-linux --host=arm-linux CFLAGS="-static" LDFLAGS="-static -pthread”
2. make
[make 过程中遇到的Error的修改]
(1) strip: Unable to recognise the format of the input file `test_arch_stripped'
make[4]: *** [test_arch_stripped] Error 1
解决方法: 只要在运行make命令,就OK了。
(2) /opt/toolchains/arm-2009q3/bin/../arm-none-linux-gnueabi/libc/usr/lib/libc.a(syslog.o): In function `openlog':
syslog.c:(.text+0x448): multiple definition of `openlog'…….
make[4]: *** [random-access] Error 1
解决方法:将./testcases/kernel/fs/fs-bench/random-access.c文件中的openlog变量全部替换掉:
:%s/openlog/test_openlog/g
(3) /opt/toolchains/arm-2009q3/bin/../arm-none-linux-gnueabi/libc/usr/lib/libc.a(syslog.o): In function `openlog':
syslog.c:(.text+0x448): multiple definition of `openlog'…..
make[4]: *** [random-access-del-create] Error 1
解决方法:将./testcases/kernel/fs/fs-bench/ random-access-del-create.c文件中的openlog变量全部替换掉:
:%s/openlog/openlog_test/g
3. 运行 sudo make install; /opt/ltp下就是可以在Android上运行的binary。
二、 LTP 运行环境的建立
由于LTP运行脚本中,用到很多shell的命令,而android的adb shell只支持部分linux标准的bash shell中的部分命令,所以需要用busybox。
1. 导入busybox
adb remount
adb push c:\busybox /data/busybox
adb shell
2. 在adb shell中设置busybox的权限
chmod 777 /data/busybox
3. 从busybox中导出需要支持的命令:
(1) 建立shell
- mount -o remount /dev/block/mmcblk0p9 /system
- cd /system/bin;
- rm sh;
- ln -s /data/busybox sh
(2) 在/system/bin中建立如下软连接:
- mount -o remount /dev/block/mmcblk0p9 /system
- cd /system/bin
- ln -s /data/busybox dirname
- ln -s /data/busybox basename
- rm rm;
- ln -s /data/busybox rm
- rm mkdir;
- ln -s /data/busybox mkdir
- ln -s /data/busybox mktemp
- ln -s /data/busybox awk
- ln -s /data/busybox grep
- ln -s /data/busybox sed
- ln -s /data/busybox cut
- ln -s /data/busybox free
- ln -s /data/busybox head
- ln -s /data/busybox ldd
- ln -s /data/busybox fdformat
- ln -s /data/busybox touch
- ln -s /data/busybox tr
4. 导入编译好的binary
adb push c:\ltp_arm.tgz /data/
5. 解压源文件
/data/busybox tar -xzvf ltp_arm.tgz
6. 设置权限。
/data/busybox chmod 777 ltp -R
三、 LTP测试运行:
1.在adb shell中运行如下命令:
mount -o remount rootfs /
2.运行LTP测试的命令:
cd /data/ltp
/data/busybox ./runltp -p -l /tmp/resultlog.20051221 -d /tmp -o /tmp/ltpscreen.20051221 -t 1m
./runltp -p -l /tmp/resultlog.20051221 -d /tmp -o /tmp/ltpscreen.20051221 -t 1m
具体的测试项需要继续研究。。。
- LTP在arm-linux-交叉编译环境上的安装
- 在linux上配置arm交叉编译虚拟环境
- 在Ubuntu10.10下安装arm-linux交叉编译环境
- 安装交叉编译环境arm-linux-gcc
- 安装arm-linux-gcc交叉编译环境
- CentOS7 安装ARM Linux交叉编译环境
- arm-linux-gcc交叉编译环境的安装
- libpcap 1.6.2在ARM处理器环境下的交叉编译(附arm-linux-gcc安装)
- arm-linux交叉编译环境的配置
- arm-linux交叉编译环境的搭建
- ARM-LINUX交叉编译环境的搭建
- 用NDK在Ubuntu14.04上安装arm交叉编译环境
- arm交叉编译环境安装
- 在debian上搭建arm-linux-gcc-4.4.3交叉编译环境
- 在Ubuntu13.10上自己动手搭建交叉编译环境arm-linux-gcc-4.8.2
- 在Ubuntu13.10上自己动手搭建交叉编译环境arm-linux-gcc-4.8.2
- 在Ubuntu13.10上自己动手搭建交叉编译环境arm-linux-gcc-4.8.2
- vmware虚拟机上ubuntu操作系统安装arm-linux-gcc交叉编译环境
- Linux下常用配置文件及常用命令介绍(来自PConline)
- android 画实心矩形框和空心矩形框的设置
- 进程管理之yield()
- Android-ADB常用命令
- 做有意义的事
- LTP在arm-linux-交叉编译环境上的安装
- 【DP,lcs问题】整理队形
- SQL Server 2008 Express
- 深入浅出之正则表达式(一)
- 请告诉我,你为什么这样说?
- Django的Cookie和Session
- 实用命令:利用openssl进行BASE64编码解码、md5/sha1摘要、AES/DES3加密解密
- xcode快捷键
- 日语练习