A few months ago, I posted a video on setting up astro on a raspberry pi:
https://www.youtube.com/watch?v=t68DsXLESh0
In the video, I said I would post how to get it set up here. Shortly after, I dislocated/broke my shoulder and had to have surgery. The post got lost. So, let me share how I set it up now.
Here are some links to the equipment I used:
Vilros Pi Kit: https://amzn.to/3Kd09Na RPi5: https://amzn.to/3wVcfr3 (you can get them cheaper elsewhere) Geeekpi Case: https://amzn.to/4dJj67A Hat in Video: https://amzn.to/3UUuYuK NVME in Video: https://amzn.to/4axDVjI Hat with good cable (untested): https://amzn.to/3WQrA75 Small 512 GB NVME for good cable: https://amzn.to/4e3W1Nl NVME to USB Adapter: https://amzn.to/3UUv5GG
The hat I used had a poor quality PCIe cable making things unstable. I was able to get better cables, and it now works much better. But just be aware if the Pi hat you use is a white cheap one, you'll probably have problems.
Step 1: Get the M.2 SSD as your boot drive
Great instructions can be found here: https://astroisk.nl/title-turbocharge-your-raspberry-pi-5-booting-from-nvme-ssd/
But, to summarize here:
1) Install Raspberry Pi OS to an SD card using Rapsberry Pi Imager: https://www.raspberrypi.com/software/
2) Boot up your Pi with the SSD card. For this one, it's nice to have a physical mouse, keyboard and monitor to plug into the Pi. You can also access remotely through SSH (e.g., Putty on Windows).
3) This step may not be needed anymore. But In the terminal type "sudo raspi-config" to open up the Pi's configuration settings to enable SSH and the VNC server (which also changes things to X11, which I think is more compatible with kstars). Choose "Interface Options" and then select SSH to enable it. And do the same thing with VNC. Just to be sure, you can also select Advanced Settings and choose "A6 Wayland" to revert back X11. Although, if you choose to enable VNC, X11 should be changed as default. You should now be able to control everything on a separate computer using VNC.
4) Update your firmware in the terminal: sudo rpi-eeprom-update -d -a
Then reboot
5) Change the PCIe connection speed to be Gen 3 instead of Gen 2 (this will make booting and everything faster):
In the terminal type: sudo nano /boot/firmware/config.txt
You'll see lines in the code that looks like this:
#NVMe Configuration
dtparam=pciex1_gen=1
Change it to this
#NVMe Configuration
dtparam=pciex1_gen=3
Save with Control O and then exit with Control X.
6) Turn off the Pi and connect your M.2 Hat.
7) Turn back on your pi. Clone the SD card to the SSD using the SD Card Copier. Then
Change the boot order so that it tries to boot from the PCIe first instead of the SD card:
In the terminal type:
sudo rpi-eeprom-config --edit
Add PCIE_PROBE=1 at the end of the file. Save with Control O and then exit with Control X.
8) Turn off the Pi. You should be able to remove the SD card and turn it back on, and it should boot from the M.2 drive
Step 2: Get Kstars running
1) One of the developers of kstars has a github repository that you can build Indi and kstars directly. It's here: https://gitea.nouspiro.space/nou/astro-soft-build
However, if you want PhD2 to work properly, I had to do step 2 first. If you don't need PhD2 and want to use kstars internal guiding (which is very good, btw!), you can skip step 2.
2) In the terminal type (or copy and paste) the following code:
sudo apt update && sudo apt upgrade
sudo apt install build-essential git cmake pkg-config libwxgtk3.2-dev \
wx-common wx3.2-i18n libindi-dev libnova-dev gettext zlib1g-dev libx11-dev \
libcurl4-gnutls-dev libeigen3-dev libgtest-dev
3) Warning: this will take about 1 hour to complete. Now Install Kstars through the Github repository. If you don't need PhD2, In the terminal, run
git clone https://gitea.nouspiro.space/nou/astro-soft-build.git
./install-dependencies.sh
./build-soft-stable.sh
If you do want PhD2 run:
git clone https://gitea.nouspiro.space/nou/astro-soft-build.git
./install-dependencies.sh
./build-soft-stable.sh phd2
Step 3
Enjoy Kstars on your Pi!