Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A very interesting process for package management. I found the Slackware pkgtools scripts very useful for this purpose. I just use installpkg, makepkg, removepkg and upgradepkg, though. While building the temp tools, I also install tar-1.13, the rev binary from util-linux-ng, which, expat and xz. I use SlackBuilds for all packages, and don't use optimization. Of course, I modify the build scripts to suit an LFS system. The other major detour I take is using the Linux-Libre kernel (it's not that major a deviation, in fact) instead of the mainline. I substitute other packages as well; grub, e2fsprogs and sysklogd, instead using lilo, reiser4 and rsyslog. I have successfully upgraded glibc from 2.11 to 2.12, and kernel from 2.6.34 to the latest (including kernel headers), without any fuss. Haven't yet had to upgrade gcc. Will see how that works out when a new release arrives.
What I like about your build process is the small, nifty scripts you use to ease building the more mundane parts of LFS. I have wanted to do that, but end up taking the more laborious path. I can only guess (as I don't see it mentioned otherwise) that you are on a 32-bit box. I'd like to know if you've tried this process on a 64-bit system. Following the LFS instructions to build a 64-bit setup doesn't always produce satifactory results. I have done it, but am not entirely happy about it. So if you have attempted and succeeded in setting up a 64-bit build, it'd be great if you can post your notes on that. I know there's CLFS, but I don't want to go that way (don't want eglibc). Also, have you gone further and tried BLFS? Would be very interested in knowing if you have, coz writing over 200 build-scripts is a pain, really.
Last edited by corbis_demon; 10-21-2010 at 08:20 AM.
A very interesting process for package management.
All the credit goes to Matthias Benkmann, the author of the original hint.
Quote:
I found the Slackware pkgtools scripts very useful for this purpose. I just use installpkg, makepkg, removepkg and upgradepkg, though. While building the temp tools, I also install tar-1.13, the rev binary from util-linux-ng, which, expat and xz.
Can you install tar-1.13 along side later versions of tar?
Quote:
I use SlackBuilds for all packages, and don't use optimization. Of course, I modify the build scripts to suit an LFS system.
I'm a dyed-in-the-wool slacker, so your approach is pretty much exactly how I would have tackled it had I not gone with the package users scheme.
Are you using a BSD-style init too?
Quote:
The other major detour I take is using the Linux-Libre kernel (it's not that major a deviation, in fact) instead of the mainline. I substitute other packages as well; grub, e2fsprogs and sysklogd, instead using lilo, reiser4 and rsyslog. I have successfully upgraded glibc from 2.11 to 2.12, and kernel from 2.6.34 to the latest (including kernel headers), without any fuss. Haven't yet had to upgrade gcc. Will see how that works out when a new release arrives.
Very cool. I've been following your other thread on the Linux-Libre kernel. It looks interesting and seems to work pretty well.
Quote:
What I like about your build process is the small, nifty scripts you use to ease building the more mundane parts of LFS.
I take credit for the first, big, script but the remainder are from Max Mann on the lfs-dev list.
However, I used and modified the "build" script that comes with the package users hint on my package builds. It works well.
Quote:
I can only guess (as I don't see it mentioned anywhere) that you are on a 32-bit box. I'd like to know if you've tried this process on a 64-bit system. Following the LFS instructions to build a 64-bit setup doesn't always produce satifactory results.
I have some more details on my build in this thread. But yeah, I'm building 32-bit LFS right now. I did a lot of reading about LFS (years worth, really) before giving it a try and it seems that, other than CLFS, building a reliable 64-bit LFS takes additional work -- at least for now.
More to the point, while my first LFS build was in a QEMU-KVM virtual machine, the one I'm currently working on is on a real computer, a Pentium III, so 32-bit is still the way to go for me.
Quote:
Also, have you gone further and tried BLFS? Would be very interested in knowing if you have, coz writing over 200 build-scripts is a pain, really.
No, no BLFS yet, but that's my intention. I'll let everyone know how it goes.
@Lufbery: That's indeed a nice post about using package management in LFS!
I've been tinkering with (B)LFS for years now and am running BLFS+ as my main OS since version 4.0 (or 4.1, I don't really recall). A package management system is still "missing" on my side, although I'm getting to a point that the ease of a simple pms starts to outweigh the work it takes to do it all by hand.
You've just given me a good reason to start building, again
I just upgraded (still working on some BLFS details) and kept thinking (like many times before): How can one "automate" LFS and, more interesting to me, BLFS.
Automating LFS isn't worth it: It takes one long day to do it by hand. An automated builder is probably somewhat faster, but my version had to be adjusted to all the changes that occur from one (minor) version to the next. All in all it also took a long day to get a working LFS.
As already mentioned by corbis_demon, creating some 200 scripts for BLFS is a lot of work. It might be worth it..... All I need is time, coffee, cigarettes and probably more time
Can you install tar-1.13 along side later versions of tar?
Yeah, I just run "./configure && make" and then stick the resulting binary in /tools/bin. Of course, I rename it to tar-1.13. Isn't that something Slack does as well? In fact I grabbed the tar-1.13 tarball from a Slack mirror.
Quote:
Are you using a BSD-style init too?
I do, actually. As a longtime Slackware user, I'm familiar with them. I found this text quite useful.
I truly commend you for the effort you've put in documenting the whole process, and posting it for the benefit of the LQ community, all the while being so thorough. Many folks seem willing to try out LFS, as the replies to your thread in the Slackware forum demonstrate. Thank you so much for your fine contributions towards making LFS gain a wider user-base.
EDIT: BTW, is there some disadvantage to using eglibc instead of glibc? CLFS uses it, but I can't bring myself to use it, and is the reason I've stayed away from building a 64-bit CLFS system.
Last edited by corbis_demon; 10-21-2010 at 01:48 PM.
Thanks for the feedback and additional information. The cool thing about LFS is that it's both complete (if you follow the directions exactly as in the book, it works perfectly) and flexible (you don't have to follow the directions exactly because there's a bit of leeway built into a source-based distribution).
I view the package users scheme as an enhancement rather than a deviation, but additional documentation and tip-sharing is very helpful to people building LFS with package users. My goal has been to facilitate the documentation and tip-sharing.
Corbis: please keep sharing your experiences; especially the parts where you go off the beaten track.
Druuna: If you're building with package users, please share your experiences and let me know if you experience something different during your build than what we (Max, Bryan, and I) have documented in the build notes posted here.
Hi all,
I eventually gave in and decided to construct a CLFS system (64-bit multilib), but since I didn't want to use Eglibc, I swapped it for Glibc instead, and was mildly surprised that I got not other error than the usual posix/annex failure. I've read that Eglibc is better suited for cross-building purposes, but I have stubbornly resisted.
Have also made a few other changes; am using the 0.11 version of ppl, coz it supports approximations with bounded integers. Also, using both PolyLib and the experimental Integer Set Library backends for cloog. Oh, and using a git pull of cloog instead of the version in the book. For a text editor, I replaced Vim with Joe. I'm also using those programs from LFS which are not included in the CLFS book. Compiled a patched Linux-libre 2.6.36 kernel, with Con Kolivas' patch (BFS instead of CFS), an updated TuxOnIce patch for the new kernel, the IMQ (multi-queue) patch, the BFQ I/O scheduler from Paolo Valente and a couple of security fixes. Still waiting for updates from Edward Shiskin for the reiser4 patch.
Another interesting bit has been writing the build script for PPL. I could never figure out how it happened, but turns out the script ran in an infinite loop. I executed it and left for my workplace, and when I returned it was still running, well over 9 hours! I saw that it had already created the package, but kept going on (PPL takes a long time to build anyhow). So I wrote the script again and this time it worked. Still have the errant script, and have been trying to find the bug in it, but couldn't find any.
The rest of the book compiled fine enough. Will update when I start building the BLFS packages (will use the package users method suggested by Lufbery).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.