[clue-tech] Linux from scratch

dennisjperkins at comcast.net dennisjperkins at comcast.net
Fri Oct 15 11:48:04 MDT 2010


I haven't used Buildroot and I did not know that Crosstools-NG was available. I should look into these. 

Most people just want to use the system, but I think that the information should be available for anyone who wants to do it themselves. The more widely disseminated, the better. 

----- Original Message ----- 
From: "Michael J. Hammel" <mjhammel at graphics-muse.org> 
To: "CLUE technical discussion" <clue-tech at cluedenver.org> 
Sent: Friday, October 15, 2010 10:36:44 AM 
Subject: Re: [clue-tech] Linux from scratch 

On Fri, 2010-10-15 at 09:13 -0700, mike havlicek wrote: 
> Anyway, what was the proposition? So is Linux from scratch a cookbook 
> project? 

The official LFS is a cookbook, yes. There is also a cookbook for doing 
a cross-compiled LFS, known as CLFS. The goal is to bring up a system 
with the basic utilities. Variations on LFS add additional, usually 
slightly more complicated, tools. You don't have to use "make" to 
create your LFS system but most of the recipes reference "make" because 
the source being compiled by the recipe requires it. So it kind of 
makes sense to create a build system for LFS based on "make" (the 
bitbake people would argue this point, of course :-) 

Building a "distribution" requires creating an install environment 
(kernel and root filesystem) that then installs packages into a chroot'd 
directory tree so that when the install finishes and the installed stuff 
boots every file is known to the package management system. Well, 
that's it in a nutshell but it may be a bit more than that. 

Interestingly, most of the LFS stuff is easy to do now with tools like 
Buildroot. When you build from scratch you are building a compiler 
toolchain (a set of tools used to build everything else for your target 
hardware), a kernel, a root filesystem and then any additional 
components to add to the root filesystem. Buildroot can do all of this 
though I typically do the toolchain and kernel separately and use 
Buildroot just for the root filesystem. 

If you do cross compiling you can first use tools like Crosstools-NG to 
get the compiler toolchain and then use Buildroot to build everything 
else. This is roughly how my build system for BeagleBox works. 

The reasons for learning these tools become obvious if you start working 
with small embedded devices. And don't let "embedded" scare you off. 
BeagleBoard, for example, is just a small device very similar to any PC 
motherboard that boots (at least by default) from an SD card formatted 
with the kernel and a root filesystem that is a compressed tar file 
(which Buildroot can create for you). Not particularly complex. But 
fun to play with. 
-- 
Michael J. Hammel Principal Software Engineer 
mjhammel at graphics-muse.org http://graphics-muse.org 
------------------------------------------------------------------------------ 
Osteopornosis: A degenerate disease. 

_______________________________________________ 
clue-tech mailing list 
clue-tech at cluedenver.org 
http://cluedenver.org/mailman/listinfo/clue-tech 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue-tech/attachments/20101015/9d5a8c5f/attachment-0001.html 


More information about the clue-tech mailing list