Skip to content

cstaylor1899/Musl-LFS

 
 

Repository files navigation

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

  • i686/i586 : Stable and tested. Stable enough to build Xorg, Qt5 (without QT-webengine), Rust, and Firefox.
  • x86_64 : Stable and tested. Stable enough to build Xorg, Qt5, Rust, and Firefox.
  • aarch64: Stable and tested. Stable enough to build Xorg, Qt5, Rust, and Firefox.
  • armv7/armv6: Builds fine. Requires modification to suit target hardware.

Goals:

  • Properly name patches to reflect origin (i.e. Alpine or void)
  • Create a list for wget to download sources.
  • Create md5s list for sources
  • Update s6-rc & s6 to lastest version
  • Redesign tool chain build to avoid two build passes of binutils and GCC
  • Generate HTML 'book' like LFS
  • Add utmp/utmpx implementation
  • Transition from pkgconfig to pkgconf
  • Transition from gettext to gettext-tiny
  • POSIX compatibility
  • Unify directories bin, sbin, and lib from / and /usr
  • Remove obselete bin group & user

Build Method

MLFS is based on LFS 9.1 and composed of 3 stages: cross-tools, tools, and chroot.

  1. 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.
  2. 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
  3. Chroot -- Last stage in which the final Musl system is built, using the tool chain built in the previous stage

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.

Optional Packages:

Projects of Interest

Layout

  • build-scripts - Build scripts to use to semi-automate building /cross-tools, /tools, and the final system
  • contrib - Additional sources that are hard to find or re-packed
  • doc - Build instructions to build a LFS installation that uses Musl instead of Glibc and S6 instead of SysVint.
  • extra - Helpful scripts to mount, chroot, and umount a MLFS build.
  • files - Files that will be needed during the build
  • patches - All patches used to patch sources to work/recognize Musl C Library
  • sources.list - List of sources to download

Changelog (since 8.00)

  • Completed scripts to build cross-tools and tools
  • Upgraded bash to 5.1
  • Updated lsb-release to 9.0
  • Upgraded flex to 2.6.4
  • Upgraded expat to 2.4.1
  • Upgraded inetutils to 2.0
  • Upgraded perl to 5.34.0
  • Upgraded autoconf to 2.7.1
  • Upgraded automake to 1.16.3
  • Upgraded libelf to 0.185
  • Upgraded libreSSL to 3.3.3
  • Upgraded Python3 to 3.9.5
  • Upgraded procps-ng to 3.3.17 with utmps support
  • Upgraded coreutils with utmps support
  • Upgraded grub to 2.06
  • Upgraded iproute 2 to 5.12.0
  • Upgraded to man-db 2.9.4.
  • Upgraded vim to 8.2.2890
  • Upgraded util-linux to 2.36.2
  • Upgraded execline to 2.8.0.1
  • Upgraded s6 to 2.10.0.3
  • Upgraded s6-rc to 0.5.2.2
  • Upgraded s6-linux-utils to 2.5.1.5
  • Upgraded s6-portable-utils to 2.2.3.2
  • Upgraded s6-linux-init 1.0.6.3

About

Linux From Scratch using Musl as Libc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 63.0%
  • C 34.2%
  • Roff 2.8%