this post was submitted on 25 Dec 2023
243 points (95.8% liked)
Linux
48330 readers
655 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'd just start from very simple kernel and static init, and work my way up to adding more functionality. I'd use kvm with rootfs on p9fs - that allows playing with it without having to build images. I can throw together the initial invocation, if you're interested.
Then start building simple core elements in a language allowing easy static linking - I'd use C with dietlibc or go. Start adding core userland programs, explore initramfs (without using something like dracut), add dynamic libraries and explore the dynamic linker, ... - if you're interested we could set up a matrix channel for questions (typically with some lag, though), and do a github repo to follow along.
LFS iirc goes for full desktop - the high level userland is very complex, but easy to understand when you know the basics. You pretty much learn how to compile lots of libraries - which has limited use. A full LFS style desktop I'd no longer recommend nowadays - it's just too many dependencies to deal with. I used to build my own system (not following LFS) until the Xorg fork made it sigificantly more complicated - and things got just worse since then, and I never was using a complicated UI stack.
edit: I had a few minutes, so I've thrown this together https://github.com/bwachter/lll - you should easily get a kernel with a custom init running, and have enough to start experimenting. If you or anyone else is interested to go deeper I'll set up a matrix channel for guidance.