From 7258ddca2963f0cb58ef337115892027974a6d5d Mon Sep 17 00:00:00 2001 From: Eric Katzfey Date: Mon, 16 Mar 2026 13:37:45 -0700 Subject: [PATCH] fix(boards/modalai/voxl2): fix Debian packaging build and dependencies Correct SLPI build directory path, CPack architecture variable name, and package dependency list. Add modalai_voxl2_deb Makefile dependency and unified build-pkg.sh script. --- Makefile | 1 + boards/modalai/voxl2/cmake/install.cmake | 3 +-- boards/modalai/voxl2/cmake/package.cmake | 4 ++-- boards/modalai/voxl2/scripts/build-pkg.sh | 11 +++++++++++ cmake/package.cmake | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) create mode 100755 boards/modalai/voxl2/scripts/build-pkg.sh diff --git a/Makefile b/Makefile index 6a8b5f6d56..105473f45a 100644 --- a/Makefile +++ b/Makefile @@ -230,6 +230,7 @@ $(CONFIG_TARGETS_DEFAULT): # VOXL2 apps processor (default) depends on SLPI DSP being built first modalai_voxl2_default: modalai_voxl2_slpi modalai_voxl2: modalai_voxl2_slpi +modalai_voxl2_deb: modalai_voxl2_slpi all_config_targets: $(ALL_CONFIG_TARGETS) all_default_targets: $(CONFIG_TARGETS_DEFAULT) diff --git a/boards/modalai/voxl2/cmake/install.cmake b/boards/modalai/voxl2/cmake/install.cmake index 31eeea4ff5..d68943fd67 100644 --- a/boards/modalai/voxl2/cmake/install.cmake +++ b/boards/modalai/voxl2/cmake/install.cmake @@ -35,7 +35,7 @@ # Included from platforms/posix/CMakeLists.txt where the px4 target exists # SLPI companion build output directory -set(VOXL2_SLPI_BUILD_DIR "${PX4_SOURCE_DIR}/build/modalai_voxl2-slpi_default") +set(VOXL2_SLPI_BUILD_DIR "${PX4_SOURCE_DIR}/build/modalai_voxl2_slpi") # Apps processor binary install(TARGETS px4 RUNTIME DESTINATION bin) @@ -55,7 +55,6 @@ install(PROGRAMS # DSP firmware blob from companion SLPI build install(FILES ${VOXL2_SLPI_BUILD_DIR}/platforms/qurt/libpx4.so DESTINATION lib/rfsa/adsp - OPTIONAL ) # Configuration files diff --git a/boards/modalai/voxl2/cmake/package.cmake b/boards/modalai/voxl2/cmake/package.cmake index 90ebd3d1d4..865e8d0fb1 100644 --- a/boards/modalai/voxl2/cmake/package.cmake +++ b/boards/modalai/voxl2/cmake/package.cmake @@ -40,14 +40,14 @@ string(REGEX REPLACE "-" "~" _deb_ver "${_deb_ver}" ) string(REGEX REPLACE "~([0-9]+)~" ".\\1." _deb_ver "${_deb_ver}") # VOXL2 is always aarch64 regardless of build host -set(CPACK_DEBIAN_ARCHITECTURE "arm64") +set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64") set(CPACK_DEBIAN_PACKAGE_NAME "voxl-px4") set(CPACK_DEBIAN_FILE_NAME "voxl-px4_${_deb_ver}_arm64.deb") set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") set(CPACK_INSTALL_PREFIX "/usr") set(CPACK_SET_DESTDIR true) -set(CPACK_DEBIAN_PACKAGE_DEPENDS "voxl-platform, librc-symlinks") +set(CPACK_DEBIAN_PACKAGE_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)") set(CPACK_DEBIAN_PACKAGE_CONFLICTS "px4-rb5-flight") set(CPACK_DEBIAN_PACKAGE_REPLACES "px4-rb5-flight") set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "PX4 Autopilot for ModalAI VOXL2") diff --git a/boards/modalai/voxl2/scripts/build-pkg.sh b/boards/modalai/voxl2/scripts/build-pkg.sh new file mode 100755 index 0000000000..2abe4ccc81 --- /dev/null +++ b/boards/modalai/voxl2/scripts/build-pkg.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "*** Starting unified VOXL2 build (apps + SLPI) ***" + +source /home/build-env.sh + +make modalai_voxl2_deb + +cat build/modalai_voxl2_default/src/lib/version/build_git_version.h + +echo "*** End of unified VOXL2 build ***" diff --git a/cmake/package.cmake b/cmake/package.cmake index b022604a25..948523960b 100644 --- a/cmake/package.cmake +++ b/cmake/package.cmake @@ -86,7 +86,7 @@ if("${CMAKE_SYSTEM}" MATCHES "Linux") set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "PX4 autopilot") set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") set(CPACK_DEBIAN_PACKAGE_SECTION "misc") - set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) # autogenerate dependency information set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)