Automating my Raspberry Pi builds for EAA…

I started out running Astroberry on my Raspberry Pis for EAA. Astroberry is great and has most everything you need but it also has a bunch of stuff you may never use. Since Astroberry is not updated that often and it is also currently only available as a 32-bit build I have been working on a DIY Raspberry Pi Astronomy build to support my EAA needs. I want to run the Raspberry Pi 64-bit OS to take full advantage of my 8GB Raspberry Pi 4B.

To accomplish this I have been building the software I use for EAA on the Raspberry Pi (INDI, PHD2, KStars, etc) from the source packages. Building open source software from its source is not really that hard to do, but I find myself tinkering with things and rebuilding the Raspberry Pi I use for EAA on a pretty regular basis (probably at least once a week or so) so I want to make the builds easy to repeat. The biggest issue I usually run into with building software from source is undocumented dependencies. These dependencies can sometimes take a bit to work through them. I have developed a set of shell scripts to make the dependency installs, software builds, and software installs easy to repeat.

Here is a project I have been working on: https://github.com/herseyc/raspastro
RaspAstro is a set of shell (bash) and python3 scripts which allow me to easily repeat all the steps I typically do when setting up a fresh Raspberry Pi 64-bit OS install for EAA.

The RaspAstro scripts are easy to install. Just install git and then git them from my RaspAstro repository:

sudo apt install -y git
mkdir -p ~/Projects
cd ~/Projects
git clone https://github.com/herseyc/raspastro.git
cd ~/Projects/raspastro

The scripts are set to use ~/Projects as the BUILDDIR and ~/Projects/build-raspastro.log as the LOGFILE. If you install using the steps above you should not have to change anything. If you are running the installs on a Raspberry Pi with less than 4 GB of RAM you should change the JOBS=4 in each of the scripts to JOBS=2 so you do not run out of memory during the builds.

Here are the tasks I have currently have scripted out:

There is also a script to add INDI 3rd-Party drivers or libraries after the initial build. So if you build out INDI with just a few of the 3rd-Party drivers then you can easily add a new one, or update an existing one, without having to rebuild them all.

I put these together for my use… sharing them in case someone else may find them useful. If you have any questions, comments, issues, or ways in which the scripts could be improved please let me know by submitting a comment below, submitting an issue on the raspastro repo, or dropping into my EAA Discord server.

I have tested the scripts on the Raspberry Pi 64-bit OS, but since the software is being built from the sources it should work on the Raspberry Pi 32-bit OS as well. I will get around to testing on a 32-bit OS eventually. If you try it out on the 32-bit OS and run into issues let me know and I’ll try to help you work through them.

The install scripts can also be used to update the software. For example re-running install-indi.sh will get the most recent INDI source from the github repository, build it from source, and then install it.

I am documenting my Raspberry Pi build process here: https://github.com/herseyc/raspastro/blob/master/MyBuildProcess.md

I am planning to add a web server which displays the status of the Pi including things like… GPS status, and INDI server status. This is still a work in progress, but I am making some progress (still learning).

These scripts simplify and automate the build process, not quite an easy button but they do make things a lot easier. I still have my build of Astroberry and it is definitely the easy button since it really just kind of works out of the box. It will be a failback as needed.

Doing these builds from sources also gives me a little more flexibility to run the Raspberry Pi 64-bit OS, to install just the pieces and parts I need, to update things more frequently, to rebuild when I tinker too much and screw something up.

Head over to RaspAstro GitHub Repo at https://github.com/herseyc/raspastro and check it out. Appreciate any thoughts or feedback.

Clear skies!

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + 10 =