Saturday, 4 September 2010

LAP - All in One - Actual Build

OK, now on with the actual build. First you need to create the file system to work in. This involves entering and exiting chroots, and restarting the shell, all of which break simple scripts like mine. So do all of the starting stuff by pasting the first chunk of text into the terminal:

sudo mkdir -v /media/lfs/{dev,proc,sys}
sudo mknod -m 600 /media/lfs/dev/console c 5 1
sudo mknod -m 666 /media/lfs/dev/null c 1 3
sudo mount -v --bind /dev /media/lfs/dev
sudo mount -vt devpts devpts /media/lfs/dev/pts
sudo mount -vt tmpfs shm /media/lfs/dev/shm
sudo mount -vt proc proc /media/lfs/proc
sudo mount -vt sysfs sysfs /media/lfs/sys
sudo chroot "/media/lfs" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin CORES_TO_USE=-j4 /tools/bin/bash --login +h
mkdir -pv /{bin,boot,etc/opt,home,lib,mnt,opt}
mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
install -dv -m 0750 /root
install -dv -m 1777 /tmp /var/tmp
mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
mkdir -v  /usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir -pv /usr/{,local/}share/man/man{1..8}
for dir in /usr /usr/local; do
  ln -sv share/{man,doc,info} $dir
done
case $(uname -m) in
 x86_64) ln -sv lib /lib64 && ln -sv lib /usr/lib64 ;;
