Skip to content

Commit

Permalink
document using musl
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrake authored and kraj committed Oct 9, 2018
1 parent a3ea3d6 commit c7cd715
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
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.

0 comments on commit c7cd715

Please sign in to comment.