Recent Projects

In my previous post, I gave a brief overview of what I'd done in the past year. Looking back, though, I completely omitted recent projects that I'd written to make my life a little easier. There's only two (2) of them, so this won't be a necessarily long post.

freebsd-pkgbase-build (GitHub)

The first most recent project that I've worked on was freebsd-pkgbase-build. The gist of it is: I have multiple machines that I've taken the time to trim down the GENERIC kernel config to only include what I really need, and my machines span multiple architectures (amd64, armv6, arm64) and sometimes multiple branches (stable/11, head, stable/10) .

I wanted to try out FreeBSD's PkgBase, which is still not quite ready for prime time, but doing the buildworld's and buildkernel's for everything was kind of time consuming, not a great process, and required some maintenance overhead that I didn't necessarily want to go through. Ideally, I could:

  1. Spin off all of my pkgbase builds
  2. Create the different repos that arise from different ABIs and different branches
  3. Combine the different repos into one that I could serve fairly easy, despite these things being scattered all over the place

And thus, freebsd-pkgbase-build was born. It is a make(1) based solution that uses a Makefile.local or /etc/make.conf for configuration. My Makefile.local looks like so:



Rather intense, yes? No, not really. My arm64 stuff is excluded right now, but it's a fairly simple addition. After inclusion of this, it's a simple `make packages` to produce the repo at /usr/local/pkgbase/repo. Easy peasy, yeah? Yeah.

py-rtprio (GitHub, PyPI)

py-rtprio is my other project. It is also nothing fancy, just a Python-based interface to rtprio(2) for setting realtime priority of the executing thread/process. Originating in Python 3, shortly ported to be Python 2 compatible just to say I tried to be friendly. Admittedly, I like the Python 3-only version better, but it didn't end up too terrible. It uses ctypes to load libc and expose rtprio(2) in a Python-ish way. When I decide to drop Python 2 support, I'll likely go back to the cleaner version that uses Enum, which I avoided for Python 2 support so that I didn't need to bring in a dependency just for that one small (yet nice) feature.

My motivation for this was that I have many dreams of doing things with FreeBSD that are more suited to an RTOS, but I think with setting real-time priorities I might be able to accomplish some of the things I'd like to do. My reasoning (likely naive) is that setting a real-time priority on a system that I already tightly control will limit the number of things that can pre-empt me to just the kernel. My hope is that will net me the responsive-ness I may require.