[systemd-devel] Integration with Buildroot (uclibc-based runtime): patches suggested
Dmitry Golubovsky
golubovsky at gmail.com
Fri Jul 13 06:19:01 PDT 2012
Hi,
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
applications.
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
implemented.
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:
https://gitorious.org/lfa/myroot/trees/master/systemd-pam
They may be not 100% final*, but I would like to announce them here
for early review.
In particular:
https://gitorious.org/lfa/myroot/blobs/master/systemd-pam/systemd-pam-configure-check-uclibc.patch
- adds extra checks to configure.ac to detect features missing in
uclibc
https://gitorious.org/lfa/myroot/blobs/master/systemd-pam/systemd-pam-fix-execvpe.patch
- execvpe is missing in uclibc, approximate it with explicit environ
setting + execvp
https://gitorious.org/lfa/myroot/blobs/master/systemd-pam/systemd-pam-fix-fallocate.patch
- posix_fallocate and fallocate are missing in uclibc, replace them by
writing some amount of zero bytes in the journal file, it works
https://gitorious.org/lfa/myroot/blobs/master/systemd-pam/systemd-pam-fix-mkostemp.patch
- replace mkostemp with mkstemp + fcntl with case-by-case selected
flags - was mkostemp ever expected to be atomic?
https://gitorious.org/lfa/myroot/blobs/master/systemd-pam/systemd-pam-fix-msformat.patch
- 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.
Thanks.
------------------------------
[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