2c9ef36242
We use gpsd's upstream systemd service unit files, which define a dependency on chronyd.service. And indeed, upstream chrony does provide an example service unit file chronyd.service. However, in Buildroot, we are not using chrony's upstream unit, we are providing our own, much simplified as compared to upstream. We install that unit file as chrony.service. Notice that subtle difference in the name: upstream's is chronyd, with a trailing 'd', while ours just chrony, without the trailing 'd'. As a consequence, in a Buildroot-built system, gpsd does not wait for after chrony is started, which causes all kind of mayhem when gpsd actually needs to talk to chrony. We have multiple options: 1. use chrony's upstream unit file; 2 rename the chrony service file as installed by Buildroot, to match what chrony would actually do; 3. tweak gpsd's unit file to refer to chrony.service, not chronyd.service; 4. leverage systemd's flexibility in how units are defined, and provide a drop-in to complement gpsd's unit to also wait for chrony.service. For 1. it is totally unknown why we do have our unit file to begin with, rather than use upstream's. Since upstream's is much more complex than ours, using it might have unforetold consequences. Going with 2. seems the easiest at first sight, but then it would break systems where users provide their own drop-ins for chrony, as they would no longer match. 3. is relatively easy, but running sed is not entirely nice. Besides, it semantically should be a post-install hook, rather than a systemd-init command, but again that makes things a bit more ugly. Also, some people may have their own gpsd.service in an overlay or whatever, which would break our fixup. Solution 4. is pretty straightforward, although it is not ideal either. To be noted: some distributions, like Ubuntu 20.04 at least, do install the chrony unit file as chrony.service, like Buildroot does. However, there does not appear to be any fixup in gpsd for this discrepancy, as their gpsd install still refers to chronyd.service. So that does not help us decide what to do. So, eventually, we decided to go with solution 4, which has the least impact on the system, and keeps the status-quo for all other use-cases. Signed-off-by: Yann E. MORIN <yann.morin@orange.com> Cc: Bernd Kuhls <bernd.kuhls@t-online.de> Cc: Alex Suykov <alex.suykov@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
utils | ||
.clang-format | ||
.defconfig | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
.shellcheckrc | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches