To build LFS, which basically means building your whole Linux-based operating system from source code. There’s 2 ways at least, which involves using the LFS LiveCD itself as the host to compile kernel, utilities and other modules, you can use another Linux-based host to do that. In my project, I’m using Fedora 13, and I’m running it in a virtualized environment on top of Windows XP SP3. Before any compilation starts, it’s good to verify that any system requirements that the host OS must possess. A good way to look at it is double checking ur host OS specs with this web page.
First thing, fire up ur Fedora 13.
From the page, they provide you a bash script to dump all the versions and checking on the availability of a particular module. *the rights of the script belongs to LFS (http://www.linuxfromscratch.org)
cat > version-check.sh << "EOF"#!/bin/bashexport LC_ALL=C
# Simple script to list version numbers of critical development tools
bash --version | head -n1 | cut -d" " -f2-4echo "/bin/sh -> `readlink -f /bin/sh`"echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-bison --version | head -n1if [ -e /usr/bin/yacc ]; then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`"; else echo "yacc not found"; fibzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2diff --version | head -n1find --version | head -n1gawk --version | head -n1if [ -e /usr/bin/awk ]; then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`"; else echo "awk not found"; figcc --version | head -n1/lib/libc.so.6 | head -n1 | cut -d"," -f1grep --version | head -n1gzip --version | head -n1cat /proc/versionm4 --version | head -n1make --version | head -n1patch --version | head -n1echo Perl `perl -V:version`sed --version | head -n1tar --version | head -n1echo "Texinfo: `makeinfo --version | head -n1`"echo 'main(){}' > dummy.c && gcc -o dummy dummy.cif [ -x dummy ]; then echo "Compilation OK"; else echo "Compilation failed"; firm -f dummy.c dummy
EOF
bash version-check.sh
Once the script is done, and you’ve issued the last line of the command, you will get the result of ur version checking.
Obviously, the Fedora 13 lacks pretty much modules as a default installation. In fact, I’ve output all the result to a text file called result.txt, which I’ve used vim to open it up to compare on the version.
Below is the compilation of the result, and any actions I need to make sure the host environment is capable to compile LFS.
All modules that are available is either has higher versioning or comparatively same. But, a few modules is not installed.
First thing i installed was the bison, which is a GNU general-parser generator, especially useful for C development, which we need for LFS compilation.
I was using the Add/Remove Software for the installation by searching it and apply the package to my OS. I continue all this for other packages, and all manage to get the required versions easily, except gcc which has version 4.4.4 only.
Besides, to install gcc, you will be asked for more packages to be installed, as shown in the screen capture.
After all the hassle
, i’ve rerun the shell script again, and this time no missing modules. Except, the gcc library is in version 4.4.4 instead of 4.4.3 as requested. Let’s try it out and see what happens.











