Skip to content

Commit

Permalink
Merge pull request #29 from YoeDistro/cbrake/master
Browse files Browse the repository at this point in the history
start documentation/settings for enabling systemd
  • Loading branch information
cbrake authored Oct 9, 2018
2 parents eeb0e41 + 6c0989a commit 69bb294
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions conf/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ PACKAGE_FEED_URIS ??= "http://<FEEDSERVER>"

# Enable serial console on Raspberry PI systems
ENABLE_UART = "1"

# Uncomment the following to enable systemd
#DISTRO_FEATURES_append = " systemd"
#VIRTUAL-RUNTIME_init_manager = "systemd"
#DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
#VIRTUAL-RUNTIME_initscripts = ""
26 changes: 26 additions & 0 deletions docs/init-system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Init System

SysVinit and Systemd are common init systems. SysVinit is the default, but Systemd can
be enabled be adding the following to local.conf:

```
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
```

Systemd takes considerably more space than SysVinit. With a rPI2 build, the following
are the rootfs sizes for core-image-minimal:

* SysVinit
* space used in ext4 filesystem on running system using df: 4.7MB
* adding sizes of files in image from buildhistory: 4.3MB
* number of files in image: 696
* Systemd
* space used in ext4 filesystem on running system using df: 33.2MB
* adding sizes of files in image from buildhistory: 22MB
* number of files in image: 1,806

There is a significant size cost with systemd, so in some cases it may make sense to
use sysvinit if image size is a priority.

0 comments on commit 69bb294

Please sign in to comment.