Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document using musl #31

Merged
merged 1 commit into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conf/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ ENABLE_UART = "1"
#VIRTUAL-RUNTIME_init_manager = "busybox"
#VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
#VIRTUAL-RUNTIME_login_manager = "busybox"

# Uncomment the following to enable musl libc
#TCLIBC = "musl"
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ included for some of them below.
* [BeagleBone -- todo]()
* [ODroid-C2 -- todo]()

## Image Configuration

OpenEmbedded supports a wide range of technology choices. Some of these are documented
below.

* [libc/init system](libc-init.md)

## Design Choices

* [Superproject Management](superproject-management.md)
Expand Down
22 changes: 18 additions & 4 deletions docs/init-system.md → docs/libc-init.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Init System
# libc and init system selection

## Systemd

Expand All @@ -25,11 +25,21 @@ VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
VIRTUAL-RUNTIME_login_manager = "busybox"
```

## Comparison of disk spaced used by init systems
## Libc selection

Systemd takes considerably more space than SysVinit. With a rPI2 build, the following
are the rootfs sizes for core-image-minimal:
glibc is the default libc, but musl can also be used by setting the following in
local.conf:

```
TCLIBC = "musl"
```

## Comparison of disk spaced used

* Musl + Busybox init/dev/login
* space used in ext4 filesystem on running system using df: 1.9MB
* adding sizes of files in image from buildhistory: 1.5MB
* number of files in image: 595
* Busybox init/dev/login
* space used in ext4 filesystem on running system using df: 3.5MB
* adding sizes of files in image from buildhistory: 3.1MB
Expand All @@ -42,3 +52,7 @@ are the rootfs sizes for core-image-minimal:
* 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

The space on disc used by a systemd image is much larger than adding the size of
the files in the image. We're not sure why this is -- perhaps there is filesystem
overhead for small files.