Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

91–100 of 117 posts

Re: Linux from Scratch

#91
post #88
post #4

You can tell it's written by real Linux users because the landing page UX doesn't make it immediately obvious where to even start reading.

Idk what to tell you if the “welcome to Linux from scratch” header wasn’t enough of a hint

I thought the parent comment was missing something obvious too but if you click the top link in that section, it’s a page describing LFS but without linking to its content. Then I clicked the “Read online” link on the menu on the left, but the top links are errata and security advisories and then the main link. Not the worst navigation I’ve seen but the parent comment does have a point.

Re: Linux from Scratch

#92

LFS takes the wrong approach in my opinion. I did it once manually over a couple of days. I suppose I hoped enduring the pain of waiting for the packages to compile would somehow make me smarter. It didn’t. I didn’t learn much. It was like following a baking recipe. I know I need to add eggs and sugar in the ratio it says but I’d be damned if I could tell you why that specific ratio works. It’s just too much to take…

Except you can write bootloader only if you have something to boot. Bootloaders as we know them came after OSes, because the need of a bootloader is to boot something. Following your logic of building a piece only if needed, a bootloader should come after. I like the recipe analogy and I actually think adding things only if needed will help cutting unuseful features and possibly to have different implementations for…

in the bad olden times you definitely started to write your operating system for your new computer from the first instruction executed upwards. it wasn't at all common to have a comprehensive virtualization/simulation environment.

Re: Linux from Scratch

#93

Earlier quoted context omitted.

It is more how stuff is compiled than how stuff works. Fundamental things like how processes are scheduled are not explained by LFS.

"works" is a loaded term. LFS is how the rubber meets the road, you want how the rubber is made, for that you need something like https://www.baeldung.com/linux/processes-guide or https://linux-kernel-labs.github.io/refs/heads/master/lectur...

And if you want to get to at least the bottom most visible turtle you go with something like NAND to Tetris https://www.nand2tetris.org/

Re: Linux from Scratch

#94

Earlier quoted context omitted.

Except you can write bootloader only if you have something to boot. Bootloaders as we know them came after OSes, because the need of a bootloader is to boot something. Following your logic of building a piece only if needed, a bootloader should come after. I like the recipe analogy and I actually think adding things only if needed will help cutting unuseful features and possibly to have different implementations for…

in the bad olden times you definitely started to write your operating system for your new computer from the first instruction executed upwards. it wasn't at all common to have a comprehensive virtualization/simulation environment.

I can't understand what is the point you are trying to make

Re: Linux from Scratch

#95
post #38

LFS takes the wrong approach in my opinion. I did it once manually over a couple of days. I suppose I hoped enduring the pain of waiting for the packages to compile would somehow make me smarter. It didn’t. I didn’t learn much. It was like following a baking recipe. I know I need to add eggs and sugar in the ratio it says but I’d be damned if I could tell you why that specific ratio works. It’s just too much to take…

I'd like to counter your comment. LFS helped me a lot. It taught me how to compile packages manually, and how GNU/Linux components fit together. Armed with that knowledge, I could do things others could not do: - Make applications that bundle/automatically download their dependencies, compile them with custom flags (static linking) - Diagnose build errors buried in deep dependencies when using vcpkg - Compile program…

For me also helps me to cross compile Nvidia kernel drivers for other version of kernel than running one. Plus compile stripped-down version of X.

All this for running on embedded Linux with 32MB flash drive running from read-only volume powering two kiosk displays.

Re: Linux from Scratch

#96
post #5

We did that, but in containers. https://stagex.tools/

Interesting project. Why does it use LLVM toolchain when it already builds gcc in an earlier stage?

If I understand correctly, I think they build an older version of gcc using tcc (Tiny C Compiler by Bellard); then using that to build newer versions incrementally until they get to the modern stack with LLVM.

Re: Linux from Scratch

#97

Earlier quoted context omitted.

in the bad olden times you definitely started to write your operating system for your new computer from the first instruction executed upwards. it wasn't at all common to have a comprehensive virtualization/simulation environment.

I can't understand what is the point you are trying to make

until very recently you couldn't even do OS development without a boot loader, so asserting that that would be the last thing you would write is just nonsensical

Re: Linux from Scratch

#98

LFS takes the wrong approach in my opinion. I did it once manually over a couple of days. I suppose I hoped enduring the pain of waiting for the packages to compile would somehow make me smarter. It didn’t. I didn’t learn much. It was like following a baking recipe. I know I need to add eggs and sugar in the ratio it says but I’d be damned if I could tell you why that specific ratio works. It’s just too much to take…

> I did it once manually over a couple of days. Sounds like a speedrun of the tutorial. How did you approach packaging then and what system did you use to compile everything? I did the tutorial in the late 2000s I think and it took me 4-6 months if I remember correctly. At the time I wasn't completely new to Linux but setting up things like the boot loader was quite tricky for me. For me the main motivation was getti…

I did it in a VM took me 20 hours. Most of that time was waiting for things to compile and fixing mistakes I made because I didn't read the instructions properly.

Re: Linux from Scratch

#99
post #57

Earlier quoted context omitted.

Learning how to compile packages manually it was a common skill long before Linux came to be, and how GNU/Linux fits together could also easily be learnt with Slackware or Yggdrasil.

>Learning how to compile packages manually it was a common skill long before Linux came to be Right. I used to compile many open source packages from source on many flavors of Unix back in the day, for years. Perl, Python, MySQL, many others. Miscellaneous utilities. Esoteric languages. Even Oracle, once, on a Unix server, right at a large manufacturing company site. Even building Unix kernels from source was common…

[deleted]

Re: Linux from Scratch

#100

LFS takes the wrong approach in my opinion. I did it once manually over a couple of days. I suppose I hoped enduring the pain of waiting for the packages to compile would somehow make me smarter. It didn’t. I didn’t learn much. It was like following a baking recipe. I know I need to add eggs and sugar in the ratio it says but I’d be damned if I could tell you why that specific ratio works. It’s just too much to take…

Except you can write bootloader only if you have something to boot. Bootloaders as we know them came after OSes, because the need of a bootloader is to boot something. Following your logic of building a piece only if needed, a bootloader should come after. I like the recipe analogy and I actually think adding things only if needed will help cutting unuseful features and possibly to have different implementations for…

You probably want to use a working bootloader to see if your ‘hello world’ OS-fragment works at all. No one is writing much OS without running it, surely.
Post reply on HN