Awesome
Musl-LFS
Linux From Scratch using Musl as Libc and S6+S6-rc as init system
This is based on the works of Linux From Scratch (http://www.linuxfromscratch.org), which use GLibc and SysVinit/systemD. Additional work was derived from Void Linux (https://voidlinux.org), Alpine Linux (https://alpinelinux.org), and Dragora Linux (https://dragora.org). For logging during development of tool chains, I used porg from http://porg.sourceforge.net/.
The aim of this project is to create a create a Linux system using Musl (www.musl-libc.org) instead of GNU's Glibc and S6 (https://skarnet.org/) instead SysVinit.
Supported Architectures
<ul> <li>i686/i586 : Stable and tested. Stable enough to build Xorg, Qt5 (without QT-webengine), Rust, and Firefox.</li> <li>x86_64 : Stable and tested. Stable enough to build Xorg, Qt5, Rust, and Firefox.</li> <li>aarch64: Stable and tested. Stable enough to build Xorg, Qt5, Rust, and Firefox.</li> <li>armv7/armv6: Builds fine. Requires modification to suit target hardware.</li> </ul>Goals:
<ul> <li> [x] Properly name patches to reflect origin (i.e. Alpine or void) </li> <li> [x] Create a list for wget to download sources.</li> <li> [x] Create md5s list for sources</li> <li> [x] Update s6-rc & s6 to lastest version </li> <li> [x] Redesign tool chain build to avoid two build passes of binutils and GCC</li> <li> [ ] Generate HTML 'book' like LFS</li> <li> [x] Add utmp/utmpx implementation</li> <li> [x] Transition from pkgconfig to pkgconf</li> <li> [x] Transition from gettext to gettext-tiny</li> <li> [ ] POSIX compatibility </li> <li> [x] Unify directories bin, sbin, and lib from / and /usr </li> <li> [x] Remove obselete bin group & user </ul>Build Method
MLFS is based on LFS 9.1 and composed of 3 stages: cross-tools, tools, and chroot.
<ol> <li>Cross-Tools -- Create a very basic toolchain with host's own tool chain. THis will be used to build the next stage. It also allows the next stage to use Musl Libc instead of Glibc.</li> <li>Tools -- Creates the tool chain that will be used in the next stage. Resulting toolchain is sandboxed from host and uses its own libc: Musl </li> <li>Chroot -- Last stage in which the final Musl system is built, using the tool chain built in the previous stage </li> </ol>Starting with LFS 10.x, LFS now uses as new method and has not been tested to work with MLFS at this time.
Tested Builds
Host | Target | Build Status |
---|---|---|
i686-musl | i686-musl | Pass |
i686-glibc | i686-musl | Pending |
x86_64-musl | x86_64-musl | Pass |
x86_64-glibc | x86_64-musl | Pass |
aarch64-glibc | aarch64-musl | Pass |
armv7l-glibc | armv7l-musl | Pass |
armv7l-musl | armv7l-musl | Pending |
armv6-glibc | armv6-musl | Pending |
armv6-musl | armv6-musl | Pending |
ARM builds will need some modification based on specific hardware
Additional Required Packages
If pursuing BLFS, some packages will fail to compile due certain implementions left out in the Musl C Library.
<ul> <li>Musl C Library https://www.musl-libc.org/</li> <li>Musl-FTS https://github.com/pullmoll/musl-fts</li> <li>Musl-Obstack https://github.com/pullmoll/musl-obstack</li> <li>Musl-RPmatch https://github.com/pullmoll/musl-rpmatch</li> <li>Musl-Legacy-Compatibility Headers https://github.com/void-linux/void-packages/blob/master/srcpkgs/musl-legacy-compat </li> <li>Argp-Standalone https://github.com/jahrome/argp-standalone</li> </ul>