How to Compile and Use rsync on an ARM Development Board
This guide explains what rsync is, walks through cross‑compiling it for an ARM board, shows how to install the binary, and demonstrates practical file‑synchronization commands with detailed flag explanations.
What is rsync?
rsync(remote sync) is a file‑synchronization utility that copies files between local directories or between a local host and a remote system. It transfers only changed parts of files, using size or modification time to detect differences.
Cross‑compiling rsync for an ARM board
Both the host and the target must have rsync installed; the target lacks it, so we compile from source for the ARM architecture.
Download the source archive from the official site:
https://download.samba.org/pub/rsync/
Extract and prepare a temporary installation prefix:
tar -xvf rsync-3.2.3.tar.gz
cd rsync-3.2.3
mkdir tmpGenerate a cross‑compilation Makefile. The basic command is:
./configure --prefix=$PWD/tmp \
--host=arm-linux-gnueabihf \
CC=arm-linux-gnueabihf-gccIf the configuration fails with SIMD‑related errors, disable SIMD and other optional components that are not required. Example:
./configure --prefix=$PWD/tmp \
--disable-simd \
--disable-openssl \
--disable-xxhash \
--disable-zstd \
--disable-lz4 \
--host=arm-linux-gnueabihf \
CC=arm-linux-gnueabihf-gccAfter a successful configuration, build and install:
make
make installThe resulting rsync binary is placed in the tmp directory (e.g., tmp/usr/bin/rsync). Transfer it to the board, for example:
scp rsync [email protected]:/usr/bin/Using rsync for incremental synchronization
On the board create a directory with test files (e.g., 100 files). From the host, synchronize the directory to the current working directory:
rsync -avzu --progress [email protected]:/root/test .Common options: -a – archive mode (preserves timestamps, permissions, owners, etc.) -v – verbose output -z – compress data during transfer -u – skip files that are newer on the destination --progress – show transfer progress
Running the command again after adding new files on the board transfers only the new or changed files, demonstrating rsync’s incremental update capability.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
