summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2025-11-11 09:33:37 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2025-11-11 09:33:37 +0100
commit7bc77048d2bac80b675dbc0270a1a83559cb4b0f (patch)
tree3cd1ff74f97f67114153288f890983a0b28aa056
parentdd5bde0cbc6e3eb641fb9779dff9a23de88a52ea (diff)
build for radxa zero 3e on native debianimx287
-rw-r--r--CMakeLists.txt25
-rw-r--r--src/camera/ov9281.cpp4
-rw-r--r--src/image.cpp3
-rw-r--r--src/main.cpp2
4 files changed, 25 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6343f7d..b581a34 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,8 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC OFF)
# set(TARGET_SYSROOT /home/nikita/rpi/rpi-sysroot)
-set(TARGET_SYSROOT /home/nikita/rpi/rpi_zero-sysroot)
+# set(TARGET_SYSROOT /home/nikita/rpi/rpi_zero-sysroot)
+set(TARGET_SYSROOT /home/nikita/rpi/radxa-sysroot)
set(CMAKE_SYSROOT ${TARGET_SYSROOT})
message("CMAKE_SYSROOT: ${CMAKE_SYSROOT}")
set(CMAKE_LIBRARY_PATH ${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu)
@@ -27,6 +28,9 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/include")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
+# NOTE: /aarch64-none-linux-gnu/bin/ld: cannot find -lm: No such file or directory
+# DOESN'T WORK sudo apt install build-essential
+
# NOTE: in case of header issues during inno-maker driver compilation - try to
# reinstall linux-headers-<your exact running kernel version here>, like this
# sudo apt install linux-headers-6.6.74+rpt-rpi-v8 --reinstall
@@ -34,6 +38,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
# NOTE: on your rpi you'll need to install
# libcamera-dev, libcamera-ipa (TODO: check if ipa is needed)
# libqt6gui6
+# libqt6quickcontrols2-6
+# qt6-declarative-dev*
+# qt6-websockets-dev
+# pigpio-tools
+# fakeroot
# libqt6httpserver6
# libqt6serialport6 (if you want to control your 3d printer from rpi)
# libtbb-dev (or just comment out source code related to execution policies)
@@ -41,17 +50,21 @@ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
# don't forget to rsync local copy of rpi fs with real rpi fs
# NOTE: to be able to run orpheus remotely from QtCreator, run this on your RPI:
# $ sudo chown -R user:adm /usr/local/bin/
+
# NOTE: to use rotary encoder you'll need WiringPi which is not in rpi repos, so
# $ sudo apt install git
# $ git clone https://github.com/WiringPi/WiringPi.git
-# check README.md for installation instructions. You may get this while installing
-# .deb package, but it's ok:
-# N: Download is performed unsandboxed as root as file
-# '/home/user/git/third_party/WiringPi/wiringpi_3.12_arm64.deb' couldn't be
-# accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
+# check README.md for installation instructions.
+# $ sudo apt install fakeroot
+# $ cd WiringPi
# $ ./build debian
# $ mv debian-template/*.deb .
# $ sudo apt install ./*.deb
+# You may get this while installing .deb package, but it's ok:
+# N: Download is performed unsandboxed as root as file
+# '/home/user/git/third_party/WiringPi/wiringpi_3.12_arm64.deb' couldn't be
+# accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
+# run rsyng and cmake again
# NOTE: I've added ld symlink on host to be able to run moc
# arch:
diff --git a/src/camera/ov9281.cpp b/src/camera/ov9281.cpp
index a629a91..8f84255 100644
--- a/src/camera/ov9281.cpp
+++ b/src/camera/ov9281.cpp
@@ -119,8 +119,8 @@ bool OV9281::validateConfig()
<< std::endl;
std::cout << __func__ << ":\tbufferCount: " << streamConfig.bufferCount
<< std::endl;
- std::cout << __func__ << ":\torientation: " << m_config->orientation
- << std::endl;
+ // std::cout << __func__ << ":\torientation: " << m_config->orientation
+ // << std::endl;
break;
}
case CameraConfiguration::Status::Invalid: {
diff --git a/src/image.cpp b/src/image.cpp
index 9c258c6..e5265c7 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -227,6 +227,8 @@ void Image::copyFromData(const void *src, size_t size)
// data = (uint8_t *) src;
break;
}
+#define RADXA_HAS_NO_R16
+#ifndef RADXA_HAS_NO_R16
case libcamera::formats::R16: {
// std::cout << "R16" << std::endl;
// data_t &d = *data;
@@ -239,6 +241,7 @@ void Image::copyFromData(const void *src, size_t size)
}
break;
}
+#endif // RADXA_HAS_NO_R16
default:
throw std::logic_error(__func__ + std::string(": unsupported pixel format"));
break;
diff --git a/src/main.cpp b/src/main.cpp
index aab134e..bc0c00b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -21,7 +21,7 @@
#include "imagealgos.h"
#include "laser.h"
#include "macro.h"
-#include "pigpio.h"
+// #include "pigpio.h"
#include "printerclient.h"
#include "profile.h"
#include "rotaryencoder.h"