Every kernel patch series has the same quiet failure mode, and it has nothing to do with the patches: somebody does weeks of genuinely hard bring-up work, publishes the tree, writes a proud README, and then tells the world to git clone, apply a hundred patches, configure a kernel, and build it on a board that takes hours to compile one, which is a polite way of saying the work is for the author and the three other people on Earth with the patience for it. A patch set nobody can install is a diary nobody reads, and the Sky1 work was never meant to be a diary, so the moment the kernel worked we had a second project on our hands, the unglamorous one, the one that turns a pile of .deb files into a line in somebody’s sources.list and an apt upgrade that just does the right thing on a Tuesday morning.

This is that second project: why we run a real APT repository for the Sky1 kernel packages instead of dumping builds in GitHub Releases, and what it took to make that boring in the good way.

reprepro on GitHub Pages is the whole trick

The repository is not a server, it is a directory tree. We generate it with reprepro, the classic Debian archive manager that gives you conf/, dists/, and pool/, and then we commit the result to the Sky1-Linux/apt repo and let GitHub Pages serve it as static files at sky1-linux.github.io/apt, which means the hosting layer has no database, no daemon, and no moving parts beyond a CDN that serves files. The repository itself is signed with a dedicated key, key ID 48A0ABF100336ADB, fingerprint 7D7E E7FC 3675 9E50 D5C2 3CB3 48A0 ABF1 0033 6ADB, and users fetch it once into a keyring and reference it with signed-by, so the trust path is the same one every Debian-derived distro already knows how to walk:

wget -qO- https://sky1-linux.github.io/apt/key.gpg | sudo tee /usr/share/keyrings/sky1-linux.asc > /dev/null

echo "deb [signed-by=/usr/share/keyrings/sky1-linux.asc] https://sky1-linux.github.io/apt sid main non-free-firmware" | sudo tee /etc/apt/sources.list.d/sky1-linux.list

sudo apt update
sudo apt install sky1-desktop

From there the board behaves like any other machine on the network; the kernel shows up through apt, the headers land where DKMS expects them, and nobody has to know that the image behind linux-image-sky1 is a mainline-base tree carrying our patches, because that is the point of a package, it hides the story and keeps the ending.

Components are opt-in tracks, not a commitment

The interesting design decision is that we did not make separate repositories per kernel track, we used the mechanism APT already has for this, which is components on one deb line. The main component carries the production track, the 6.18 LTS base, and it is the only one you get by default; latest carries the 6.19 stable track; rc is release candidates, dormant until 7.0-rc1 exists; and next is Linus’ master for the people who genuinely want that. A user who wants the 6.19 track does not edit anything structural, they add one word to a line they already have:

deb [signed-by=/usr/share/keyrings/sky1-linux.asc] https://sky1-linux.github.io/apt sid main latest non-free-firmware

Track switching is a package operation, not a config operation, because each track has a meta package whose whole job is to depend on that track’s newest kernel image and headers. Kernel images install side by side the way Debian kernel packages always have, so moving between tracks is honest about what it is: install the meta for the track you want, remove the meta for the track you are leaving, and let apt autoremove sweep up the versioned image and header packages that no meta still holds. This matters more than it sounds, because the failure mode of “four kernels on a forum thread” is that every user picks one at random and stays there forever, while the failure mode of components is that the conservative user and the testing user run the same repository and differ by one word, which is the kind of difference you can actually support.

The guard rails nobody photographs

The upload side is where we spent the effort, because a repository you can break with a typo is a repository you will eventually break with a typo. The build pipeline is deliberately ordinary: prepare-source.sh downloads a release tarball and applies the patch series for the LTS build, prepare-source-git.sh exports a tag or branch straight out of the local mainline tree for the latest, rc, and next tracks, each of which keeps its own patch directory in linux-sky1, build-debs.sh runs the kernel’s own make bindeb-pkg, and upload-to-apt.sh feeds the results to reprepro, and inside that last script are the three checks that have each earned their keep. First, the script maps the component to a variant name and refuses to upload anything that does not match it, so a build of the debug sky1-dev config cannot accidentally land in the production main component. Second, you can pass an explicit kernel version as a filter, and if you do not, the script counts how many distinct kernel versions are sitting in the build directory and warns you, because stale .deb files from last week’s build are exactly how a repo ends up serving two kernels and calling it one. Third, and this one we wrote after the obvious incident, the script compares the revision you are uploading against the revision already in the repository and hard-fails on a downgrade:

ERROR: Uploading revision 4 but repo has revision 5
This would be a downgrade. Use a higher revision number.

The revision awareness runs deeper than the upload script; the packages themselves are built with a revision-aware LOCALVERSION, so the kernel’s own name carries the packaging revision (6.19.0-sky1-latest.r5 and friends), which means uname -r on a user’s board tells us exactly which build of which track they are running, and when somebody files a bug we do not have to ask them which GitHub Release they downloaded in March. When new work lands in the development tree, export-patches.sh re-exports the series into the patch repo, and the loop closes: patch, build, upload, apt update, done.

It has to be more than a kernel

A kernel repository that only ships a kernel is a half-answer, because the reason you want the newer kernel on this hardware is the hardware, and the hardware needs firmware and userland that can talk to it. So the repo also carries sky1-firmware in the non-free-firmware component, one package with the GPU, DSP, VPU, and WiFi blobs plus the HDMI audio UCM2 config, and it carries the multimedia stack rebuilt for the video engine: Firefox rebuilt with a V4L2-M2M decode path patched in, FFmpeg with AV1 and VP9 support through the same path, GStreamer with the v4l2av1dec element, and Chromium handled as a small config overlay on the unmodified Debian packages, because when Debian’s own build works the respectful thing is to leave it alone and configure it. The two meta packages are the summary of the whole philosophy: sky1-minimal is kernel plus firmware for people who know what they are doing, and sky1-desktop is the full working machine in one install command for people who would rather be doing something else, and sky1-apt-config exists so the repository itself, the source entry, the signing key, and the pin priority, is also a package, which is the point where the infrastructure eats its own cooking.

The tradeoff we actually signed

The honest cost is that we are now a Linux distribution, in miniature, forever: every upstream point release is a rebase and a rebuild, every track is a promise, and the upload script’s downgrade guard exists because we have authority worth guarding. The hosting choice has its own bill too, because GitHub Pages caps a site at a gigabyte and a soft hundred gigabytes of bandwidth a month, which is comfortable for a kernel repo and would not be if we started shipping ISOs, and the Pages CDN caches aggressively enough that the minute after an upload is a known hash-sum-mismatch window where apt update sees the new Packages index and the old pool files, so the polite habit is to give the push a few minutes before you refresh. The alternative was worse, and we tried its whole family already; GitHub Releases has no dependency resolution and no upgrade path, a build-from-source README filters the audience down to a rounding error, and the vendor BSP route is the drawer full of fast hardware running a 6.6 tree that started this whole project. The old way was to wait for a vendor to maybe bless you with a kernel bump; the modern equivalent is reprepro on a static host, a shell script that argues with you when you are wrong, and apt upgrade on a Saturday, and twenty years of watching infrastructure get overbuilt says the boring answer is usually the one that is still running five years later.