Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

81–90 of 117 posts

Re: Linux from Scratch

#81

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. 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. Exactly my experience. Back in the day when all I knew was Windows and a couple of BSDs I wanted to get into Linux, because it seemed like it was going to become very relevant in the next decades. After years of slacking I thought LFS…

Exactly my experience. I tried LFS several times, but I didn't learn much. I learned more with Arch Linux, but I truly appreciate the work that was put in LFS, marvelous for the right type of learner.

Re: Linux from Scratch

#83

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 solutions you need.

No point in reinvent the whole thing, tho. Following your analogy, if all cakes need egg, there must be a reason even if we don't know it.

Re: Linux from Scratch

#84
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?

LLVM is a much more mature and modern compiler by basically every measure, and importantly, a native cross compiler unlike GCC.

One copy of LLVM can build for many architectures vs needing one GCC toolchain for every architecture you wish to target.

Also modern languages like rust require LLVM so we need it anyway, and the kernel has rust now, so why not make the most mature compiler stack the global default? Using two different compilers for the kernel would be begging for problems.

I am most optimistic for the Fil-C fork of LLVM being a default some day where we get compile time memory safety too.

We do maintain gcc in tree for legacy languages like Fortran though.

Re: Linux from Scratch

#85
post #44

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…

> 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. I know a french cookbook[0] which contains not only recipes for dishes, but also for some of the intermediary ingredients, like stocks, that can now be bought at the supermarket. I feel that I’ve learned a lot by following those recipes, be it simply in…

Tangential, but how good/useful/approachable is the book you cited as example?

How would it compare, in your experience, to other (modern) cooking books with a similar scope?

Re: Linux from Scratch

#86
post #26

Earlier quoted context omitted.

Took me half a second to realize I would probably start with "LFS :: Linux From Scratch is the main book, the base from which all other projects are derived."

You mean the link to a page which _also_ doesn't have the main book?

It's a link to the project page for the main book and it does a good job of explaining itself and the available resources. I guess the biggest issue is it's not immediately obvious the left navigation menu changes between the project and subproject landing pages.

Re: Linux from Scratch

#87
In my experience with Gentoo, the hard stuff is well beyond the base setup: it's getting sound, bluetooth, auto-mounting, etc. setup the way it is in the bigger distros.

Re: Linux from Scratch

#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

Re: Linux from Scratch

#89
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…

I agree with you. Maybe the person from the first comment read first few pages only which basically give some context.

Re: Linux from Scratch

#90
About 4 years after beating my head against the wall trying to learn all about embedded linux builds and reading through yocto docs, I found a course on Udemy titled, "Embedded Linux Step by Step Using Beaglebone Black" It was perfect for walking me through the kernel, file-systems, boot-loaders, etc... It was a bit dated even then and thus required a little leg work to find the proper source versions of linux for the beagle board but I got it all working and cross-compiled a linux distro from scratch for the beagle board, flashed it, booted it and talked to it via serial port. I highly recommend the course.
Post reply on HN