This repository is used to build the IgH EtherCAT Master (including user-space tools and cross-compiled kernel modules), generating Debian packages for robots and other target systems.
ethercat/: IgH EtherCAT source code submodule.debian/: Debian packaging configurations (control, rules, etc.) and maintainer scripts.
Ensure you have initialized and updated the submodule code:
git submodule update --init --recursiveInstall the necessary build tools on your host OS:
sudo apt install build-essential debhelper autoconf automake libtool pkg-configFor cross-compilation (e.g. for arm64), set the variables in debian/rules or export them before building:
export CROSS_COMPILE=/path/to/gcc-arm-.../bin/aarch64-none-linux-gnu-
export KERNEL_SRC=/path/to/orange-pi-kernel-source
export ARCH=arm64Note: Your kernel source (
KERNEL_SRC) must be pre-compiled (i.e. it must have a.configand compiled objects in the source tree), otherwise the kernel modules cannot be successfully built.
Run the Debian build command:
dpkg-buildpackage -us -uc -b -aarm64For native builds (same architecture as host), just run:
dpkg-buildpackage -us -uc -bThe final .deb artifacts will be output to the parent directory (sibling to igh-deb), dynamically bearing the kernel version signifier:
../ethercat-igh_<version>-<kernel_version>_arm64.debAfter transferring and installing the .deb package on the target device:
sudo dpkg -i ethercat-igh_*_arm64.debThe installation includes /lib/systemd/system/ethercat-first-boot.service, which automatically executes depmod -a and resolves module dependencies during the first system boot.
If you need to change your specific network device (default enP3p49s0 or eth0), edit the configuration:
sudo nano /etc/ethercat.confAnd restart the service:
sudo systemctl restart ethercat