Add distro/ubuntuCore for UC26 snap and image builds.
Centralize salmanoff snapcraft, dangerous-model image scripts, and QEMU workflow so UC26 can be reproduced from the SMO repo without ubuntu-core-practice. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Wrapper: plugin search path, OpenCL ICD, Rusticl llvmpipe, Gallium DRI, libcamera IPA.
|
||||
set -euo pipefail
|
||||
|
||||
shopt -s nullglob
|
||||
lib_dirs=("$SNAP/usr/lib/"*-linux-gnu)
|
||||
if ((${#lib_dirs[@]} > 0)); then
|
||||
lib_dir="${lib_dirs[0]}"
|
||||
else
|
||||
lib_dir="$SNAP/usr/lib"
|
||||
fi
|
||||
|
||||
export RUSTICL_ENABLE="${RUSTICL_ENABLE:-llvmpipe}"
|
||||
export OCL_ICD_VENDORS="${OCL_ICD_VENDORS:-$SNAP/etc/OpenCL/vendors}"
|
||||
export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH:-${lib_dir}/dri}"
|
||||
export LIBCAMERA_IPA_MODULE_PATH="${LIBCAMERA_IPA_MODULE_PATH:-${lib_dir}/libcamera}"
|
||||
export LIBCAMERA_IPA_CONFIG_PATH="${LIBCAMERA_IPA_CONFIG_PATH:-$SNAP/usr/share/libcamera/ipa}"
|
||||
export LD_LIBRARY_PATH="${lib_dir}:${SNAP}/usr/lib:${LD_LIBRARY_PATH:-}"
|
||||
|
||||
exec "${SNAP}/usr/bin/salmanoff" -p "${lib_dir}" "$@"
|
||||
@@ -0,0 +1,109 @@
|
||||
# Salmanoff snap for Ubuntu Core 26 (salmanoff-dev-amd64 dangerous model).
|
||||
# Build from distro/ubuntuCore: ../../scripts/build-snap.sh
|
||||
name: salmanoff
|
||||
version: "0.01.001"
|
||||
summary: Salmanoff cognitive robotics runtime
|
||||
description: |
|
||||
Sensor management runtime (SMO) with Livox LiDAR, libcamera, and OpenCL
|
||||
stimulus paths. Packaged for iterative snap-first development before seeding
|
||||
into an Ubuntu Core image.
|
||||
|
||||
grade: devel
|
||||
confinement: strict
|
||||
base: core26
|
||||
|
||||
lint:
|
||||
ignore:
|
||||
- unused-library:
|
||||
- usr/lib/*/libcoreComp.so*
|
||||
- usr/lib/*/liblcameraBuff.so*
|
||||
- usr/lib/*/liblcameraDev.so*
|
||||
- usr/lib/*/liblivoxGen1.so*
|
||||
- usr/lib/*/liblivoxProto1.so*
|
||||
- usr/lib/*/libattachmentSupport.so*
|
||||
- usr/lib/*/libspinscale.so*
|
||||
- usr/lib/*/libRusticlOpenCL.so*
|
||||
- usr/lib/*/libboost_log_setup.so*
|
||||
- usr/lib/*/libunwind*.so*
|
||||
- usr/lib/*/liburing-ffi.so*
|
||||
- usr/lib/*/libicu*.so*
|
||||
- usr/lib/*/liblttng*.so*
|
||||
|
||||
apps:
|
||||
salmanoff:
|
||||
command: bin/salmanoff-launch
|
||||
plugs:
|
||||
- network
|
||||
- network-bind
|
||||
- hardware-observe
|
||||
- camera
|
||||
- media-control
|
||||
environment:
|
||||
RUSTICL_ENABLE: llvmpipe
|
||||
OCL_ICD_VENDORS: $SNAP/etc/OpenCL/vendors
|
||||
|
||||
layout:
|
||||
/etc/OpenCL:
|
||||
bind: $SNAP/etc/OpenCL
|
||||
/usr/lib/clc:
|
||||
bind: $SNAP/usr/lib/clc
|
||||
/usr/lib/x86_64-linux-gnu/libcamera:
|
||||
bind: $SNAP/usr/lib/x86_64-linux-gnu/libcamera
|
||||
/usr/share/libcamera:
|
||||
bind: $SNAP/usr/share/libcamera
|
||||
|
||||
parts:
|
||||
launch:
|
||||
plugin: nil
|
||||
override-build: |
|
||||
install -Dm755 "$CRAFT_PROJECT_DIR/bin/salmanoff-launch" \
|
||||
"$CRAFT_PART_INSTALL/bin/salmanoff-launch"
|
||||
|
||||
salmanoff:
|
||||
after: [launch]
|
||||
plugin: cmake
|
||||
# SMO repo root (distro/ubuntuCore/snaps/salmanoff -> ../../../..)
|
||||
source: ../../..
|
||||
source-type: local
|
||||
source-submodules:
|
||||
- libspinscale
|
||||
build-packages:
|
||||
- build-essential
|
||||
- cmake
|
||||
- ninja-build
|
||||
- pkg-config
|
||||
- flex
|
||||
- bison
|
||||
- git
|
||||
- libboost1.88-dev
|
||||
- libboost-system1.88-dev
|
||||
- libboost-log1.88-dev
|
||||
- liburing-dev
|
||||
- libcamera-dev
|
||||
- ocl-icd-opencl-dev
|
||||
stage-packages:
|
||||
- libboost-system1.88.0
|
||||
- libboost-log1.88.0
|
||||
- liburing2
|
||||
- libcamera0.7
|
||||
- libcamera-ipa
|
||||
- ocl-icd-libopencl1
|
||||
- mesa-opencl-icd
|
||||
- libclc-20
|
||||
- mesa-libgallium
|
||||
- libgl1-mesa-dri
|
||||
cmake-parameters:
|
||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
- -DBoost_DIR=/usr/lib/x86_64-linux-gnu/cmake/Boost-1.88.0
|
||||
- -DENABLE_TESTS=OFF
|
||||
- -DENABLE_LIB_xcbXorg=OFF
|
||||
- -DENABLE_LIB_lcameraDev=ON
|
||||
- -DENABLE_STIMBUFFAPI_lcameraBuff=ON
|
||||
- -DENABLE_LCAMERADEV_TOOLS=OFF
|
||||
- -DCOMPILE_PCL_TOOLS=OFF
|
||||
override-pull: |
|
||||
craftctl default
|
||||
git -C "$CRAFT_PART_SRC" submodule update --init libspinscale
|
||||
prime:
|
||||
- -usr/lib/x86_64-linux-gnu/liburing-ffi.so*
|
||||
Reference in New Issue
Block a user