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
Armbian
Previously, I was running one of Joshua Riek’s ubuntu-rockchip images, but that project is no longer maintained so I’ve moved over to Armbian. Why not Orange Pi’s official images? Well, I trust Ubuntu’s repositories a bit more than Xunlong’s.
Download and run the Armbian Imager.
Select your hardware manufacturer (for me this was Orange Pi).
Choose your board (for me this was the 5B).
Now pick the KDE/vendor variant (KDE makes Kstars happy, and Edge isn’t as stable).
Flash the image to a microSD card, then stick it in your SBC 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/mmcblk0After 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 upgradeThen (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-storeKDE
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-standardWhen prompted, set the display manager to sddm.
After that completes, we need to create an sddm display manager configuration:
$ sddm --example-config > custom.confMake 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.dReboot.
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
krfb
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 \
libudev-dev libusb-1.0-0-dev libusb-dev libwxgtk3.2-dev libx11-dev libxml2-dev libzmq3-dev \
ninja-build pkg-config qt5keychain-dev qtdeclarative5-dev wcslib-dev wx-common wx3.2-i18n \
xplanet xplanet-images zlib1g-devlibgphoto2
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 $HOME/.local and configure the library path to search there first for dynamic libraries.
NOTE:
$ git clone https://github.com/gphoto/libgphoto2.git ~/src/libgphoto2 && cd ~/src/libgphoto2
$ autoreconf -is
$ ./configure PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig${PKG_CONFIG_PATH+":${PKG_CONFIG_PATH}"}" --prefix="$HOME/.local"
$ make -j8 && sudo make installLibrary Path
Now that a custom compiled version of libgphoto2 has been installed in $HOME/.local, we need to make sure that applications know to use this version. Append the following to your $HOME/.bashrc file:
export LD_LIBRARY_PATH="$HOME/.local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
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
$ git checkout v2.5.32
$ autoreconf -is
$ ./configure PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig${PKG_CONFIG_PATH+":${PKG_CONFIG_PATH}"}" --prefix="$HOME/.local"
$ make -j8 && sudo make installRun gphoto2 to make sure that you are seeing the correct versions for both gphoto2 and libgphoto2:
$ gphoto2 -v
gphoto2 2.5.32
<snip>
This version of gphoto2 is using the following software versions and options:
gphoto2 2.5.32 gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2 2.5.34.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 lockingGSC
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 installINDI 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.2.4.
$ git clone --branch v2.2.4.2 --depth 1 https://github.com/indilib/indi.git ~/src/indi && cd ~/src/indi
$ cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
$ cmake --build build
$ sudo cmake --install buildINDI 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.2.4.1 --depth 1 https://github.com/indilib/indi-3rdparty.git ~/src/indi-3rdpartyindi-gphoto
$ cd ~/src/indi-3rdparty/indi-gphoto
$ cmake -DCMAKE_PREFIX_PATH=$HOME/.local .
$ make -j8 && sudo make installindi-asi
$ cd ~/src/indi-3rdparty/libasi
$ cmake .
$ make -j8 && sudo make install
$ cd ~/src/indi-3rdparty/indi-asi
$ cmake .
$ make -j8 && sudo make installKStars
And here’s the big kahuna.
$ git clone --branch stable-3.8.4 --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 -DBUILD_WITH_QT6=ON ../
$ make -j8 && sudo make installPHD2 (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.14 --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