This repository builds Debian Trixie images with modern kernels for OpenFrame devices; notably the OpenFrame 1, which was sold in the UK as the O2 Joggler, and the OpenFrame 2, which were used under various guises for energy monitoring, home automation, and telephony purposes.
Image files are available on the Releases page. Some older versions based on Bullseye and Bookworm are still available on openbeak.net, alongside other resources, such as the original firmware images and EFI files.
All of the overlays and scripts used to create the image files are in this repo, with deprecated versions for earlier versions of Debian if we wander back through the commits.
Images include of-provision, a first-boot mechanism for installing software without baking every combination of packages into the image itself.
To use it, place a setup.txt file in the OF-BOOT volume before first boot, containing a single line: the URL of the project you want installed, e.g.
https://github.com/birdslikewires/openframe-hamclock
For a GitHub project URL like this, of-provision works out the raw install.sh URL itself, trying the main branch and then falling back to master. For anything hosted elsewhere, it looks for install.sh at the root of the given URL, e.g. https://example.com/my-openframe-app/ is expected to have an installer at https://example.com/my-openframe-app/install.sh.
On first boot, the of-provision.service systemd unit checks for /boot/setup.txt. If it's present, it downloads the resulting install.sh and runs it as the of user, logging output to /var/log/setup.log. The device then reboots automatically.
The service disables itself immediately upon firing, regardless of whether the installer succeeds, so it will not run again on subsequent boots. Depending on the outcome, setup.txt is either removed (success), renamed to setup.txt.failed (installer error or download failure), or renamed to setup.txt.rejected (file was empty).
To provision another install after first run, re-enable the service and restore setup.txt:
sudo systemctl enable of-provision.service
sudo mv /boot/setup.txt.failed /boot/setup.txt # or recreate it with a new URL
sudo reboot
Images default to the C.UTF-8 locale and UTC timezone. To configure for your local environment:
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure tzdata
Running dpkg-reconfigure locales will present a menu to generate and select a locale (e.g. en_GB.UTF-8 for the UK), while dpkg-reconfigure tzdata lets you select your timezone (e.g. Europe/London).
The overlay files modify the vanilla system to provide some necessary and some nice-to-have features, including automatically configured GRUB, network settings from the /boot volume (ideal for preconfiguring), sensible system defaults, and minimal firmware files.
It should be possible to use updated microcode for the Intel Atom Z520, if that's of concern to you. The microcode you need is 06-1c-02 from Intel's repository. If you have any luck, let me know.
Some of these are more useful than others, depending upon your build environment. You'll definitely want of-imgcreate.sh, while the others are mostly for self-hosted setups or building an image manually.
So you want to automatically build images for OpenFrame devices on your server? This is the script for you.
The OpenFrame devices are all 32-bit, so you're going to need a i386 environment. Our solution is to create a 32-bit chroot on a 64-bit system. For Debian Trixie it can be achieved like this:
sudo apt install debootstrap schroot
sudo nano /etc/schroot/chroot.d/i386.conf
Copy in:
[i386]
description=i386
type=directory
union-type=overlay
directory=/var/lib/schroot/chroots/i386
personality=linux32
groups=root,sudo
root-groups=root,sudo
Then install the base system with debootstrap:
sudo mkdir -p /var/lib/schroot/chroots/i386
sudo debootstrap --arch=i386 trixie /var/lib/schroot/chroots/i386 http://deb.debian.org/debian
Hop in to the chrooted environment like this:
sudo schroot -c source:i386
You can then complete the setup of your build environment.
rm /var/lib/dpkg/statoverride
rm /var/lib/dpkg/lock
dpkg --configure -a
apt update && apt upgrade
apt install autoconf bc bison build-essential curl debhelper debootstrap dosfstools flex git libelf-dev libncurses5-dev libssl-dev lsb-release parted rsync wget
The build server runs a command like this from its crontab:
1 1 * * * schroot -c i386 -u root -- bash -c "cd /home/debian/build ; /home/debian/openframe-linux/of-builder.sh 'debian' 'bookworm' 'http://deb.debian.org/debian' '6.1' '/home/debian/www' &> /home/debian/www/logs/bookworm-6.1_`date +'\%Y-\%m-\%d-\%H\%M'`.txt"
This script provides a handy method of copying everything back from a storage device for packaging up into a .tgz. That .tgz can then magically be used by ofimgcreate.sh to generate a reasonably fresh image.
This script does the hard work of creating an image file of a given size, creating filesystem on it, mounting it, and then going on to fetch and install Ubuntu using debootstrap.
You will also need the overlay files provided in this repo and some working kernel image packages.
Used to mount image files for minor tweaks, meaning we don't need to rebuild things every time. Now with variable partition support!
Basic build server cleaning script. Give it directories to clean line-by-line in a text file and once server drive space drops below 5 GB it removes any directories (and obviously their contents) that are older than 12 months.