So, the OpenWrt build system is amazing and awesome and incredible. Systemd on an embedded machine has interested me for quite some time, and to date I've been using OpenEmbedded / Yocto. However that ecosystem makes me want to stab my eyes out with rusty fish hooks... so I came back to OpenWrt's buildroot and attempted to add systemd.
This became a much simpler task with recent versions of systemd since they dropped the cyclic dependency on libdbus.
What works:
* Booting (yay!)
* Default targets
* The journal
* systemctl
* Probably a bunch of other stuff
What does not work:
* Module loading (need depmod and libkmod)
* Overlayfs, firstboot magic, preinit magic, most of the OpenWrt special sauce related to system boot.
* Hotplug scripts (working on a udev rule for this...)
* Probably a bunch of other stuff
I have tested most of the systemd modules (hostnamed, timedated, machined, networkd) but not all. Some are most likely missing dependencies.
Extra (you need to add/select these yourself) Dependencies:
* Kernel config: CONFIG_DEVTMPFS CONFIG_DEVTMPFS_MOUNT CONFIG_FHANDLE. I submitted a patch to OpenWrt which adds these symbols to config/Config-kernel.in so the systemd package can automagically select them. CONFIG_CGROUPS, another dependency, works like this so it's taken care of already.
* agetty (util-linux), glib2 (for gudev). Just install the packages/ feed and the systemd package will pull these in.
* eglibc - I have patches included for uClibc support but I have not tested it. If you're interested in checking it out, please do.
I would very much like to make gudev/glib2 selectable. GUdev is the most pointless library in the world since libudev is so easy to use already. This is a WIP.
Conflicts:
* procd as init (for obvious reasons)
* base-files (use base-files-systemd)
How to get it:
Add this to your feeds.conf
src-git systemd git://github.com/aport/openwrt-systemd.git
Then:
./scripts/feeds update systemd
./scripts/feeds install systemd
./scripts/feeds install base-files-systemd
The package is under Base system. Select base-files-systemd and it will select systemd. I high recommend also selecting systemd-udev.
Comments? Suggestions? Hate mail? Please let me know!
Have fun!
(Last edited by aport on 18 Mar 2014, 20:56)