summarylogtreecommitdiffstats
path: root/zed-sdk-bin.install
blob: baba3ad972a0147ac36a7cbc8f3cba5396c68316 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
post_install() {
    # SDK hardcodes /usr/local/zed at runtime
    if [ ! -e /usr/local/zed ]; then
        ln -sf /opt/zed /usr/local/zed
    fi
    # SDK binaries expect /usr/local/cuda
    if [ -d /opt/cuda ] && [ ! -e /usr/local/cuda ]; then
        ln -sf /opt/cuda /usr/local/cuda
    fi
    ldconfig
    cat << EOF

==> ZED SDK $1 installed to /opt/zed
==> Tool wrappers installed to /usr/bin/ (ZED_Studio, ZED_Explorer, ZED_Diagnostic, etc.)
==> To install the Python API, run:
      python /opt/zed/get_python_api.py
==> CMake config available at /usr/lib/cmake/zed/

==> IMPORTANT: USBFS memory buffer configuration
    A tmpfiles.d rule and modprobe.d config have been installed to set
    usbfs_memory_mb=256 at boot. This works on most systems automatically.
    For multi-camera setups, increase proportionally (e.g., 512 for 2 cameras)
    or set to 0 for unlimited by editing:
      /usr/lib/tmpfiles.d/zed-usbfs.conf
      /usr/lib/modprobe.d/zed-usbfs.conf

==> WARNING: ASMedia USB controller incompatibility
    ASMedia USB controllers (ASM2142, ASM3142, ASM3242) are known to cause
    silent failures with ZED cameras. V4L2 streaming may hang indefinitely.
    Use AMD native (Matisse, Renoir, X470+) or Intel XHCI controllers instead.

==> Make sure your user is in the 'video' group:
      sudo usermod -aG video \$USER

==> Reboot required for udev rules and USBFS changes to take effect.
    (Or run: udevadm control --reload-rules && udevadm trigger)

EOF
}

post_upgrade() {
    post_install
}

post_remove() {
    if [ "$(readlink -f /usr/local/zed 2>/dev/null)" = "/opt/zed" ]; then
        rm -f /usr/local/zed
    fi
    ldconfig
}