this post was submitted on 02 Oct 2023
169 points (98.8% liked)

Linux

48074 readers
932 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

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
top 27 comments
sorted by: hot top controversial new old
[–] [email protected] 23 points 1 year ago (2 children)

Saving this for later when a need to compile a linux kernel arises.

[–] [email protected] 7 points 1 year ago

Had to do it for uni.

Building and compiling is really easy. Kernel programming in Linux, on the other hand, is a nightmare with how bad the documentstion is.

[–] [email protected] 5 points 1 year ago (1 children)

Saving this for later when a need to get massive levels of frustration, so massive that I will be punching my screen, arises. (Can't wait!)

[–] Chobbes 5 points 1 year ago (1 children)

Configuring and building the Linux kernel is actually pretty nice and easy. The main thing that’s frustrating in my experience is just if you need to add a kernel module for a new device or something. It’s not really a big deal, just like “oh, I need to enable the drivers for this”.

[–] mumblerfish 5 points 1 year ago

I often look around the kernel config, maybe I'm there to add support for something or whatever. Then I start reading the help snippet, and I understand next to nothing. Ok... "If in doubt, select 'n'". What? No, I am in doubt, but I want the feature! Don't try to scare me away :-)

[–] [email protected] 15 points 1 year ago (3 children)

Wow am I so old that this isn’t a normal thing anymore?

[–] FrankTheHealer 15 points 1 year ago (2 children)

I've been using Linux as my main desktop/laptop operating system since 2018 and I've never compiled a kernel, if that's any indication. I've never needed to I guess. Might be fun to tinker with sometime but I don't think any Linux noobs would be inclined to compile their own kernel these days.

[–] [email protected] 4 points 1 year ago

I have been using 10+ distros and never compiled pretty much any regular package I use daily

[–] [email protected] 1 points 1 year ago

I’ve been using Linux since RedHat 3.0.3 and when Gentoo first came around I was rebuilding kernels left and right. Then with Arch I continued it trying to get the absolute best performance I could out of old hardware. Nowadays I float back and forth between Windows and MacOS (ease of use) but still have several headless Linux systems in the house I can mess around in. It’s been years since I’ve compiled a kernel from scratch but I’m sure it’s even more user friendly now.

[–] seaQueue 4 points 1 year ago

Most of the time the kernel is built by distro packaging these days, you're really only down and dirty with it if you need to patch the source yourself.

[–] AnUnusualRelic 3 points 1 year ago (1 children)

I haven't done it in ages, but from what I remember, there wasn't anything much to it.

[–] [email protected] 4 points 1 year ago

Nah it’s pretty straight forward. Just telling the compiler what to compile in for your situation and then compile. Sure you can compile in kernel modules you will never see in binary builds but in today’s hardware it’s nearly pointless.

[–] merthyr1831 10 points 1 year ago

I did a Minix kernel once if that counts. no need to lay all the praise on me at once, folks.

[–] [email protected] 8 points 1 year ago (1 children)

So you "make config" once and then you just tweak it from time to time! I used to run make config until I discovered xconfig (when X was xfree86) and settled on menuconfig.

I was still using menuconfig on Gentoo until around five years ago. OK I still have one or two Larry's lying around doing useful stuff but generally I just copy the old kernel config to the new one and compile away with genkernel.

make config did take a while back in the day. You literally run through the entire kernel's options one by one: y/n/m for drivers. I haven't done that since 2.0.x days. Then you forget to sort out lilo and reach for the boot floppy. No I don't miss those days.

[–] seaQueue 4 points 1 year ago

make nconfig is the new hotness in a terminal, it's an updated ncurses based menuconfig. When I'm rolling my kernel packages forward after an update I usually just run make oldconfig or make olddefconfig to generate an up to date config based on my previous version, I only get into nconfig or scripted config changes if I need to configure something by hand.

[–] GustavoM 6 points 1 year ago

Nice timing -- been trying to figure out a way to enable gpu support on the Orange pi zero 3 those last few days and this guide might help me w/ it.

[–] [email protected] 6 points 1 year ago (1 children)
[–] [email protected] 6 points 1 year ago* (last edited 1 year ago) (2 children)

omg me too... a much nerdier friend of mine told me to install Gentoo on my first custom build back in the early aughts. printed out the guide and spent over a week 24/7 compiling everything with an athlon 64 3500+... and had never used Linux before this... good times, man.

[–] Chobbes 5 points 1 year ago

TBF most of that compilation time was probably just gcc lol.

[–] [email protected] 3 points 1 year ago (1 children)

Same. Still running Gentoo 20 years later.

[–] Chobbes 3 points 1 year ago

Still compiling qtwebkit? :)

There's a lot to love about Gentoo. I miss it dearly, but I've been using NixOS lately and have been very happy with it too. It's just quite a lot easier to maintain and the model for packages makes it a lot easier to set up binary caches and stuff... Still, there's something very cozy about our dear portage :).

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago)

Like, follow the kernels built-in compile guide?

[–] [email protected] 5 points 1 year ago (1 children)

I am wondering if this really makes the system tailor your hardware better, with all its potential. Has anyone done measurements?

[–] seaQueue 6 points 1 year ago* (last edited 1 year ago) (2 children)

If you want a system wide performance boost you need to rebuild everything rather than just the kernel. You'll typically see a 10-15% performance boost by building everything for a more modern target like x86-64-v3 (Skylake era) over x86-64. Again, that's rebuilding the entire OS - all packages - not just the kernel. I think phoronix has some benchmark numbers on this from a couple of years ago if you want to dig into it. On Arch there's an unofficial repo that builds everything for the -v3 target and people seem to have good results. I think RHEL and/or Fedora were considering moving the entire distro to v2 or v3 but I haven't paid attention to how that turned out.

Edit: here's the arch user effort for -v3, it looks like all of the harting.dev links are dead: https://somegit.dev/ALHP/ALHP.GO

[–] [email protected] 3 points 1 year ago

cachyos is an arch-based distro, which has a large repository for v3-compiled binaries and soon they'll have also repo for v4. kernels are already compiled for v3 and v4. it's also by far my favorite distro at the moment.

[–] [email protected] 1 points 1 year ago (1 children)

Do you know what AMD ryzen equivalent that would be?

[–] seaQueue 3 points 1 year ago* (last edited 1 year ago)

Anything 1xxx series or later for sure. I'm not sure what the lower bound is.

What does /usr/lib/ld-linux-x86-64.so.2 --help say on the system you're wondering about?

-v2 is just about everything after 2011ish, if it was made more recently than 2016 -v3 almost certainly is supported.