移植 Samba 3.2.0 到arm linux
先用autogen.sh生成configure, 由于该脚本中对于交叉编译部分支持有问题, 需要做一些修改, 基本上就是把类似于这样的代码 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compilingSee /
·
先用autogen.sh生成configure, 由于该脚本中对于交叉编译部分支持有问题, 需要做一些修改, 基本上就是把类似于这样的代码
改为
然后configure,
生成了Makefile和include/config.h等文件, 由于configure的时候用到了HOST系统下的一些头文件, 所以生成config.h中有些地方需要手动修改.我改动过的地方如下:
我使用的如下脚本:
build.sh:
Good luck!
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
- See /`config.log' for more details." >&5
- echo "$as_me: error: cannot run test program while cross compiling
- See /`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
改为
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
- See /`config.log' for more details." >&5
- echo "$as_me: error: cannot run test program while cross compiling
- See /`config.log' for more details." >&2;}
- }
- #modified: { (exit 1); exit 1; }; }
生成了Makefile和include/config.h等文件, 由于configure的时候用到了HOST系统下的一些头文件, 所以生成config.h中有些地方需要手动修改.我改动过的地方如下:
- 797 /* Whether the system has IPv6 support */
- 798 //robin: #define HAVE_IPV6 1
- 799
- 2648 /* Whether seteuid() is available */
- 2649 /* #undef USE_SETEUID */
- 2650 // rboin:
- 2651 #define USE_SETEUID 1
我使用的如下脚本:
build.sh:
- export CFLAGS='-O3 -w -isystem /usr/local/arm-linux/include'
- export CPPFLAGS='-O3 -w -isystem /usr/local/arm-linux/include'
- export PATH=/usr/local/arm-linux/bin:$PATH
- export LD_LIBRARY_PATH=/usr/local/arm-linux/bin/arm-linux-gcc
- export CC=/usr/local/arm-linux/bin/arm-linux-gcc
- export CPP=/usr/local/arm-linux/bin/arm-linux-cpp
- MQARMDIR=/board/bin
- MQUSERDIR=/board/config
- ./configure --build=x86-linux --host=arm-linux --target=arm-linux /
- --includedir=/usr/local/arm-linux/include /
- --oldincludedir=/usr/local/arm-linux/include /
- --disable-largefile /
- --enable-swat=no /
- --enable-cup=no /
- --enable-iprint=no /
- --enable-pie=no /
- --enable-fam=no /
- --enable-static=yes /
- --enable-shared-libs=no /
- --enable-dnssd=no /
- --with-ldap=no /
- --with-ads=no /
- --with-cifsmount=no /
- --with-utmp=no /
- --with-libtalloc=no /
- --with-libtdb=no /
- --with-libnetapi=no /
- --with-libaddns=no /
- --with-libsmbclient=no /
- --with-libsmbsharemodes=no /
- --with-acl-support=no /
- --with-sendfile-support=no /
- --with-winbind=no /
- --with-static-modules=nmbd,smbd,smbclient,smbpasswd /
- --bindir=$MQARMDIR/bin /
- --sbindir=$MQARMDIR/bin /
- --localstatedir=$MQUSERDIR/samba/var /
- --libdir=$MQARMDIR/lib /
- --with-privatedir=$MQUSERDIR/samba/private /
- --with-rootsbindir=$MQARMDIR/bin /
- --with-lockdir=$MQUSERDIR/samba/var/locks /
- --with-configdir=$MQUSERDIR/samba /
- --with-logfilebase=$MQUSERDIR/samba/var /
- --with-piddir=$MQUSERDIR/samba/var
- cp config.h include/config.h
- make clean
- time make
更多推荐
已为社区贡献1条内容
所有评论(0)