centos linux环境dbus arm交叉编译

1、安装交叉编译环境, 可参考: http://blog.csdn.net/Kevin_Mr/article/details/50815385

2、提前准备已经经过交叉编译的expat库,并放到合适的位置,由于涉及信息安全,expat库不能上传

3、dbus-1.10.6源码:http://download.csdn.net/detail/huashibuliao/9788761

4、dbus跟目录下执行:./configure CC=arm-linux-gcc CPPFLAGS='-I/home/lixiangtao/work/expat/include' LDFLAGS='-L/home/lixiangtao/work/expat/lib' --prefix= --host=arm-openwrt-linux --disable-static --disable-tests --with-dbus-user=root --disable-Werror --enable-epoll --without-x --with-session-socket-dir=/tmp/dbus/ --with-system-socket=/tmp/dbus/system_bus_socket --with-system-pid-file=/tmp/dbus/pid --datadir=/usr/share/ --bindir=/usr/bin/, 注意涉及到expat的路径需要根据具体情况修改

5、生成Makefile后编译:make

6、编译成功后,查看生成的可执行文件的格式,cd tools,如果有以下显示,则说明交叉编译成功了

[root@localhost tools]# file dbus-cleanup-sockets
dbus-cleanup-sockets: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped

你可能感兴趣的:(centos linux环境dbus arm交叉编译)