INDI/KStars/EKOS on an Orange Pi 5B
This is a guide for anyone willing to get their hands dirty in order to have the latest and greatest astrophotography software. In particular, it is for those of us with Olympus/OM Systems cameras and an Orange Pi.
A basic knowledge of Linux, git, and familiarity using the command line is assumed.
Operating System
ubuntu-rockchip
I chose to run one of Joshua Riek’s ubuntu-rockchip images rather than Orange Pi’s official images; I trust Ubuntu’s repositories a bit more than Xunlong’s.
Download the appropriate image from the releases page (which for me, happened to be v2.4.0/ubuntu-24.04-preinstalled-desktop-arm64-orangepi-5b.img.xz).
Flash the image to a microSD card using something like balenaEtcher.
Stick the microSD card in the Orange Pi and boot.
Installation
Follow the standard installation procedures: select a language, keyboard layout, and location. Then when creating your user account, put a check in Log in automatically. It will automatically reboot after the installation completes.
Upon first boot, it will ask if you would like to sign up for Ubuntu Pro and if you would like to share your data with the Ubuntu team. You can safely skip both of these.
After some time it will likely prompt you to run software updates. Skip these updates for now, and instead open up a Terminal and copy the currently running image to the eMMC:
$ sudo ubuntu-rockchip-install /dev/mmcblk0
After that finishes, shut it down, remove the microSD card, and boot it back up.
Software Updates
Now that we’ve booted directly from the eMMC (you removed the microSD card, right?), we can install the software updates:
$ sudo apt update && sudo apt upgrade
Then (optionally) install the Snap Store if you think you’d like to ever install software from there:
$ sudo apt install snapd && sudo snap install snap-store
KDE
While KDE isn’t required to run KStars/EKOS, it will make things look and behave much nicer. I won’t get into the specifics, just trust me on this one:
$ sudo apt install kde-standard
When prompted, set the display manager to sddm.
After that completes, we need to create an sddm display manager configuration:
$ sddm --example-config > custom.conf
Make the following changes, replacing <USERNAME> with the username you created:
Relogin=true
User=<USERNAME>
InputMethod=
Finally, create the local configuration directory and copy the new config file into it:
$ sudo mkdir /etc/sddm.conf.d && sudo cp custom.conf /etc/sddm.conf.d
Reboot.
NOTE: In my experience, the sddm-greeter can be a little finicky and might not display on the first boot. To “fix” this, you may have to cycle through the virtual terminals (Ctrl+Alt+F1 -> Ctrl+Alt+F2 -> Ctrl+Alt+F3, etc.) a couple of times until it appears on one of them. Once you get logged in for the first time, you should be good to go.
KDE System Settings
As the goal is to make a headless machine controlled via VNC, we will want to make a few tweaks to the default system settings:
Workspace Behavior
Screen Locking
Disable both options for Lock screen automatically
KDE Wallet
Uncheck Enable the KDE wallet subsystem
Power Management
Energy Saving
Disable Dim screen
Disable Screen Energy Saving
Disable Suspend session
Set When power button pressed to Shut down
Bluetooth
Click on Disable Bluetooth
VNC
There are many different VNC options, but the one I have always been happy with is x11vnc.
$ sudo apt install x11vnc
$ x11vnc -storepasswd
Create a new service using your favorite text editor (mine happens to be vim):
$ sudo vim /lib/systemd/system/x11vnc.service
Copy and paste the following into this file, replacing <USERNAME> with the username you created:
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
User=<USERNAME>
Group=<USERNAME>
ExecStart=/usr/bin/x11vnc -auth /tmp/xauth_* -forever -loop -noxdamage -repeat -rfbauth /home/<USERNAME>/.vnc/passwd -rfbport 5900 -shared
[Install]
WantedBy=multi-user.target
Install, enable, and start the new service:
$ sudo systemctl daemon-reload && \
sudo systemctl enable x11vnc.service && \
sudo systemctl start x11vnc.service
Hotspot
There are several ways to configure a Hotspot in Ubuntu, but this method has given me the best success:
Launch the Advanced Network Configuration application
Click + to add a new connection
Select Wi-Fi and click Create
On the Wi-Fi tab
Enter an SSID
Set Mode to Hotspot
Set Band to your desired band (if left on Automatic, some devices may not be able to find the hotspot)
On the Wi-Fi Security tab
Set Security to WPA/WPA2/WPA3 Personal
Set a Password
Theme
As a matter of preference, I like to switch to a dark theme and replace the background with something a little easier on the eyes at night. However, if you change the KDE theme via VNC, sometimes it makes x11vnc a bit… unhappy. If this happens to you, just reboot after applying the new theme and it usually clears things up.
Now for the Good Stuff!
Prerequisites
There are a handful of packages that need to be installed before we’ll be able to compile the good stuff:
$ sudo apt install autoconf autopoint breeze-icon-theme build-essential cdbs cmake dkms \
extra-cmake-modules fxload gettext kinit-dev libaa1-dev libavcodec-dev libavdevice-dev \
libboost-dev libboost-regex-dev libcdk5-dev libcfitsio-dev libcurl4-gnutls-dev libdc1394-dev \
libeigen3-dev liberfa-dev libev-dev libexif-dev libfftw3-dev libftdi-dev libftdi1-dev libgd-dev \
libgps-dev libgsl-dev libgtest-dev libjpeg-dev libkf5crash-dev libkf5doctools-dev libkf5kio-dev \
libkf5newstuff-dev libkf5notifications-dev libkf5notifyconfig-dev libkf5plotting-dev \
libkf5xmlgui-dev libkrb5-dev liblimesuite-dev libnova-dev libopencv-dev libpopt-dev \
libqt5datavisualization5-dev libqt5svg5-dev libqt5websockets5-dev libraw-dev libreadline-dev \
librtlsdr-dev libsecret-1-dev libstellarsolver-dev libtheora-dev libtiff-dev libtool \
libusb-1.0-0-dev libusb-dev libwxgtk3.2-dev libx11-dev libxml2-dev libzmq3-dev pkg-config \
qt5keychain-dev qtdeclarative5-dev wcslib-dev wx-common wx3.2-i18n xplanet xplanet-images \
zlib1g-dev
libgphoto2
Ubuntu will already have a version of libgphoto2 installed but we don’t want to use that, as it most likely will be several versions behind. We can’t remove it, however, as that will make the apt package manager very, very sad.
I didn’t want to get into the business of building/maintaining apt packages, so my solution was to install the latest version of libgphoto2 in /usr/local and configure the library path to search there first for dynamic libraries.
NOTE: In order to get my OM-1 Mark II working with libgphoto2, I had to do some extra work by checking out a specific commit and commenting out a specific line as suggested before compiling. Skip the git checkout 0697bb0 and sed command if you don’t need this “fix”.
$ git clone https://github.com/gphoto/libgphoto2.git ~/src/libgphoto2 && cd ~/src/libgphoto2
$ git checkout 0697bb0
$ sed -i '3267s/^/\/\//' camlibs/ptp2/library.c
$ autoreconf -is
$ ./configure --prefix=/usr/local
$ make -j8 && sudo make install
Library Path
Now that a custom compiled version of libgphoto2 has been installed in /usr/local, we need to make sure that ldconfig sees this first, otherwise clients may use the older, preinstalled version instead.
My solution (for better or worse) was to add /usr/local/lib explicitly as the first line in /etc/ld.so.conf:
/usr/local/lib
include /etc/ld.so.conf.d/*.conf
After saving the file, regenerate the cache:
$ sudo ldconfig
gphoto2 (optional)
While not required for KStars/EKOS, gphoto2 can be very useful for debugging. I recommend installing it.
$ git clone https://github.com/gphoto/gphoto2.git ~/src/gphoto2 && cd ~/src/gphoto2
$ autoreconf -is
$ ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --prefix=/usr/local
$ make -j8 && sudo make install
Run gphoto2 to make sure that you are seeing the correct versions for both gphoto2 and libgphoto2:
$ gphoto2 -v
gphoto2 2.5.28.1
<snip>
This version of gphoto2 is using the following software versions and options:
gphoto2 2.5.28.1 gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2 2.5.31.1 standard camlibs, gcc, no ltdl, EXIF
libgphoto2_port 0.12.2 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, no ltdl, EXIF, USB, serial without locking
libXISF
At the time of this write up, libxisf-dev/noble 0.2.8-1 arm64 is available in the Ubuntu repositories, but KStars will crash on startup with that version, hence the need to compile 0.2.13 from source.
$ git clone --branch v0.2.13 --depth 1 https://gitea.nouspiro.space/nou/libXISF.git ~/src/libXISF && cd ~/src/libXISF
$ cmake -B build -S .
$ cmake --build build --parallel && sudo cmake --install build
GSC
I’m fairly certain there are newer versions of the Guide Star Catalog available elsewhere, but this is an easy enough way to install some version of it for EKOS to use in the simulators:
$ git clone https://git.launchpad.net/gsc ~/src/gsc && cd ~/src/gsc
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
$ make && sudo make install
INDI Core
For INDI, the latest and greatest isn’t as important to me as having a stable server, so I’ve chosen to go with the latest official release, which at this point in time is 2.1.2.
$ git clone --branch v2.1.2 --depth 1 https://github.com/indilib/indi.git ~/src/indi && cd ~/src/indi
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ../
$ make -j8 && sudo make install
INDI 3rd Party Drivers
Be sure to compile and install any drivers you plan to use. For me, it’s just going to be indi-gphoto and indi-asi.
NOTE: some of the INDI drivers have libraries which need to be installed before compiling said drivers. libasi is an example of this.
$ git clone --branch v2.1.2 --depth 1 https://github.com/indilib/indi-3rdparty.git ~/src/indi-3rdparty
indi-gphoto
$ cd ~/src/indi-3rdparty/indi-gphoto
$ cmake .
$ make -j8 && sudo make install
indi-asi
$ cd ~/src/indi-3rdparty/libasi
$ cmake .
$ make -j8 && sudo make install
$ cd ~/src/indi-3rdparty/indi-asi
$ cmake .
$ make -j8 && sudo make install
KStars
And here’s the big kahuna.
$ git clone --branch stable-3.7.5 --depth 1 https://github.com/KDE/kstars.git ~/src/kstars && cd ~/src/kstars
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
$ make -j8 && sudo make install
PHD2 (optional)
Last but not least, you can install PHD2 if you would rather use it for guiding than the guiding built into EKOS.
$ git clone --branch v2.6.13 --depth 1 https://github.com/OpenPHDGuiding/phd2.git ~/src/phd2 && cd ~/src/phd2
$ mkdir tmp && cd tmp
$ cmake -DUSE_SYSTEM_LIBINDI=1 ../
$ make -j8 && sudo make install