[systemd-devel] Integration with Buildroot (uclibc-based runtime): patches suggested

Dmitry Golubovsky golubovsky at gmail.com
Fri Jul 13 06:19:01 PDT 2012


For some time, I have been working on integration of systemd with
Buildroot [1] which is a set of cross tools to help build bootable
Linux root filesystems aimed at mobile and small portable Linux

Buildroot's toolchain by default provides runtime environment based on
uclibc [2] which lacks certain functionality systemd depends upon, so
I had to develop some workarounds. In particular, functions like
execvpe, posix_fallocate, mkostemp,  and %ms format are not

I have reached some success: systemd works as the init program, PAM
logins are functional, and journal works.

The proposed patches (as Buildroot would use them, not sure what are
the requirements for patches contribution to systemd) are located
under this repo directory:


They may be not 100% final*, but I would like to announce them here
for early review.

In particular:

   -  adds extra checks to configure.ac to detect features missing in

- execvpe is missing in uclibc, approximate it with explicit environ
setting + execvp

- posix_fallocate and fallocate are missing in uclibc, replace them by
writing some amount of zero bytes in the journal file, it works

- replace mkostemp with mkstemp + fcntl with case-by-case selected
flags - was mkostemp ever expected to be atomic?

- replace %ms format with %s format and argument buffer preallocation

Other patches/files in this directory are buildroot-specific.

These patches are applicable against the v186 snapshot.

I would like to hear from the systemd dev team whether there is an
interest in uclibc integration; we can work together on finalizing
these patches. If there is no such interest, patches will remain with
Buildroot as they currently are.


[1] http://buildroot.net/
[2] http://uclibc.org/

* I have noticed few typos, will fix them ASAP.
Dmitry Golubovsky

Anywhere on the Web

More information about the systemd-devel mailing list