demystifying-systemd-for-embedded-systems
demystifying-systemd-for-embedded-systems copied to clipboard
scripts to build and measure kernel, systemd and initramfs used in my talk Demystifying systemd for embedded systems
Demystifying Systemd for Embedded Systems
This repository contains script used to create the presentation, they are targeted to run on a x86-64 machine that is already prepared to build the Linux Kernel and systemd itself. It was tested solely on ArchLinux.
Scripts:
run-qemu.sh <kernel> <initramfs>after./all.shis executed, this will allow to boot a virtual machine with kernel and initramfs combinations.all.shrun all scripts butrun-qemu.sh.fetch.shdownload kernel and systemd source code tarballs. Results indownload/extract.shunpack kernel and systemd source code tarballs. Results insrc/prepare.shprepare source to build (./autogen.sh).compile.shconfigure and compile various combinations of kernel and systemd builds. Results inkernel/andsystemd/*/installsystemd-minimal-strip.shcopy systemd build easy_diet and remove some components that cannot be disabled using./configure --disable-COMPONENT, such as udev and journal. Results insystemd/minimal*/installsystemd-initramfs-all.shcreate initramfs for all systemd builds.busybox-initramfs.shcreate initramfs for busybox.report.shprint out sizes.
Helper Scripts:
systemd-initramfs.sh <build-name>used bysystemd-initramfs-all.shto create initramfs for each build.systemd-install-strip.sh <systemd-install-dir>used bycompile.shto remove files that doesn't matter, like bash completion, locale and development (includes, pkgconfig)versions.shvarious defines to be included by other scripts.
Kernel configuration:
kernel-minimal-x86_64.configconfig fragment based on allnoconfig with minimum requirements to boot busybox. This configuration won't boot systemd.kernel-systemd-x86_64.configconfig fragment to extendkernel-minimal-x86_64.configfollowing all https://github.com/systemd/systemd/blob/master/README recommendations. This enables IPv6, namespaces, tmpfs, SECCOMP...kernel-systemd-minimal-x86_64.configsimilar to the previous but instead of enabling everything, enable only the requirements, everything else is left disabled. That is, no IPv4/IPv6, namespaces or SECCOMP.