SlideShare a Scribd company logo
1 of 47
Download to read offline
2023/02/04 Chimera Linux @ FOSDEM 2023 1
A BSD/LLVM distro from scratch
2023/02/04 Chimera Linux @ FOSDEM 2023 2
Who?
●
FOSS contributor since 2007
●
On a break from work
●
FreeBSD user since 2009
●
Former Void Linux developer
●
Jack of all trades
2023/02/04 Chimera Linux @ FOSDEM 2023 3
Chimera Linux
●
New Linux distribution (mid 2021)
●
General purpose, from scratch
●
FreeBSD core tools, LLVM toolchain, musl libc
●
Rolling release
●
Highly portable to many architectures
2023/02/04 Chimera Linux @ FOSDEM 2023 4
Quick history
●
Started in early-mid 2021
●
Cbuild: meta-build system for packages
●
Void Linux developer at the time
●
Quick distro written around cbuild
●
GCC, GNU userland, xbps package manager
2023/02/04 Chimera Linux @ FOSDEM 2023 5
Quick history
●
Some 50 package templates
●
Not bootable
●
Capable of building itself
●
Aiming to fix shortcomings of xbps-src
●
Performance and correctness
2023/02/04 Chimera Linux @ FOSDEM 2023 6
Quick history
2023/02/04 Chimera Linux @ FOSDEM 2023 7
Quick history
●
Switch to LLVM, FreeBSD tools, etc.
●
Gradual packaging expansion
●
Iterative enhancements
●
Bootable, self-bootstrapping system in late 2021
●
GNOME desktop in early 2022
2023/02/04 Chimera Linux @ FOSDEM 2023 8
Quick history
2023/02/04 Chimera Linux @ FOSDEM 2023 9
Quick history
●
Talk at FOSDEM 2022
●
Many refinements during 2022
●
Security hardening
●
Development of fresh solutions
●
Aiming for alpha in February/March 2023
2023/02/04 Chimera Linux @ FOSDEM 2023 10
Why?
●
Unhappiness with existing systems
●
Make a well-rounded, practical OS
●
Improve software in general
●
Make full use of LLVM (sanitizers, LTO…)
●
Prove Linux != GNU/Linux ;)
2023/02/04 Chimera Linux @ FOSDEM 2023 11
Why?
●
Have some fun
●
Internet people said I couldn’t
●
Build a good community
●
Make a good system for myself
●
Make a good system for other people
2023/02/04 Chimera Linux @ FOSDEM 2023 12
General principles
●
Projects with 1 goal are doomed to fail
●
Pointless dogmas are doomed to fail
●
However, beware of scope creep
●
Opinionated development is good
●
Software quality matters, community more so
2023/02/04 Chimera Linux @ FOSDEM 2023 13
General principles
●
Fun is good, try to keep it that way (for everyone)
●
FOSS projects are social spaces
●
Reactionaries and toxic people make a toxic community
●
Try hard to keep them out
●
Attempt not to stray towards pointless elitism
2023/02/04 Chimera Linux @ FOSDEM 2023 14
Technical principles
●
Be strict by default and avoid technical debt
●
There should be one obvious way to do it
●
Be simple, but not too simple
●
Hardening is important
●
Strive for portability
2023/02/04 Chimera Linux @ FOSDEM 2023 15
Technical principles
●
Good tooling is important
●
Being self-sustaining is important
●
Infrastructure should be easy to replicate
●
Be able to bootstrap from source
●
(keep in mind it’s a means to an end though)
2023/02/04 Chimera Linux @ FOSDEM 2023 16
Technical principles
●
If it’s written in shell, it likely should not be
●
Make it easy to do right, and hard to do wrong
●
Documentation matters
●
Systemd’s not good, but it brought necessary change
●
Develop good solutions and keep head out of the sand
2023/02/04 Chimera Linux @ FOSDEM 2023 17
BSD system development
●
Entire system in a single tree
●
Lots of components sharing a repository
●
Complete OS capable of boot
●
Third party software distributed through ports
●
Some third party components in base (toolchain...)
2023/02/04 Chimera Linux @ FOSDEM 2023 18
What makes a Linux distro?
●
A collection of software from different parties
●
Linux kernel as the base layer (always)
●
Userland tooling (often GNU), libc (often GNU)
●
Toolchain to build all this (often GNU)
●
Service manager and aux tooling (often systemd)
2023/02/04 Chimera Linux @ FOSDEM 2023 19
What makes a Linux distro?
●
Tied together with a package manager
●
Linux + GCC + glibc + coreutils + ... => GNU/Linux
●
Distros ensure these components all work together
●
Test many different configurations
●
“We don’t break userspace” – Linux kernel
2023/02/04 Chimera Linux @ FOSDEM 2023 20
Sorting out the toolchain
●
LLVM/Clang is pretty seamless nowadays
●
Most Linux systems => GCC provides runtime
●
LLVM comes with its own (compiler-rt)
●
Used in Chimera (no libgcc)
●
Musl used for libc (from the start)
2023/02/04 Chimera Linux @ FOSDEM 2023 21
Sorting out the toolchain
●
GNU binutils complements GCC (linker etc.)
●
In Chimera, LLD from LLVM is used everywhere
●
Elftoolchain provides other tooling (+ libelf)
●
This is also used by FreeBSD
●
LLVM also provides the tools (e.g. llvm-readelf)
2023/02/04 Chimera Linux @ FOSDEM 2023 22
Core userland
●
GNU coreutils, findutils, diffutils, grep, sed, util-linux…
●
Busybox often used on non-GNU distros (e.g. Alpine)
●
Overly spartan functionally, code is not very good
●
Other alternatives are usually worse
●
FreeBSD to the rescue
2023/02/04 Chimera Linux @ FOSDEM 2023 23
Core userland
●
Found third party port: bsdutils
●
Incomplete, bare, not quite ready
●
Helped complete it, reach parity with coreutils
●
Ported many other tools to expand coverage
●
Result: chimerautils
2023/02/04 Chimera Linux @ FOSDEM 2023 24
Core userland
●
Replaces not just GNU tooling
●
All-in-one userland package (simplified bootstrap)
●
Lean enough for bare envs (e.g. initramfs)
●
Powerful enough for interactive use
●
Easy hardening, help break up monoculture
2023/02/04 Chimera Linux @ FOSDEM 2023 25
Linux kernel
2023/02/04 Chimera Linux @ FOSDEM 2023 26
Linux kernel
●
Clang-compatible these days
●
Patches to support BSD utilities, Elftoolchain libelf
●
LLVM_IAS did not work on some archs until recently
●
E.g. ppc64le needed binutils because of that
●
Clang assembler used everywhere now
2023/02/04 Chimera Linux @ FOSDEM 2023 27
CKMS
●
Distros usually use DKMS to build out of tree modules
●
Massive bash script, unfitting functionality
●
Created CKMS (Chimera Kernel Module System)
●
DKMS-like functionality, but lightweight and robust
●
Privilege separation, packaging integration...
2023/02/04 Chimera Linux @ FOSDEM 2023 28
Package manager
●
FreeBSD pkg considered
●
Not quite in the shape I’d like
●
Alpine Linux’s apk proved excellent
●
Eventual transition to apk-tools 3.x (new generation)
●
Full cbuild integration in summer 2021
2023/02/04 Chimera Linux @ FOSDEM 2023 29
Service management
●
Many options evaluated (runit, s6, openrc, …)
●
Dinit was chosen
●
First distribution to use it as a default
●
Lean but powerful: supervising, dependency-based
●
A good base for a solid service infrastructure
2023/02/04 Chimera Linux @ FOSDEM 2023 30
Service management
●
Custom suite of core Dinit services
●
Full support for fine-grained service targets
●
First-class support for user services
●
Goal: all long-running processes should be services
●
Integration with session tracking
2023/02/04 Chimera Linux @ FOSDEM 2023 31
Turnstile
●
Linux mostly uses systemd-logind for session tracking
●
Elogind exists as a “standalone” version
●
Ripped out of systemd and lots of things stubbed out
●
(E)logind tracks when users log in and out
●
Done with a daemon and a PAM module
2023/02/04 Chimera Linux @ FOSDEM 2023 32
Turnstile
●
This+seat management is used by desktops
●
With systemd, logind also spawns user systemd
●
This manages services running in user session
●
Elogind cannot do this (functionality stubbed out)
●
New solution developed
2023/02/04 Chimera Linux @ FOSDEM 2023 33
Turnstile
●
Turnstile aims to eventually fully replace elogind
●
Manage user instances of Dinit
●
Don’t manage seats (work in tandem with libseat)
●
Provide a library alongside daemon
●
Agnostic API (for either logind or turnstiled)
2023/02/04 Chimera Linux @ FOSDEM 2023 34
Turnstile
●
Manage Dbus session bus as a user service
●
Result: a single session bus per user (like systemd)
●
Fixed session bus address (/run/user/$UID/bus)
●
Limitless potential for user services (Dbus activation?)
●
Currently also used for e.g. PipeWire/WirePlumber
2023/02/04 Chimera Linux @ FOSDEM 2023 35
Cbuild
●
Build system for cports (our “ports tree”)
●
Written in Python (standard library only)
●
Builds package templates (which are Python scripts)
●
Generates apk repositories
●
High performance, but also strict and secure
2023/02/04 Chimera Linux @ FOSDEM 2023 36
Cbuild
pkgname = "crispy-doom"
pkgver = "5.11.1"
pkgrel = 0
build_style = "gnu_configure"
hostmakedepends = ["automake", "pkgconf"]
makedepends = [
"sdl-devel", "sdl_mixer-devel", "sdl_net-devel",
"libsamplerate-devel", "libpng-devel"
]
pkgdesc = "Limit-removing enhanced-resolution Doom source port"
maintainer = "q66 <q66@chimera-linux.org>"
license = "GPL-2.0-or-later"
url = "https://github.com/fabiangreffrath/crispy-doom"
source = f"{url}/archive/{pkgname}-{pkgver}.tar.gz"
sha256 = "7c5bb36393dec39b9732e53963dadd6bcc3bd193370c4ec5b1c0121df3b38faa"
# FIXME int
hardening = ["!int"]
def pre_configure(self):
self.do("autoreconf", "-if")
2023/02/04 Chimera Linux @ FOSDEM 2023 37
Cbuild
●
Everything builds in a simple container (build root)
●
Minimized Chimera system (with build deps installed)
●
Unprivileged and fully sandboxed (Linux namespaces)
●
Build container is read-only, no network access
●
No access to the outside system by the build
2023/02/04 Chimera Linux @ FOSDEM 2023 38
Cbuild
●
Templates are declarative (ideally just metadata)
●
Transparent cross-compiling support
●
Clean handling of common build systems
●
Strict, mandatory linting hooks, unit tests run OOTB
●
Bulk build support, update-check, ...
2023/02/04 Chimera Linux @ FOSDEM 2023 39
Build flags and hardening
●
All the basic stuff (FORTIFY, PIE, stack canaries, etc.)
●
System-wide LTO (ThinLTO)
●
System-wide UBSan subset by default
●
Protected against signed integer overflows
●
CFI (Control Flow Integrity) for many packages
2023/02/04 Chimera Linux @ FOSDEM 2023 40
Scudo allocator
●
We now use LLVM’s Scudo hardened allocator
●
Also used by e.g. Android by default
●
Replaces musl mallocng
●
Significantly better multithread performance
●
GWP-ASan support eventually
2023/02/04 Chimera Linux @ FOSDEM 2023 41
Other core things
●
Some tooling taken from Debian
●
Initramfs-tools for initramfs generation
●
Console-setup for console configuration
●
Cryptsetup scripts for encrypted drives
●
GRUB bootloader, ZFS support (incl. root), etc.
2023/02/04 Chimera Linux @ FOSDEM 2023 42
Chimera desktop
2023/02/04 Chimera Linux @ FOSDEM 2023 43
Chimera desktop
●
First added: Weston and Gtk
●
Expansion: Xorg, Enlightenment/EFL, pekwm
●
Multimedia stack (FFmpeg, GStreamer)
●
GNOME desktop (default) added in spring 2022
●
Web browsers (Epiphany, Firefox), games (DOOM)
2023/02/04 Chimera Linux @ FOSDEM 2023 44
Towards alpha
●
To be released in late February to early March
●
World rebuild
●
Automatic build infrastructure
●
Clean up hardening fallout
●
Update every template
2023/02/04 Chimera Linux @ FOSDEM 2023 45
After alpha
●
Expected to take 6-12 months
●
Add libgcc compatibility shim (binary compatibility)
●
Add support for D-Bus activation
●
Investigate additional hardening
●
Documentation, locale support, etc.
2023/02/04 Chimera Linux @ FOSDEM 2023 46
Conclusion
●
Currently nearing usability
●
Suitable for early adopters by March
●
Get all major changes done by beta
●
Continue packaging software
●
Cooperate with upstreams
2023/02/04 Chimera Linux @ FOSDEM 2023 47
Thanks for listening!
●
https://chimera-linux.org
●
https://github.com/chimera-linux
●
https://twitter.com/chimera_linux
●
#chimera-linux @ OFTC (irc.oftc.net)
●
#chimera-linux:matrix.org

