- Joined
- Jan 24, 2006
- Location
- South Dakota
I thought I should put some of this down in case anyone wishes to follow in the LFS foot steps.
My system Core I7 860
6 gigs of ddr 3
Nvidia GTX 260
2 gigabit nics (intel and realtek)
Base system Ubuntu 10.10 32 bit-pae
Virtualbox 3.2.10
LFS livecd as the initial "host"
My initial motivation for this is purely education as with most people I don't plan on using this for a day-to-day system and thus I put it in a VM so that I could follow along with the instructions on one screen and the VM in another.
Initial thoughts:
I first thought that I would be able to cut and paste between the VM and the browser to make things easier. No such luck, this is in part because I was running off a livecd which means that guest-addons (which usually requires a reboot) would not stick; and also partly because the livecd is very old (2007ish)
You need a lot of source files and for those who are following with a basic livecd like myself I wrote a couple of quick wget scripts to get the correct files
and for the patches
Most things were going along smoothly, although at one point my livecd froze for some reason and I had a slight panic attack ... all of that downloading etc gone... well not really because I had already mounted a partition and started to work on it. The only thing that need to be reset were the environmental variables.
speaking of environment variables i decided to change up my color scheme and layout of the terminal.
See here for instructions on how to do this
On that note, the book suggests setting the MAKEFLAGS variable. I found this to not actually work on my system and doing a
was much faster
I bumped into another little stumbling block trying to compile gcc. I kept getting gmp.h errors and some other related things
It took me a little while to sort out that the instructions meant for you to do the following
untar gcc, then cd into the gcc directory. Then inside of the gcc directory extract the mpfr mpc and gmp tarballs.
Essentially dumping all the needed files into one big directory instead of compiling things seperately or what-have you.
After following the book to what I thought was "the letter" I ran into a problem with building binutils the second pass. I kept getting
Make ** [all] Errors 2
After beating on my head a bit (and googling around to no avail) I decided to blow away my binutils directors and untar from the beginning. For some reason this time it worked (i did not retype the commands I used the history).
Lesson learned: if it doesnt compile the first time, delete the folder and start again before seeking further help it may save a lot of time
When I got to 5.10 gcc, I found that I was able to understand the code better when I changed this
to this
Its probably just me and the way I got used to working in bash, but this just made more sense to me and it also helped me find a typoo i had made.
So far I believe I have put about 5-7 hours into this project and a good portion of my time has been hunting down small typoos. What I have found helpful is that in each *-build there are subdirectories created for each component required in that particular build. EX gcc uses mpfr, gmp and mpc. so there are gmp/config.log etc. This helped me find a hyphon " - " which should have been an underscore " _ "
My system Core I7 860
6 gigs of ddr 3
Nvidia GTX 260
2 gigabit nics (intel and realtek)
Base system Ubuntu 10.10 32 bit-pae
Virtualbox 3.2.10
LFS livecd as the initial "host"
My initial motivation for this is purely education as with most people I don't plan on using this for a day-to-day system and thus I put it in a VM so that I could follow along with the instructions on one screen and the VM in another.
Initial thoughts:
I first thought that I would be able to cut and paste between the VM and the browser to make things easier. No such luck, this is in part because I was running off a livecd which means that guest-addons (which usually requires a reboot) would not stick; and also partly because the livecd is very old (2007ish)
You need a lot of source files and for those who are following with a basic livecd like myself I wrote a couple of quick wget scripts to get the correct files
Code:
#!/bin/bash
wget http://people.redhat.com/eblake/autoconf/autoconf-2.67.tar.bz2
wget http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.bz2
wget http://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz
wget http://ftp.gnu.org/gnu/binutils/binutils-2.20.1.tar.bz2
wget http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.bz2
wget http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz
wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.5.tar.gz
wget http://ftp.gnu.org/gnu/dejagnu/dejagnu-1.4.4.tar.gz
wget http://ftp.gnu.org/gnu/diffutils/diffutils-3.0.tar.gz
wget http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.12.tar.gz
wget http://prdownloads.sourceforge.net/expect/expect-5.44.1.15.tar.bz2
wget ftp://ftp.astron.com/pub/file/file-5.04.tar.gz
wget http://ftp.gnu.org/gnu/findutils/findutils-4.4.2.tar.gz
wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2
wget http://ftp.gnu.org/gnu/gawk/gawk-3.1.8.tar.bz2
wget http://ftp.gnu.org/gnu/gcc/gcc-4.5.1/gcc-4.5.1.tar.bz2
wget http://ftp.gnu.org/gnu/gdbm/gdbm-1.8.3.tar.gz
wget http://ftp.gnu.org/gnu/gettext/gettext-0.18.1.1.tar.gz
wget http://ftp.gnu.org/gnu/glibc/glibc-2.12.1.tar.bz2
wget http://ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.bz2
wget http://ftp.gnu.org/gnu/grep/grep-2.6.3.tar.gz
wget http://ftp.gnu.org/gnu/groff/groff-1.20.1.tar.gz
wget ftp://alpha.gnu.org/gnu/grub/grub-1.98.tar.gz
wget http://ftp.gnu.org/gnu/gzip/gzip-1.4.tar.gz
wget http://sethwklein.net/iana-etc-2.30.tar.bz2
wget http://ftp.gnu.org/gnu/inetutils/inetutils-1.8.tar.gz
wget http://devresources.linuxfoundation.org/dev/iproute2/download/iproute2-2.6.35.tar.bz2
wget http://ftp.altlinux.com/pub/people/legion/kbd/kbd-1.15.2.tar.gz
wget http://www.greenwoodsoftware.com/less/less-436.tar.gz
wget http://www.linuxfromscratch.org/lfs/downloads/6.7/lfs-bootscripts-20100627.tar.bz2
wget http://ftp.gnu.org/gnu/libtool/libtool-2.2.10.tar.gz
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.4.tar.bz2
wget http://ftp.gnu.org/gnu/m4/m4-1.4.14.tar.bz2
wget http://ftp.gnu.org/gnu/make/make-3.82.tar.bz2
wget http://download.savannah.gnu.org/releases/man-db/man-db-2.5.7.tar.gz
wget http://www.kernel.org/pub/linux/docs/manpages/Archive/man-pages-3.25.tar.bz2
wget http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-3.12.tar.bz2
wget http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz
wget http://www.mpfr.org/mpfr-3.0.0/mpfr-3.0.0.tar.bz2
wget ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.7.tar.gz
wget http://ftp.gnu.org/gnu/patch/patch-2.6.1.tar.bz2
wget http://cpan.org/src/5.0/perl-5.12.1.tar.bz2
wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz
wget http://procps.sourceforge.net/procps-3.2.8.tar.gz
wget http://prdownloads.sourceforge.net/psmisc/psmisc-22.12.tar.gz
wget http://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz
wget http://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.bz2
wget ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-4.1.4.2.tar.bz2
wget http://www.infodrom.org/projects/sysklogd/download/sysklogd-1.5.tar.gz
wget http://ftp.twaren.net/Unix/NonGNU/sysvinit/sysvinit-2.88dsf.tar.bz2
wget http://ftp.gnu.org/gnu/tar/tar-1.23.tar.bz2
wget http://prdownloads.sourceforge.net/tcl/tcl8.5.8-src.tar.gz
wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13a.tar.gz
wget http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-161.tar.bz2
wget http://anduin.linuxfromscratch.org/sources/other/udev-161-testfiles.tar.bz2
wget http://www.linuxfromscratch.org/lfs/downloads/6.7/udev-config-20100128.tar.bz2
wget http://www.kernel.org/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-2.18.tar.bz2
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
wget http://www.zlib.net/zlib-1.2.5.tar.bz2
and for the patches
Code:
#!/bin/bash
wget http://www.linuxfromscratch.org/patches/lfs/6.7/bash-4.1-fixes-2.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/bzip2-1.0.5-install_docs-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/bzip2-1.0.5-version_fixes-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/coreutils-8.5-i18n-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/coreutils-8.5-uname-2.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/dejagnu-1.4.4-consolidated-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/expect-5.44.1.15-no_tk-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/flex-2.5.35-gcc44-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/gcc-4.5.1-startfiles_fix-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/glibc-2.12.1-gcc_fix-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/glibc-2.12.1-makefile_fix-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/kbd-1.15.2-backspace-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/man-db-2.5.7-fix_man_assertion-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/patch-2.6.1-test_fix-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/perl-5.12.1-libc-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/procps-3.2.8-watch_unicode-1.patch
wget http://www.linuxfromscratch.org/patches/lfs/6.7/tar-1.23-overflow_fix-1.patch
Most things were going along smoothly, although at one point my livecd froze for some reason and I had a slight panic attack ... all of that downloading etc gone... well not really because I had already mounted a partition and started to work on it. The only thing that need to be reset were the environmental variables.
speaking of environment variables i decided to change up my color scheme and layout of the terminal.
See here for instructions on how to do this
On that note, the book suggests setting the MAKEFLAGS variable. I found this to not actually work on my system and doing a
Code:
make -j 6
I bumped into another little stumbling block trying to compile gcc. I kept getting gmp.h errors and some other related things
It took me a little while to sort out that the instructions meant for you to do the following
untar gcc, then cd into the gcc directory. Then inside of the gcc directory extract the mpfr mpc and gmp tarballs.
Essentially dumping all the needed files into one big directory instead of compiling things seperately or what-have you.
After following the book to what I thought was "the letter" I ran into a problem with building binutils the second pass. I kept getting
Make ** [all] Errors 2
After beating on my head a bit (and googling around to no avail) I decided to blow away my binutils directors and untar from the beginning. For some reason this time it worked (i did not retype the commands I used the history).
Lesson learned: if it doesnt compile the first time, delete the folder and start again before seeking further help it may save a lot of time
When I got to 5.10 gcc, I found that I was able to understand the code better when I changed this
Code:
for file in \
$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
to this
Code:
for file in `find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h`
Its probably just me and the way I got used to working in bash, but this just made more sense to me and it also helped me find a typoo i had made.
So far I believe I have put about 5-7 hours into this project and a good portion of my time has been hunting down small typoos. What I have found helpful is that in each *-build there are subdirectories created for each component required in that particular build. EX gcc uses mpfr, gmp and mpc. so there are gmp/config.log etc. This helped me find a hyphon " - " which should have been an underscore " _ "
Last edited: