How to Configure Samba Service on Allwinner T507-H Embedded Linux Board to Realize Cross-system File Sharing?

The Allwinner T507-H chip is widely used in various fields such as automotive electronics, power, healthcare, industrial control, IoT, and smart terminals. In complex embedded Linux application scenarios, it is important to break down the barriers between ARM boards and Windows devices in order to achieve cross-platform file sharing. Here’s how you can accomplish this:

We can use Samba, which is free software for SMB on Linux systems, to share files and printers between different operating systems. Samba makes it easy to share files between different platforms such as Linux, Windows and Mac, which greatly improves the efficiency of file transfer.

So, how to set up Samba service on the embedded OKT507-C development board?

01 Compile source code

1.Source code download address: http://ftp.samba.org/pub/samba/

Download the Samba source package and enter the source3 path:

Samba source package

2.Configure:

OKT507-C SBC Configure

./configure CC=aarch64-linux-gnu-gcc LD=aarch64-linux-gnu-ld AR=aarch64-linux-gnu-ar --target=arm-none-linux --host=arm-none-linux-gnueabihf samba_cv_CC_NEGATIVE_ENUM_VALUES=yes --cache-file=arm-linux.cache

3. Compile the source code (with only single-threaded compilation, without using the -j parameter):

make

4.make install Generate the installation file:

installation file

Specify the installation path in the Makefile

samba-3.4.17/source3$make install

installation file

02 Configuration Service

1.Extract the compressed package to the following path:

2.Create a new configuration file at the following path:

3.Edit the contents of the file:

[global]
workgroup = root
security = user
client lanman auth = yes
lanman auth = yes
map to guest = bad user
guest account = root

[project]
comment = project
path = /
available = yes
browseable = yes
public = yes
guest ok = yes
writable = yes

4.Add a library file

Copy the dynamic link library file in the following path to the/lib directory of the board:

5.Start the service

03 Application services

1.OKT507-C development board (Linux board) and Windows host to share files:

(1) Start the Samba service and configure the IP of the same network segment as the host:

OKT507-C development board

(2) Add Samba support in the Windows host:

Open the control panel to enter the following interface:

Open the control panel

Check the following three options:

(3) Enter the server IP in the file manager, and press Enter to see the shared path:

Enter the server IP

Enter the server IP

2.The Linux board shares directories with the Ubuntu virtual machine:

(1) Install cifs-utils:

Install cifs-utils

(2) Create a mount point:

Create a mount point

(3) Mount the shared directory:

Mount the shared directory

Mount the shared directory

At this point, we have completed the implementation of Samba service on the embedded OKT507-C development board of Forlinx, and successfully made this Linux board share files with Windows host and Ubuntu virtual machine.

Of course, the specific operation of different master control platform boards will be different, but the overall idea is the same. I hope that the method provided in this article can be helpful to the project development of engineers in front of the screen.