Run XYZAC through upstream LinuxCNC TP

This commit is contained in:
2026-09-01 11:44:05 +08:00
parent bbdfad8364
commit d18141ec81
23 changed files with 1550 additions and 139 deletions

View File

@@ -5,9 +5,13 @@ ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
SOURCE_ROOT="${ROOT}/linuxcnc"
PATCH_FILE="${ROOT}/patches/linuxcnc/0001-export-native-task-heartbeat.patch"
if ! rg -q 'task_heartbeat' "${SOURCE_ROOT}/src/emc/usr_intf/axis/extensions/emcmodule.cc"; then
if ! rg -q 'task_heartbeat' "${SOURCE_ROOT}/src/emc/usr_intf/axis/extensions/emcmodule.cc" || ! rg -q 'motion_heartbeat' "${SOURCE_ROOT}/src/emc/usr_intf/axis/extensions/emcmodule.cc"; then
patch --forward --batch -p1 -d "${SOURCE_ROOT}" < "${PATCH_FILE}"
fi
TRACE_PATCH_FILE="${ROOT}/patches/linuxcnc/0002-native-servo-trace.patch"
if ! rg -q 'xyzac_trace_tick' "${SOURCE_ROOT}/src/emc/motion/control.c"; then
patch --forward --batch -p1 -d "${SOURCE_ROOT}" < "${TRACE_PATCH_FILE}"
fi
make -C "${SOURCE_ROOT}/src" ../lib/python/linuxcnc.so ../bin/milltask
printf '%s\n' 'LinuxCNC native oracle build ready: source linuxcnc.so + milltask'
make -C "${SOURCE_ROOT}/src" ../lib/python/linuxcnc.so ../bin/milltask ../rtlib/motmod.so
printf '%s\n' 'LinuxCNC native oracle build ready: source linuxcnc.so + milltask + motmod.so'