More Related Content

Similar to Chimera Linux: A BSD-LLVM distro from scratch

[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020Akihiro Suda
 
Introducing Container Technology to TSUBAME3.0 Supercomputer
Introducing Container Technology to TSUBAME3.0 SupercomputerIntroducing Container Technology to TSUBAME3.0 Supercomputer
Introducing Container Technology to TSUBAME3.0 SupercomputerAkihiro Nomura
 
Embedded Linux Basics
Embedded Linux BasicsEmbedded Linux Basics
Embedded Linux BasicsMarc Leeman
 
Bsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsBsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsScott Tsai
 
Leveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVLeveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVOpersys inc.
 
[CNCF TAG-Runtime 2022-10-06] Lima
[CNCF TAG-Runtime 2022-10-06] Lima[CNCF TAG-Runtime 2022-10-06] Lima
[CNCF TAG-Runtime 2022-10-06] LimaAkihiro Suda
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless ContainersAkihiro Suda
 
libreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistrolibreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistroAll Things Open
 
Kernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkKernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkAnne Nicolas
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Opersys inc.
 
Survey of Container Build Tools
Survey of Container Build ToolsSurvey of Container Build Tools
Survey of Container Build ToolsMichael Ducy
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux HeritageOpersys inc.
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIOpersys inc.
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VOpersys inc.
 
pkgsrc on SmartOS
pkgsrc on SmartOSpkgsrc on SmartOS
pkgsrc on SmartOSjonperkin
 
Introduction to containers
Introduction to containersIntroduction to containers
Introduction to containersNitish Jadia
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesMender.io
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOSAkihiro Suda
 

Similar to Chimera Linux: A BSD-LLVM distro from scratch (20)

[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020
 
Introducing Container Technology to TSUBAME3.0 Supercomputer
Introducing Container Technology to TSUBAME3.0 SupercomputerIntroducing Container Technology to TSUBAME3.0 Supercomputer
Introducing Container Technology to TSUBAME3.0 Supercomputer
 
Embedded Linux Basics
Embedded Linux BasicsEmbedded Linux Basics
Embedded Linux Basics
 
Bsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessionsBsdtw17: lightning talks/wip sessions
Bsdtw17: lightning talks/wip sessions
 
Leveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVLeveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IV
 
[CNCF TAG-Runtime 2022-10-06] Lima
[CNCF TAG-Runtime 2022-10-06] Lima[CNCF TAG-Runtime 2022-10-06] Lima
[CNCF TAG-Runtime 2022-10-06] Lima
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless Containers
 
libreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistrolibreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux Distro
 
Armbian linux
Armbian linuxArmbian linux
Armbian linux
 
Armbian balcoon
Armbian balcoonArmbian balcoon
Armbian balcoon
 
Kernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkKernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver framework
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
 
Survey of Container Build Tools
Survey of Container Build ToolsSurvey of Container Build Tools
Survey of Container Build Tools
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux Heritage
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon V
 
pkgsrc on SmartOS
pkgsrc on SmartOSpkgsrc on SmartOS
pkgsrc on SmartOS
 
Introduction to containers
Introduction to containersIntroduction to containers
Introduction to containers
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSes
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS
 

More from Igalia

Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JITIgalia
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!Igalia
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerIgalia
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in MesaIgalia
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIgalia
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsIgalia
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesIgalia
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSIgalia
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webIgalia
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersIgalia
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...Igalia
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on RaspberryIgalia
 
Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Igalia
 
Async page flip in DRM atomic API
Async page flip in DRM  atomic APIAsync page flip in DRM  atomic API
Async page flip in DRM atomic APIIgalia
 
From the proposal to ECMAScript – Step by Step
From the proposal to ECMAScript – Step by StepFrom the proposal to ECMAScript – Step by Step
From the proposal to ECMAScript – Step by StepIgalia
 
Migrating Babel from CommonJS to ESM
Migrating Babel     from CommonJS to ESMMigrating Babel     from CommonJS to ESM
Migrating Babel from CommonJS to ESMIgalia
 
The rainbow treasure map: Advanced color management on Linux with AMD/Steam D...
The rainbow treasure map: Advanced color management on Linux with AMD/Steam D...The rainbow treasure map: Advanced color management on Linux with AMD/Steam D...
The rainbow treasure map: Advanced color management on Linux with AMD/Steam D...Igalia
 
Freedreno on Android – XDC 2023
Freedreno on Android          – XDC 2023Freedreno on Android          – XDC 2023
Freedreno on Android – XDC 2023Igalia
 
On-going challenges in the Raspberry Pi driver stack – XDC 2023
On-going challenges in the Raspberry Pi driver stack – XDC 2023On-going challenges in the Raspberry Pi driver stack – XDC 2023
On-going challenges in the Raspberry Pi driver stack – XDC 2023Igalia
 
Status Update of the VKMS DRM driver – XDC 2023
Status Update of the VKMS DRM driver – XDC 2023Status Update of the VKMS DRM driver – XDC 2023
Status Update of the VKMS DRM driver – XDC 2023Igalia
 

More from Igalia (20)

Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
 
Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...Enable hardware acceleration for GL applications without glamor on Xorg modes...
Enable hardware acceleration for GL applications without glamor on Xorg modes...
 
Async page flip in DRM atomic API
Async page flip in DRM  atomic APIAsync page flip in DRM  atomic API
Async page flip in DRM atomic API
 
From the proposal to ECMAScript – Step by Step
From the proposal to ECMAScript – Step by StepFrom the proposal to ECMAScript – Step by Step
From the proposal to ECMAScript – Step by Step
 
Migrating Babel from CommonJS to ESM
Migrating Babel     from CommonJS to ESMMigrating Babel     from CommonJS to ESM
Migrating Babel from CommonJS to ESM
 
The rainbow treasure map: Advanced color management on Linux with AMD/Steam D...
The rainbow treasure map: Advanced color management on Linux with AMD/Steam D...The rainbow treasure map: Advanced color management on Linux with AMD/Steam D...
The rainbow treasure map: Advanced color management on Linux with AMD/Steam D...
 
Freedreno on Android – XDC 2023
Freedreno on Android          – XDC 2023Freedreno on Android          – XDC 2023
Freedreno on Android – XDC 2023
 
On-going challenges in the Raspberry Pi driver stack – XDC 2023
On-going challenges in the Raspberry Pi driver stack – XDC 2023On-going challenges in the Raspberry Pi driver stack – XDC 2023
On-going challenges in the Raspberry Pi driver stack – XDC 2023
 
Status Update of the VKMS DRM driver – XDC 2023
Status Update of the VKMS DRM driver – XDC 2023Status Update of the VKMS DRM driver – XDC 2023
Status Update of the VKMS DRM driver – XDC 2023
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Chimera Linux: A BSD-LLVM distro from scratch

  • 1. 2023/02/04 Chimera Linux @ FOSDEM 2023 1 A BSD/LLVM distro from scratch
  • 2. 2023/02/04 Chimera Linux @ FOSDEM 2023 2 Who? ● FOSS contributor since 2007 ● On a break from work ● FreeBSD user since 2009 ● Former Void Linux developer ● Jack of all trades
  • 3. 2023/02/04 Chimera Linux @ FOSDEM 2023 3 Chimera Linux ● New Linux distribution (mid 2021) ● General purpose, from scratch ● FreeBSD core tools, LLVM toolchain, musl libc ● Rolling release ● Highly portable to many architectures
  • 4. 2023/02/04 Chimera Linux @ FOSDEM 2023 4 Quick history ● Started in early-mid 2021 ● Cbuild: meta-build system for packages ● Void Linux developer at the time ● Quick distro written around cbuild ● GCC, GNU userland, xbps package manager
  • 5. 2023/02/04 Chimera Linux @ FOSDEM 2023 5 Quick history ● Some 50 package templates ● Not bootable ● Capable of building itself ● Aiming to fix shortcomings of xbps-src ● Performance and correctness
  • 6. 2023/02/04 Chimera Linux @ FOSDEM 2023 6 Quick history
  • 7. 2023/02/04 Chimera Linux @ FOSDEM 2023 7 Quick history ● Switch to LLVM, FreeBSD tools, etc. ● Gradual packaging expansion ● Iterative enhancements ● Bootable, self-bootstrapping system in late 2021 ● GNOME desktop in early 2022
  • 8. 2023/02/04 Chimera Linux @ FOSDEM 2023 8 Quick history
  • 9. 2023/02/04 Chimera Linux @ FOSDEM 2023 9 Quick history ● Talk at FOSDEM 2022 ● Many refinements during 2022 ● Security hardening ● Development of fresh solutions ● Aiming for alpha in February/March 2023
  • 10. 2023/02/04 Chimera Linux @ FOSDEM 2023 10 Why? ● Unhappiness with existing systems ● Make a well-rounded, practical OS ● Improve software in general ● Make full use of LLVM (sanitizers, LTO…) ● Prove Linux != GNU/Linux ;)
  • 11. 2023/02/04 Chimera Linux @ FOSDEM 2023 11 Why? ● Have some fun ● Internet people said I couldn’t ● Build a good community ● Make a good system for myself ● Make a good system for other people
  • 12. 2023/02/04 Chimera Linux @ FOSDEM 2023 12 General principles ● Projects with 1 goal are doomed to fail ● Pointless dogmas are doomed to fail ● However, beware of scope creep ● Opinionated development is good ● Software quality matters, community more so
  • 13. 2023/02/04 Chimera Linux @ FOSDEM 2023 13 General principles ● Fun is good, try to keep it that way (for everyone) ● FOSS projects are social spaces ● Reactionaries and toxic people make a toxic community ● Try hard to keep them out ● Attempt not to stray towards pointless elitism
  • 14. 2023/02/04 Chimera Linux @ FOSDEM 2023 14 Technical principles ● Be strict by default and avoid technical debt ● There should be one obvious way to do it ● Be simple, but not too simple ● Hardening is important ● Strive for portability
  • 15. 2023/02/04 Chimera Linux @ FOSDEM 2023 15 Technical principles ● Good tooling is important ● Being self-sustaining is important ● Infrastructure should be easy to replicate ● Be able to bootstrap from source ● (keep in mind it’s a means to an end though)
  • 16. 2023/02/04 Chimera Linux @ FOSDEM 2023 16 Technical principles ● If it’s written in shell, it likely should not be ● Make it easy to do right, and hard to do wrong ● Documentation matters ● Systemd’s not good, but it brought necessary change ● Develop good solutions and keep head out of the sand
  • 17. 2023/02/04 Chimera Linux @ FOSDEM 2023 17 BSD system development ● Entire system in a single tree ● Lots of components sharing a repository ● Complete OS capable of boot ● Third party software distributed through ports ● Some third party components in base (toolchain...)
  • 18. 2023/02/04 Chimera Linux @ FOSDEM 2023 18 What makes a Linux distro? ● A collection of software from different parties ● Linux kernel as the base layer (always) ● Userland tooling (often GNU), libc (often GNU) ● Toolchain to build all this (often GNU) ● Service manager and aux tooling (often systemd)
  • 19. 2023/02/04 Chimera Linux @ FOSDEM 2023 19 What makes a Linux distro? ● Tied together with a package manager ● Linux + GCC + glibc + coreutils + ... => GNU/Linux ● Distros ensure these components all work together ● Test many different configurations ● “We don’t break userspace” – Linux kernel
  • 20. 2023/02/04 Chimera Linux @ FOSDEM 2023 20 Sorting out the toolchain ● LLVM/Clang is pretty seamless nowadays ● Most Linux systems => GCC provides runtime ● LLVM comes with its own (compiler-rt) ● Used in Chimera (no libgcc) ● Musl used for libc (from the start)
  • 21. 2023/02/04 Chimera Linux @ FOSDEM 2023 21 Sorting out the toolchain ● GNU binutils complements GCC (linker etc.) ● In Chimera, LLD from LLVM is used everywhere ● Elftoolchain provides other tooling (+ libelf) ● This is also used by FreeBSD ● LLVM also provides the tools (e.g. llvm-readelf)
  • 22. 2023/02/04 Chimera Linux @ FOSDEM 2023 22 Core userland ● GNU coreutils, findutils, diffutils, grep, sed, util-linux… ● Busybox often used on non-GNU distros (e.g. Alpine) ● Overly spartan functionally, code is not very good ● Other alternatives are usually worse ● FreeBSD to the rescue
  • 23. 2023/02/04 Chimera Linux @ FOSDEM 2023 23 Core userland ● Found third party port: bsdutils ● Incomplete, bare, not quite ready ● Helped complete it, reach parity with coreutils ● Ported many other tools to expand coverage ● Result: chimerautils
  • 24. 2023/02/04 Chimera Linux @ FOSDEM 2023 24 Core userland ● Replaces not just GNU tooling ● All-in-one userland package (simplified bootstrap) ● Lean enough for bare envs (e.g. initramfs) ● Powerful enough for interactive use ● Easy hardening, help break up monoculture
  • 25. 2023/02/04 Chimera Linux @ FOSDEM 2023 25 Linux kernel
  • 26. 2023/02/04 Chimera Linux @ FOSDEM 2023 26 Linux kernel ● Clang-compatible these days ● Patches to support BSD utilities, Elftoolchain libelf ● LLVM_IAS did not work on some archs until recently ● E.g. ppc64le needed binutils because of that ● Clang assembler used everywhere now
  • 27. 2023/02/04 Chimera Linux @ FOSDEM 2023 27 CKMS ● Distros usually use DKMS to build out of tree modules ● Massive bash script, unfitting functionality ● Created CKMS (Chimera Kernel Module System) ● DKMS-like functionality, but lightweight and robust ● Privilege separation, packaging integration...
  • 28. 2023/02/04 Chimera Linux @ FOSDEM 2023 28 Package manager ● FreeBSD pkg considered ● Not quite in the shape I’d like ● Alpine Linux’s apk proved excellent ● Eventual transition to apk-tools 3.x (new generation) ● Full cbuild integration in summer 2021
  • 29. 2023/02/04 Chimera Linux @ FOSDEM 2023 29 Service management ● Many options evaluated (runit, s6, openrc, …) ● Dinit was chosen ● First distribution to use it as a default ● Lean but powerful: supervising, dependency-based ● A good base for a solid service infrastructure
  • 30. 2023/02/04 Chimera Linux @ FOSDEM 2023 30 Service management ● Custom suite of core Dinit services ● Full support for fine-grained service targets ● First-class support for user services ● Goal: all long-running processes should be services ● Integration with session tracking
  • 31. 2023/02/04 Chimera Linux @ FOSDEM 2023 31 Turnstile ● Linux mostly uses systemd-logind for session tracking ● Elogind exists as a “standalone” version ● Ripped out of systemd and lots of things stubbed out ● (E)logind tracks when users log in and out ● Done with a daemon and a PAM module
  • 32. 2023/02/04 Chimera Linux @ FOSDEM 2023 32 Turnstile ● This+seat management is used by desktops ● With systemd, logind also spawns user systemd ● This manages services running in user session ● Elogind cannot do this (functionality stubbed out) ● New solution developed
  • 33. 2023/02/04 Chimera Linux @ FOSDEM 2023 33 Turnstile ● Turnstile aims to eventually fully replace elogind ● Manage user instances of Dinit ● Don’t manage seats (work in tandem with libseat) ● Provide a library alongside daemon ● Agnostic API (for either logind or turnstiled)
  • 34. 2023/02/04 Chimera Linux @ FOSDEM 2023 34 Turnstile ● Manage Dbus session bus as a user service ● Result: a single session bus per user (like systemd) ● Fixed session bus address (/run/user/$UID/bus) ● Limitless potential for user services (Dbus activation?) ● Currently also used for e.g. PipeWire/WirePlumber
  • 35. 2023/02/04 Chimera Linux @ FOSDEM 2023 35 Cbuild ● Build system for cports (our “ports tree”) ● Written in Python (standard library only) ● Builds package templates (which are Python scripts) ● Generates apk repositories ● High performance, but also strict and secure
  • 36. 2023/02/04 Chimera Linux @ FOSDEM 2023 36 Cbuild pkgname = "crispy-doom" pkgver = "5.11.1" pkgrel = 0 build_style = "gnu_configure" hostmakedepends = ["automake", "pkgconf"] makedepends = [ "sdl-devel", "sdl_mixer-devel", "sdl_net-devel", "libsamplerate-devel", "libpng-devel" ] pkgdesc = "Limit-removing enhanced-resolution Doom source port" maintainer = "q66 <q66@chimera-linux.org>" license = "GPL-2.0-or-later" url = "https://github.com/fabiangreffrath/crispy-doom" source = f"{url}/archive/{pkgname}-{pkgver}.tar.gz" sha256 = "7c5bb36393dec39b9732e53963dadd6bcc3bd193370c4ec5b1c0121df3b38faa" # FIXME int hardening = ["!int"] def pre_configure(self): self.do("autoreconf", "-if")
  • 37. 2023/02/04 Chimera Linux @ FOSDEM 2023 37 Cbuild ● Everything builds in a simple container (build root) ● Minimized Chimera system (with build deps installed) ● Unprivileged and fully sandboxed (Linux namespaces) ● Build container is read-only, no network access ● No access to the outside system by the build
  • 38. 2023/02/04 Chimera Linux @ FOSDEM 2023 38 Cbuild ● Templates are declarative (ideally just metadata) ● Transparent cross-compiling support ● Clean handling of common build systems ● Strict, mandatory linting hooks, unit tests run OOTB ● Bulk build support, update-check, ...
  • 39. 2023/02/04 Chimera Linux @ FOSDEM 2023 39 Build flags and hardening ● All the basic stuff (FORTIFY, PIE, stack canaries, etc.) ● System-wide LTO (ThinLTO) ● System-wide UBSan subset by default ● Protected against signed integer overflows ● CFI (Control Flow Integrity) for many packages
  • 40. 2023/02/04 Chimera Linux @ FOSDEM 2023 40 Scudo allocator ● We now use LLVM’s Scudo hardened allocator ● Also used by e.g. Android by default ● Replaces musl mallocng ● Significantly better multithread performance ● GWP-ASan support eventually
  • 41. 2023/02/04 Chimera Linux @ FOSDEM 2023 41 Other core things ● Some tooling taken from Debian ● Initramfs-tools for initramfs generation ● Console-setup for console configuration ● Cryptsetup scripts for encrypted drives ● GRUB bootloader, ZFS support (incl. root), etc.
  • 42. 2023/02/04 Chimera Linux @ FOSDEM 2023 42 Chimera desktop
  • 43. 2023/02/04 Chimera Linux @ FOSDEM 2023 43 Chimera desktop ● First added: Weston and Gtk ● Expansion: Xorg, Enlightenment/EFL, pekwm ● Multimedia stack (FFmpeg, GStreamer) ● GNOME desktop (default) added in spring 2022 ● Web browsers (Epiphany, Firefox), games (DOOM)
  • 44. 2023/02/04 Chimera Linux @ FOSDEM 2023 44 Towards alpha ● To be released in late February to early March ● World rebuild ● Automatic build infrastructure ● Clean up hardening fallout ● Update every template
  • 45. 2023/02/04 Chimera Linux @ FOSDEM 2023 45 After alpha ● Expected to take 6-12 months ● Add libgcc compatibility shim (binary compatibility) ● Add support for D-Bus activation ● Investigate additional hardening ● Documentation, locale support, etc.
  • 46. 2023/02/04 Chimera Linux @ FOSDEM 2023 46 Conclusion ● Currently nearing usability ● Suitable for early adopters by March ● Get all major changes done by beta ● Continue packaging software ● Cooperate with upstreams
  • 47. 2023/02/04 Chimera Linux @ FOSDEM 2023 47 Thanks for listening! ● https://chimera-linux.org ● https://github.com/chimera-linux ● https://twitter.com/chimera_linux ● #chimera-linux @ OFTC (irc.oftc.net) ● #chimera-linux:matrix.org