海思hi3519AV100编译samba文件服务器

mac2024-05-30  36

samba可以实现局域网间文件共享,比如海思终端和安卓终端,通过网口连接,由于一些大的文件通过socket发生太慢,故可以通过samba共享方式实现读写。

下载地址

https://download.samba.org/pub/samba/

1、解压源码

tar -xvf samba-3.0.37.tar.gz

2、进入源码目录

cd samba-3.0.37/source/

3、编译选项

./configure CC=arm-himix200-linux-gcc LD=arm-himix200-linux-ld ranlid=arm-himix200-linux-ranlid AR=arm-himix200-linux-ar --target=arm-linux --host=arm

错误:

checking GNU ld release version minor... 1 checking whether arm-himix200-linux-gcc and cc understand -c and -o together... yes checking that the C compiler understands -Werror... cross checking that the C compiler understands -w2... cross checking that the C compiler understands volatile... yes checking that the C compiler understands negative enum values... configure: error: in `/home/liushaohua/work_icv/samba-3.0.37/source': configure: error: cannot run test program while cross compiling See `config.log' for more details.

解决如下:

第588行cross_compiling=no下一行 添加test_cross_compiling=no 第11498行if test "$cross_compiling" = yes; then 修改为if test "$test_cross_compiling" = yes; then

 4、make 编译成功,生成的文件在samba-3.0.37/source/bin

5、终端配置及验证

mkdir -p /usr/local/samba/bin /usr/local/samba/lib /usr/local/samba/private /usr/local/samba/var 配置smb.conf 内容如下: global] workgroup = myworkgroup server string = samba netbios name =myarm guest account=root security =share interfaces = eth0 eth1 usb0 [hdd] path = /mnt guest ok=yes browseable=yes writable = yes 开机自运行 vi /etc/init.d/rcS 添加: /usr/local/samba/bin/smbd -D 验证 PC端输入\\192.168.1.88

 

最新回复(0)