esac
mkdir -v /var/{lock,log,mail,run,spool}
mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
ln -sv /tools/bin/{bash,cat,echo,pwd,stty} /bin
ln -sv /tools/bin/perl /usr/bin
ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
ln -sv /tools/lib/libstdc++.so{,.6} /usr/lib
ln -sv bash /bin/sh
touch /etc/mtab
cat > /etc/passwd << "EOF"
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/dev/null:/bin/false
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
EOF
cat > /etc/group << "EOF"
root:x:0:
bin:x:1:
sys:x:2:
kmem:x:3:
tty:x:4:
tape:x:5:
daemon:x:6:
floppy:x:7:
disk:x:8:
lp:x:9:
dialout:x:10:
audio:x:11:
video:x:12:
utmp:x:13:
usb:x:14:
cdrom:x:15:
mail:x:34:
nogroup:x:99:
EOF
exec /tools/bin/bash --login +h
touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chgrp -v utmp /var/run/utmp /var/log/lastlog
chmod -v 664 /var/run/utmp /var/log/lastlog
exit
sudo mount -v --bind /tmp /media/lfs/tmp
sudo chroot "/media/lfs" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin CORES_TO_USE=-j4 /tools/bin/bash --login +h
Next, paste this text into gedit and save it as a script. Make it executable and move it to the root of the Amiga Key to run it.
cd /tmp
tar -xjvf /sources/linux-2.6.32.8.tar.bz2
cd linux-2.6.32.8
make mrproper
make headers_check
make INSTALL_HDR_PATH=dest headers_install
find dest/include \( -name .install -o -name ..install.cmd \) -delete
cp -rv dest/include/* /usr/include
cd ..
rm -rvf linux-2.6.32.8
tar -xjvf /sources/man-pages-3.23.tar.bz2
cd man-pages-3.23
make install
cd ..
rm -rvf man-pages-3.23
tar -xjvf /sources/glibc-2.11.1.tar.bz2
cd glibc-2.11.1
DL=$(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$DL -o|" scripts/test-installation.pl
unset DL
sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
mkdir -v ../glibc-build
cd ../glibc-build
case `uname -m` in
  i?86) echo "CFLAGS += -march=i486 -mtune=native -O3 -pipe" > configparms ;;
esac
../glibc-2.11.1/configure --prefix=/usr --disable-profile --enable-add-ons --enable-kernel=2.6.18 --libexecdir=/usr/lib/glibc
make $CORES_TO_USE
cp -v ../glibc-2.11.1/iconvdata/gconv-modules iconvdata
touch /etc/ld.so.conf
make install
mkdir -pv /usr/lib/locale
localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
localedef -i de_DE -f ISO-8859-1 de_DE
localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
localedef -i de_DE -f UTF-8 de_DE.UTF-8
localedef -i en_HK -f ISO-8859-1 en_HK
localedef -i en_PH -f ISO-8859-1 en_PH
localedef -i en_US -f ISO-8859-1 en_US
localedef -i en_US -f UTF-8 en_US.UTF-8
localedef -i es_MX -f ISO-8859-1 es_MX
localedef -i fa_IR -f UTF-8 fa_IR
localedef -i fr_FR -f ISO-8859-1 fr_FR
localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
localedef -i it_IT -f ISO-8859-1 it_IT
localedef -i ja_JP -f EUC-JP ja_JP
localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
localedef -i zh_CN -f GB18030 zh_CN.GB18030
localedef -i en_GB -f UTF-8 en_GB.utf8
localedef -i en_GB -f ISO-8859-1 en_GB
cat > /etc/nsswitch.conf << "EOF"
# Begin /etc/nsswitch.conf

passwd: files
group: files
shadow: files

hosts: files dns
networks: files

protocols: files
services: files
ethers: files
rpc: files

# End /etc/nsswitch.conf
EOF
cp -v --remove-destination /usr/share/zoneinfo/Europe/London /etc/localtime
cat > /etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf

/usr/local/lib
/opt/lib

# End /etc/ld.so.conf
EOF
cd ..
rm -rvf glibc-2.11.1  glibc-build
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
gcc -dumpspecs | sed -e 's@/tools@@g' -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > `dirname $(gcc --print-libgcc-file-name)`/specs
tar -xjvf /sources/zlib-1.2.3.tar.bz2
cd zlib-1.2.3
./configure --prefix=/usr --shared --libdir=/lib
make $CORES_TO_USE
make install
rm -v /lib/libz.so
ln -sfv ../../lib/libz.so.1.2.3 /usr/lib/libz.so
make clean
./configure --prefix=/usr
make $CORES_TO_USE
make install
chmod -v 644 /usr/lib/libz.a
cd ..
rm -rvf zlib-1.2.3
tar -jxvf /sources/binutils-2.20.tar.bz2
cd binutils-2.20
expect -c "spawn ls"
rm -fv etc/standards.info
sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in
mkdir -v ../binutils-build
cd ../binutils-build
../binutils-2.20/configure --prefix=/usr --enable-shared
make $CORES_TO_USE tooldir=/usr
make tooldir=/usr install
cp -v ../binutils-2.20/include/libiberty.h /usr/include
cd ..
rm -rvf binutils-2.20 binutils-build
tar -xjvf /sources/gmp-5.0.0.tar.bz2
cd gmp-5.0.0
./configure --prefix=/usr --enable-cxx --enable-mpbsd
make $CORES_TO_USE
make install
mkdir -v /usr/share/doc/gmp-5.0.0
cp    -v doc/{isa_abi_headache,configuration} doc/*.html /usr/share/doc/gmp-5.0.0
cd ..
rm -rvf  gmp-5.0.0
tar -xjvf /sources/mpfr-2.4.2.tar.bz2
cd mpfr-2.4.2
./configure --prefix=/usr --enable-thread-safe
make $CORES_TO_USE
make install
make html
mkdir -pv /usr/share/doc/mpfr-2.4.2
find . -name \*.html -type f -exec cp -v \{} /usr/share/doc/mpfr-2.4.2 \;
cd ..
rm -rvf mpfr-2.4.2
tar -xzvf /sources/file-5.04.tar.gz
cd file-5.04
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf file-5.04
tar -xjvf /sources/gcc-4.4.3.tar.bz2
cd gcc-4.4.3
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
case `uname -m` in
  i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
esac
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
sed -i 's/getline/get_line/' libiberty/testsuite/test-demangle.c
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.4.3/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --disable-bootstrap
make $CORES_TO_USE
make install
ln -sv ../usr/bin/cpp /lib
ln -sv gcc /usr/bin/cc
cd ..
rm -rvf gcc-4.4.3 gcc-build
tar -xjvf /sources/sed-4.2.1.tar.bz2 
cd sed-4.2.1
./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/sed-4.2.1
make $CORES_TO_USE
make html
make install
make -C doc install-html
cd ..
rm -rvf sed-4.2.1
tar -xzvf /sources/pkg-config-0.23.tar.gz
cd pkg-config-0.23
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf pkg-config-0.23
tar -xzvf /sources/ncurses-5.7.tar.gz 
cd ncurses-5.7
./configure --prefix=/usr --with-shared --without-debug --enable-widec
make $CORES_TO_USE
make install
mv -v /usr/lib/libncursesw.so.5* /lib
ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so
for lib in ncurses form panel menu ; do rm -vf /usr/lib/lib${lib}.so ; echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; done
ln -sfv libncurses++w.a /usr/lib/libncurses++.a
rm -vf /usr/lib/libcursesw.so
echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so
ln -sfv libncurses.so /usr/lib/libcurses.so
ln -sfv libncursesw.a /usr/lib/libcursesw.a
ln -sfv libncurses.a /usr/lib/libcurses.a
mkdir -v       /usr/share/doc/ncurses-5.7
cp -v -R doc/* /usr/share/doc/ncurses-5.7
make distclean
./configure --prefix=/usr --with-shared --without-normal --without-debug --without-cxx-binding
make $CORES_TO_USE sources libs
cp -av lib/lib*.so.5* /usr/lib
cd ..
rm -rvf ncurses-5.7
tar -xjvf /sources/util-linux-ng-2.17.tar.bz2
cd util-linux-ng-2.17
sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' -i $(grep -rl '/etc/adjtime' .)
mkdir -pv /var/lib/hwclock
./configure --enable-arch --enable-partx --enable-write
make $CORES_TO_USE
make install
cd ..
rm -rvf util-linux-ng-2.17
tar -xzvf /sources/e2fsprogs-1.41.10.tar.gz
cd e2fsprogs-1.41.10
mkdir -v build
cd build
../configure --prefix=/usr --with-root-prefix="" --enable-elf-shlibs --disable-libblkid --disable-libuuid --disable-uuidd --disable-fsck
make $CORES_TO_USE
make install
make install-libs
chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
gunzip -v /usr/share/info/libext2fs.info.gz
install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info
makeinfo -o      doc/com_err.info ../lib/et/com_err.texinfo
install -v -m644 doc/com_err.info /usr/share/info
install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info
cd ../../
rm -rvf e2fsprogs-1.41.10
tar -xzvf /sources/coreutils-8.4.tar.gz
cd coreutils-8.4
case `uname -m` in
 i?86 | x86_64) patch -Np1 -i /sources/coreutils-8.4-uname-1.patch ;;
esac
patch -Np1 -i /sources/coreutils-8.4-i18n-1.patch
./configure --prefix=/usr --enable-no-install-program=kill,uptime
make $CORES_TO_USE
make install
mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
mv -v /usr/bin/chroot /usr/sbin
mv -v /usr/bin/{head,sleep,nice} /bin
cd ..
rm -rvf coreutils-8.4
tar -xjvf /sources/iana-etc-2.30.tar.bz2
cd iana-etc-2.30
make $CORES_TO_USE
make install
cd ..
rm -rvf iana-etc-2.30
tar -xjvf /sources/m4-1.4.13.tar.bz2
cd m4-1.4.13
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf m4-1.4.13
tar -xjvf /sources/bison-2.4.1.tar.bz2
cd bison-2.4.1
./configure --prefix=/usr
echo '#define YYENABLE_NLS 1' >> lib/config.h
make $CORES_TO_USE
make install
cd ..
rm -rvf bison-2.4.1
tar -xzvf /sources/procps-3.2.8.tar.gz
cd procps-3.2.8
patch -Np1 -i /sources/procps-3.2.8-watch_unicode-1.patch
make $CORES_TO_USE
make install
cd ..
rm -rvf procps-3.2.8
tar -xjvf /sources/grep-2.5.4.tar.bz2
cd grep-2.5.4
patch -Np1 -i /sources/grep-2.5.4-debian_fixes-1.patch
./configure --prefix=/usr --bindir=/bin --without-included-regex 
make $CORES_TO_USE
make install
cd ..
rm -rvf grep-2.5.4
tar -xzvf /sources/readline-6.1.tar.gz
cd readline-6.1
sed -i '/MV.*old/d' Makefile.in 
sed -i '/{OLDSUFF}/c:' support/shlib-install 
sed -i -e 's/0x0600/0x0601/' -e 's/6\.0/6.1/' -e 's/RL_VERSION_MINOR\t0/RL_VERSION_MINOR\t1/' readline.h 
./configure --prefix=/usr --libdir=/lib
make $CORES_TO_USE SHLIB_LIBS=-lncurses
make install
mv -v /lib/lib{readline,history}.a /usr/lib
rm -v /lib/lib{readline,history}.so
ln -sfv ../../lib/libreadline.so.6 /usr/lib/libreadline.so
ln -sfv ../../lib/libhistory.so.6 /usr/lib/libhistory.so
mkdir   -v       /usr/share/doc/readline-6.1 
install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-6.1 
cd ..
rm -rvf readline-6.1
tar -xzvf /sources/bash-4.1.tar.gz
cd bash-4.1
./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/bash-4.1 --without-bash-malloc --with-installed-readline
make $CORES_TO_USE
make install
cd ..
rm -rvf bash-4.1
tar -xzvf /sources/libtool-2.2.6b.tar.gz
cd libtool-2.2.6b
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf libtool-2.2.6b
tar -xzvf /sources/gdbm-1.8.3.tar.gz
cd gdbm-1.8.3
./configure --prefix=/usr
make $CORES_TO_USE
make install
make install-compat
install-info --dir-file=/usr/info/dir /usr/info/gdbm.info
cd ..
rm -rvf gdbm-1.8.3
tar -xzvf /sources/inetutils-1.7.tar.gz
cd inetutils-1.7
./configure --prefix=/usr --libexecdir=/usr/sbin --localstatedir=/var --disable-ifconfig --disable-logger --disable-syslogd --disable-whois --disable-servers
make $CORES_TO_USE
make install
mv -v /usr/bin/{hostname,ping,ping6} /bin 
mv -v /usr/bin/traceroute /sbin 
cd ..
rm -rvf inetutils-1.7
tar -xjvf /sources/perl-5.10.1.tar.bz2
cd perl-5.10.1
echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
patch -Np1 -i /sources/perl-5.10.1-utf8-1.patch
sed -i -e "s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|" -e "s|INCLUDE\s*= ./zlib-src|INCLUDE = /usr/include|" -e "s|LIB\s*= ./zlib-src|LIB = /usr/lib|" ext/Compress-Raw-Zlib/config.in
sh Configure -des -Dprefix=/usr -Dvendorprefix=/usr -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dpager="/usr/bin/less -isR"
make $CORES_TO_USE
make install
cd ..
rm -rvf perl-5.10.1
tar -xjvf /sources/autoconf-2.65.tar.bz2
cd autoconf-2.65
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf autoconf-2.65
tar -xjvf /sources/automake-1.11.1.tar.bz2
cd automake-1.11.1
./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.11.1
make $CORES_TO_USE
make install
cd ..
rm -rvf automake-1.11.1
tar -xzvf /sources/bzip2-1.0.5.tar.gz
cd bzip2-1.0.5
patch -Np1 -i /sources/bzip2-1.0.5-install_docs-1.patch
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
make -f Makefile-libbz2_so
make clean
make $CORES_TO_USE
make PREFIX=/usr install
cp -v bzip2-shared /bin/bzip2 
cp -av libbz2.so* /lib 
ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so 
rm -v /usr/bin/{bunzip2,bzcat,bzip2} 
ln -sv bzip2 /bin/bunzip2 
ln -sv bzip2 /bin/bzcat 
cd ..
rm -rvf bzip2-1.0.5
tar -xzvf /sources/diffutils-2.8.1.tar.gz
cd diffutils-2.8.1
patch -Np1 -i /sources/diffutils-2.8.1-i18n-1.patch
touch man/diff.1
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf diffutils-2.8.1
tar -xjvf /sources/gawk-3.1.7.tar.bz2
cd gawk-3.1.7
./configure --prefix=/usr --libexecdir=/usr/lib
make $CORES_TO_USE
make install
mkdir -v /usr/share/doc/gawk-3.1.7 
cp    -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-3.1.7 
cd ..
rm -rvf gawk-3.1.7
tar -xzvf /sources/findutils-4.4.2.tar.gz
cd findutils-4.4.2
./configure --prefix=/usr --libexecdir=/usr/lib/findutils --localstatedir=/var/lib/locate
make $CORES_TO_USE
make install
mv -v /usr/bin/find /bin 
sed -i 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb
cd ..
rm -rvf findutils-4.4.2
tar -xjvf /sources/flex-2.5.35.tar.bz2
cd flex-2.5.35
patch -Np1 -i /sources/flex-2.5.35-gcc44-1.patch
./configure --prefix=/usr
make $CORES_TO_USE
make install
ln -sv libfl.a /usr/lib/libl.a
cat > /usr/bin/lex << "EOF" 
#!/bin/sh
# Begin /usr/bin/lex
exec /usr/bin/flex -l "$@"
# End /usr/bin/lex
EOF
chmod -v 755 /usr/bin/lex
mkdir -v /usr/share/doc/flex-2.5.35
cp    -v doc/flex.pdf /usr/share/doc/flex-2.5.35 
cd ..
rm -rvf flex-2.5.35
tar -xzvf /sources/gettext-0.17.tar.gz
cd gettext-0.17
patch -Np1 -i /sources/gettext-0.17-upstream_fixes-2.patch
./configure --prefix=/usr --docdir=/usr/share/doc/gettext-0.17 
make $CORES_TO_USE
make install
cd ..
rm -rvf gettext-0.17
tar -xzvf /sources/groff-1.20.1.tar.gz
cd groff-1.20.1
PAGE=A4 ./configure --prefix=/usr
make $CORES_TO_USE
make docdir=/usr/share/doc/groff-1.20.1 install
ln -sv eqn /usr/bin/geqn 
ln -sv tbl /usr/bin/gtbl 
cd ..
rm -rvf groff-1.20.1
tar -xzvf /sources/gzip-1.4.tar.gz
cd gzip-1.4
./configure --prefix=/usr --bindir=/bin
make $CORES_TO_USE
make install
mv -v /bin/{gzexe,uncompress,zcmp,zdiff,zegrep} /usr/bin
mv -v /bin/{zfgrep,zforce,zgrep,zless,zmore,znew} /usr/bin
cd ..
rm -rvf gzip-1.4
tar -xjvf /sources/iproute2-2.6.31.tar.bz2
cd iproute2-2.6.31
sed -i '/^TARGETS/s@arpd@@g' misc/Makefile
make $CORES_TO_USE DESTDIR=
make $CORES_TO_USE DESTDIR= SBINDIR=/sbin MANDIR=/usr/share/man DOCDIR=/usr/share/doc/iproute2-2.6.31 install
cd ..
rm -rvf iproute2-2.6.31
tar -xzvf /sources/kbd-1.15.1.tar.gz
cd kbd-1.15.1
autoreconf
patch -Np1 -i /sources/kbd-1.15.1-backspace-1.patch
./configure --prefix=/usr --datadir=/lib/kbd
make $CORES_TO_USE
make install
mv -v /usr/bin/{kbd_mode,loadkeys,openvt,setfont} /bin
mkdir -v /usr/share/doc/kbd-1.15.1
cp -R -v doc/* /usr/share/doc/kbd-1.15.1 
cd ..
rm -rvf kbd-1.15.1
tar -xzvf /sources/less-436.tar.gz
cd less-436
./configure --prefix=/usr --sysconfdir=/etc
make $CORES_TO_USE
make install
cd ..
rm -rvf less-436
tar -xjvf /sources/make-3.81.tar.bz2
cd make-3.81
patch -Np1 -i /sources/make-3.81-upstream_fixes-1.patch
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf make-3.81
tar -xzvf /sources/man-db-2.5.6.tar.gz
cd man-db-2.5.6
./configure --prefix=/usr --libexecdir=/usr/lib --sysconfdir=/etc --disable-setuid --with-browser=/usr/bin/lynx --with-vgrind=/usr/bin/vgrind --with-grap=/usr/bin/grap
make $CORES_TO_USE
make install
cd ..
rm -rvf man-db-2.5.6
tar -xjvf /sources/module-init-tools-3.11.1.tar.bz2
cd module-init-tools-3.11.1
./configure
make check
./tests/runtests
make clean 
./configure --prefix=/ --enable-zlib-dynamic --mandir=/usr/share/man
make $CORES_TO_USE
make INSTALL=install install
cd ..
rm -rvf module-init-tools-3.11.1
tar -xjvf /sources/patch-2.6.1.tar.bz2
cd patch-2.6.1
patch -Np1 -i /sources/patch-2.6.1-test_fix-1.patch
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf patch-2.6.1
tar -xzvf /sources/psmisc-22.10.tar.gz
cd psmisc-22.10
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf psmisc-22.10
tar -xjvf /sources/shadow-4.1.4.2.tar.bz2
cd shadow-4.1.4.2
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
sed -i -e 's/ ko//' -e 's/ zh_CN zh_TW//' man/Makefile.in
sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD MD5@' -e 's@/var/spool/mail@/var/mail@' etc/login.defs
./configure --sysconfdir=/etc
make $CORES_TO_USE
make install
mv -v /usr/bin/passwd /bin
pwconv
grpconv
sed -i 's/yes/no/' /etc/default/useradd
cd ..
rm -rvf shadow-4.1.4.2
tar -xzvf /sources/sysklogd-1.5.tar.gz
cd sysklogd-1.5
make $CORES_TO_USE
make BINDIR=/sbin install
cat > /etc/syslog.conf << "EOF"
# Begin /etc/syslog.conf
auth,authpriv.* -/var/log/auth.log
*.*;auth,authpriv.none -/var/log/sys.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
*.emerg *
# End /etc/syslog.conf
EOF
cd ..
rm -rvf sysklogd-1.5
tar -xzvf /sources/sysvinit-2.86.tar.gz
cd sysvinit-2.86
sed -i 's@Sending processes@& configured via /etc/inittab@g' src/init.c
sed -i -e 's/utmpdump wall/utmpdump/' -e 's/mountpoint.1 wall.1/mountpoint.1/' src/Makefile
make $CORES_TO_USE -C src
make -C src install
cat > /etc/inittab << "EOF"
# Begin /etc/inittab
id:3:initdefault:
si::sysinit:/etc/rc.d/init.d/rc sysinit
l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
su:S016:once:/sbin/sulogin
1:2345:respawn:/sbin/agetty tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
5:2345:respawn:/sbin/agetty tty5 9600
6:2345:respawn:/sbin/agetty tty6 9600
# End /etc/inittab
EOF
cd ..
rm -rvf sysvinit-2.86
tar -xjvf /sources/tar-1.22.tar.bz2
cd tar-1.22
./configure --prefix=/usr --bindir=/bin --libexecdir=/usr/sbin
make $CORES_TO_USE
make install
cd ..
rm -rvf tar-1.22
tar -xzvf /sources/texinfo-4.13a.tar.gz
cd texinfo-4.13
./configure --prefix=/usr
make $CORES_TO_USE
make install
make TEXMF=/usr/share/texmf install-tex
cd ..
rm -rvf texinfo-4.13
tar -xjvf /sources/udev-151.tar.bz2
cd udev-151
tar -xvf /sources/udev-config-20100128.tar.bz2
install -dv /lib/{firmware,udev/devices/{pts,shm}}
mknod -m0666 /lib/udev/devices/null c 1 3
ln -sv /proc/self/fd /lib/udev/devices/fd
ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
ln -sv /proc/kcore /lib/udev/devices/core
./configure --prefix=/usr --sysconfdir=/etc --sbindir=/sbin --with-rootlibdir=/lib --libexecdir=/lib/udev --docdir=/usr/share/doc/udev-151 --disable-extras --disable-introspection
make $CORES_TO_USE
make install
install -m644 -v rules/packages/64-*.rules /lib/udev/rules.d/
install -m644 -v rules/packages/40-pilot-links.rules /lib/udev/rules.d/
install -m644 -v rules/packages/40-isdn.rules /lib/udev/rules.d/
cd udev-config-20100128
make install
make install-doc
cd ../..
rm -rvf udev-151
tar -xzvf /sources/nano-2.1.10.tar.gz
cd nano-2.1.10
./configure --prefix=/usr --sysconfdir=/etc/nano --enable-color --enable-multibuffer --enable-nanorc
make $CORES_TO_USE
make install
install -v -m644 -D doc/nanorc.sample /etc/nano/nanorc.sample
install -v -m755 -d /usr/share/doc/nano-2.1.10
install -v -m644 doc/{,man/,texinfo/}*.html /usr/share/doc/nano-2.1.10
cat > /etc/nano/nanorc << "EOF"
set autoindent
set const
set fill 72
set historylog
set multibuffer
unset nohelp
set regexp
set smooth
set suspend
EOF
cd ..
rm -rvf nano-2.1.10
And remember to run [passwd root] to set a root password to let you log in. Now proceed with the normal scripting stuff and booting stuff to finish the build.

No comments:

Post a Comment