hamclock-systemd
This project creates a Debian package to install a compiled version of HamClock and enable launch on boot using systemd
Running a Pi Headless
Setting up a headless Raspberry Pi is not as straight forward as a regular set up. You may find the instructins and links in PiHeadlessSetup helpful.
Installation - APT Package
The package includes a precompiled version of HamClock built for the Raspberry Pi frame buffer fb0 800x480 pixes which matches the Raspberry Pi 7 inch touch display. This is the version that is configured to start. The package (as of 2.57.2) includes all four versions of HamClock for the frame buffer:
hamclock-fb0-800x480
hamclock-fb0-1600x960
hamclock-fb0-2400x1440
hamclock-fb0-3200x1920
To use a different display size edit /etc/systemd/system/hamclock.service
and change the line ExecStart=/usr/local/bin/hamclock-fb0-800x480
to
start the version that matches your system.
This change makes the package and the installed footprint a little bigger. Each version is about 4 MB, relative to even a smallish 8 GB SDCard that is not really significant.
Versioning
The package versioning is designed to follow HamClock versioning and
provide information on any changes or updates to the wrapping systemd
code. For example the package: hamclock-systemd-2.57.1-3
can be
understood as:
- Containing HamClock version 2.57
- systemd code version 1
- Build number 3
Availability
Some binary packages will be attached to this source repository, however a better way to get the most current version built would be to add my package repository to your system. I will try to keep the packages up to date, but won’t necessarily add all new packages to this GitHub repository.
Package Repository - VFROTT.Ca
Gemfury (below) is a great resource, is free and someone else looks after it, that’s a pretty good deal. Unfortunately the don’t (yet) have a way of signing repositories, and it isn’t as easy to separate different packages for different distributions. For example there is a binary incompatability between Raspberry Pi releases Buster and Bullseye. The link above has instructions.
Package Repository - Gemfury
Thanks to the people over at GemFury who offer free public repositories of all kinds I can offer an easy way to install HamChrono and keep updated.
Installation
Using an Aptitude Package – The Easy Way
See the instructions here.
Then perform the following:
sudo apt update
sudo apt install hamclock-systemd
To start HamClock:
sudo systemctl start hamclock
To enable HamClock start on boot:
sudo systemctl enable hamclock
To stop HamClock if you want to do so:
sudo systemctl stop hamclock
To prevent HamClock from starting on boot:
sudo systemctl disable hamclock
Using this Git Repository
To use this repository to build your own package follow thses steps:
- Install prerequisites if not already installed:
sudo apt update sudo apt -y install cmake make g++ libx11-dev
- Clone the repository to your local system (requires git)
sudo apt install git # if not already installed. git clone https://github.com/pa28/hamclock-systemd.git
- Download the current version of the HamClock distribution
cd hamclock-systemd/SourceCode rm ESPHamClock.zip # Delete the old version if there is one wget https://www.clearskyinstitute.com/ham/HamClock/ESPHamClock.zip unzip ESPHamClock.zip ./buildall
- The contents of the SourceCode directory should now contain the four supported display size binaries:
richard@tardis:~/CLionProjects/hamclock-systemd/SourceCode$ ls -l total 21292 -rwxrwxr-x 1 richard richard 198 Jan 29 15:19 buildall drwxr-xr-x 3 richard richard 4096 Jan 30 09:32 ESPHamClock -rw-rw-r-- 1 richard richard 1161229 Jan 29 12:07 ESPHamClock.zip -rwxrwxr-x 1 richard richard 4951016 Jan 30 09:32 hamclock-fb0-1600x960 -rwxrwxr-x 1 richard richard 5245984 Jan 30 09:32 hamclock-fb0-2400x1440 -rwxrwxr-x 1 richard richard 5659552 Jan 30 09:32 hamclock-fb0-3200x1920 -rwxrwxr-x 1 richard richard 4770312 Jan 30 09:32 hamclock-fb0-800x480
- Build the package:
cd .. # # Edit CMakeLists.txt to set the project version number. For apt install to accept the package as new the # version number must be greater than a currently installed package. # mkdir cmake-build-debug cd cmake-build-debug cmake -DCMAKE_BUILD_TYPE=Release .. make package
- Output of
make package
should look similar to this:Run CPack packaging tool... CPack: Create package using DEB CPack: Install projects CPack: - Run preinstall target for: hamclock-systemd CPack: - Install project: hamclock-systemd CPack: Create package CPackDeb: - Generating dependency list CPack: - package: /home/richard/HamClock/cmake-build-release/hamclock-systemd-2.57.2-4.armv7l.deb generated.