feat(packaging): add voxl2 Debian package build

Add make_package.sh and supporting files to build a .deb package
for the voxl2 target, bundling both the ARM64 apps processor binary
and Hexagon SLPI DSP library. The package version is derived from
the git tag and short commit hash. CI is updated to build and upload
the .deb alongside existing .px4 artifacts.
This commit is contained in:
Eric Katzfey
2026-03-10 16:10:33 -07:00
parent 107b708918
commit 48207d11db
5 changed files with 300 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
Package: voxl-px4
Version: 0.0.0
Section: devel
Priority: optional
Architecture: arm64
Depends: libfc-sensor (>=1.0.10),
voxl-px4-params (>=0.3.10),
voxl3-system-image(>=0.0.2) | voxl2-system-image(>=1.5.4) | rb5-system-image(>=1.6.2),
modalai-slpi(>=1.1.16) | modalai-adsp(>=1.0.2)
Replaces: px4-rb5-flight
Conflicts: px4-rb5-flight
Maintainer: Eric Katzfey <eric.katzfey@modalai.com>
Description: ModalAI PX4 flight controller for VOXL2
+91
View File
@@ -0,0 +1,91 @@
#!/bin/bash
################################################################################
# Post-install script for voxl-px4
#
# Creates px4 module symlinks, sets up directories, and handles DSP signatures.
################################################################################
set -e
################################################################################
# Create px4 module symlinks from px4-alias.sh
################################################################################
cd /usr/bin
if [ -f px4-alias.sh ]; then
# Auto-generate symlinks from the alias file produced by the build.
# Each alias line looks like: alias <name>='px4-<module> ...'
# We extract the px4-<module> part and create a symlink to the px4 binary.
grep "^alias " px4-alias.sh | grep -v "^alias set=" | \
sed -n "s/^alias [^=]*='\\(px4-[^ ']*\\).*/\\1/p" | \
sort -u | while read -r MODULE; do
ln -f -s px4 "$MODULE"
done
echo "Created px4 module symlinks"
else
echo "Warning: px4-alias.sh not found, skipping symlink creation"
fi
################################################################################
# Platform detection
################################################################################
PLATFORM="M0197"
if [ -x /usr/bin/voxl-platform ]; then
PLATFORM=$(/usr/bin/voxl-platform 2>/dev/null || echo "M0197")
fi
if [ "$PLATFORM" = "M0052" ]; then
echo "Error: M0052 is no longer supported"
exit 1
fi
echo "Platform: $PLATFORM"
################################################################################
# Create runtime directories
################################################################################
mkdir -p /data/px4/param
mkdir -p /data/px4/slpi
if [ "$PLATFORM" = "M0197" ]; then
chown fastrpc:fastrpc /data/px4/slpi
else
chown system:system /data/px4/slpi
fi
################################################################################
# DSP test signature
################################################################################
SIG_SCRIPT_DIR=/share/modalai/qrb5165-slpi-test-sig
if [ "$PLATFORM" = "M0197" ]; then
SIG_SCRIPT_DIR=/share/modalai/qcs6490-slpi-test-sig
fi
if /bin/ls /usr/lib/rfsa/adsp/testsig-*.so &>/dev/null; then
echo "Found DSP signature file"
else
echo "DSP signature file not found"
if [ -f "$SIG_SCRIPT_DIR/generate-test-sig.sh" ]; then
echo "Generating DSP signature..."
"$SIG_SCRIPT_DIR/generate-test-sig.sh"
else
echo "Warning: DSP signature generation script not found at $SIG_SCRIPT_DIR"
fi
fi
################################################################################
# Cleanup and reload
################################################################################
# Remove legacy config file
rm -f /etc/modalai/voxl-px4.config
sync
# Reload systemd if available
set +e
if [ -f /bin/systemctl ]; then
systemctl daemon-reload
fi
exit 0
@@ -0,0 +1,13 @@
[Unit]
Description=px4
After=sscrpcd.service
Requires=sscrpcd.service
[Service]
ExecStartPre=/bin/sleep 2
ExecStart=/usr/bin/voxl-px4
ExecStopPost=/usr/bin/voxl-reset-slpi
Restart=on-failure
[Install]
WantedBy=multi-user.target