Sunday, 5 September 2010

LAP - All in One - Xorg

This is the script to install Xorg in one go. As with other scripts make sure you have the source files downloaded. Then paste into gedit, and save as a script.

cat >> /etc/profile.d/X.sh << "EOF"
# Begin Xorg Variables
export XORG_PREFIX="/usr"
export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc --mandir=$XORG_PREFIX/share/man --localstatedir=/var"
# End Xorg variables
EOF
source /etc/profile
cd /sources/xorg/proto
for package in $(grep -v '^#' ../proto-7.5-2.wget)
do
packagedir=${package%.tar.bz2}
tar -xvf $package
cd $packagedir
./configure $XORG_CONFIG
make install
cd ..
rm -rvf $packagedir
done 2>&1 | tee -a ../proto-7.5-2-compile.log
cd /sources/xorg/util
for package in $(grep -v '^#' ../util-7.5-2.wget)
do
packagedir=${package%.tar.bz2}
tar -xvf $package
cd $packagedir
./configure $XORG_CONFIG
make $CORES_TO_USE
make install
cd ..
rm -rvf $packagedir
done 2>&1 | tee -a ../util-7.5-2-compile.log
cd /sources/xorg
tar -jxvf libXau-1.0.5.tar.bz2
cd libXau-1.0.5
./configure $XORG_CONFIG
make $CORES_TO_USE
make install
cd ..
rm -rvf libXau-1.0.5
tar -jxvf libXdmcp-1.0.3.tar.bz2
cd libXdmcp-1.0.3
./configure $XORG_CONFIG
make $CORES_TO_USE
make install
cd ..
rm -rvf libXdmcp-1.0.3
cd /sources/xorg
tar -xvzf ed-1.4.tar.gz
cd ed-1.4
./configure --prefix=/usr --bindir=/bin
make $CORES_TO_USE
make install
cd ..
rm -rvf ed-1.4
cd /sources/xorg
tar -jxvf freetype-2.3.12.tar.bz2
cd freetype-2.3.12
tar -xvf ../freetype-doc-2.3.12.tar.bz2 --strip-components=2 -C docs
sed -i -r -e 's:.*(#.*BYTE.*) .*:\1:' -e 's:.*(#.*SUBPIX.*) .*:\1:' include/freetype/config/ftoption.h
./configure --prefix=/usr
make $CORES_TO_USE
make install
install -v -m755 -d /usr/share/doc/freetype-2.3.12
cp -v -R docs/*     /usr/share/doc/freetype-2.3.12
cd ..
rm -rvf freetype-2.3.12
cd /sources/xorg
tar -xzvf expat-2.0.1.tar.gz
cd expat-2.0.1
./configure --prefix=/usr
make $CORES_TO_USE
make install
install -v -m755 -d /usr/share/doc/expat-2.0.1
install -v -m644 doc/*.{html,png,css} /usr/share/doc/expat-2.0.1
cd ..
rm -rvf expat-2.0.1
cd /sources/xorg
tar -xzvf fontconfig-2.8.0.tar.gz
cd fontconfig-2.8.0
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-docs --without-add-fonts --with-docdir=/usr/share/doc/fontconfig-2.8.0
make $CORES_TO_USE
make install
cd ..
rm -rvf fontconfig-2.8.0
cd /sources/xorg/lib
for package in $(grep -v '^#' ../lib-7.5-2.wget)
do
packagedir=${package%.tar.bz2}
tar -xvf $package
cd $packagedir
case "$packagedir" in
libX11-1.3.2 )
CONFIGPARAMS="--without-xcb"
esac
./configure $XORG_CONFIG $CONFIGPARAMS
make $CORES_TO_USE
make install
unset CONFIGPARAMS
ldconfig
cd ..
rm -rvf $packagedir
done 2>&1 | tee -a ../lib-7.5-2-compile.log
tar -xjvf xbitmaps-1.1.0.tar.bz2
cd xbitmaps-1.1.0
./configure $XORG_CONFIG
make install
cd ..
rm -rvf xbitmaps-1.1.0
cd /sources/xorg
tar -xjvf libpng-1.2.42.tar.bz2
cd libpng-1.2.42
patch -Np1 -i ../libpng-1.2.42-apng-1.patch
./configure --prefix=/usr
make $CORES_TO_USE
make install
install -v -m755 -d /usr/share/doc/libpng-1.2.42
install -v -m644    README libpng-1.2.42.txt /usr/share/doc/libpng-1.2.42
cd ..
rm -rvf libpng-1.2.42
tar -jxvf libpthread-stubs-0.1.tar.bz2
cd libpthread-stubs-0.1
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf libpthread-stubs-0.1
tar -jxvf libdrm-2.4.14.tar.bz2
cd libdrm-2.4.14
./configure --prefix=$XORG_PREFIX
make $CORES_TO_USE
make install
cd ..
rm -rvf libdrm-2.4.14
cd /sources/xorg
tar -xjvf MesaLib-7.6.tar.bz2
tar -xjvf MesaDemos-7.6.tar.bz2
cd Mesa-7.6
sed 's@FLAGS=\"-g@FLAGS=\"@' -i configure
./configure $XORG_CONFIG
make $CORES_TO_USE
make -C progs/xdemos glxinfo glxgears
make install
install -v -m755 progs/xdemos/glx{info,gears} ${XORG_PREFIX}/bin
cd ..
rm -rvf Mesa-7.6
cd /sources/xorg/app
for package in $(grep -v '^#' ../app-7.5-2.wget)
do
packagedir=${package%.tar.bz2}
tar -xvf $package
cd $packagedir
./configure $XORG_CONFIG
make $CORES_TO_USE
make install
cd ..
rm -rvf $packagedir
done 2>&1 | tee -a ../app-7.5-2-compile.log
tar -xjvf xcursor-themes-1.0.2.tar.bz2
cd xcursor-themes-1.0.2
./configure $XORG_CONFIG
make $CORES_TO_USE
make install
cd ..
rm -rvf xcursor-themes-1.0.2
cd /sources/xorg/font
for package in $(grep -v '^#' ../font-7.5-2.wget)
do
packagedir=${package%.tar.bz2}
tar -xvf $package
cd $packagedir
./configure $XORG_CONFIG
make $CORES_TO_USE
make install
cd ..
rm -rvf $packagedir
done 2>&1 | tee -a ../font-7.5-2-compile.log
cd /sources/xorg 
tar -xzvf XML-Parser-2.36.tar.gz
cd XML-Parser-2.36
perl Makefile.PL
make $CORES_TO_USE
make install
cd ..
rm -rvf XML-Parser-2.36
cd /sources/xorg
tar -xjvf intltool-0.40.6.tar.bz2
cd intltool-0.40.6
./configure --prefix=/usr
make $CORES_TO_USE
make install
install -v -m644 -D doc/I18N-HOWTO /usr/share/doc/intltool-0.40.6/I18N-HOWTO
cd ..
rm -rvf intltool-0.40.6
cd /sources/xorg
tar -xjvf xkeyboard-config-1.7.tar.bz2
cd xkeyboard-config-1.7
./configure $XORG_CONFIG --with-xkb-rules-symlink=xorg
make $CORES_TO_USE
make install
install -dv -m755 $XORG_PREFIX/share/doc/xkeyboard-config-1.7
install -v -m644 docs/{README,HOWTO}* $XORG_PREFIX/share/doc/xkeyboard-config-1.7
cd ..
rm -rvf xkeyboard-config-1.7
tar -xjvf luit-1.0.4.tar.bz2
cd luit-1.0.4
./configure $XORG_CONFIG
make $CORES_TO_USE
make install
cd ..
rm -rvf luit-1.0.4
tar -xzvf pixman-0.15.20.tar.gz
cd pixman-0.15.20
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf pixman-0.15.20
cd /sources/xorg
tar -xjvf xorg-server-1.7.1.tar.bz2
cd xorg-server-1.7.1
./configure $XORG_CONFIG --with-module-dir=$XORG_PREFIX/lib/X11/modules --with-xkb-output=/var/lib/xkb --enable-install-setuid --disable-config-hal --disable-config-dbus
make $CORES_TO_USE
make install
cd ..
rm -rvf xorg-server-1.7.1
cd /sources/xorg
tar -xzvf xterm-253.tgz
cd xterm-253
sed -i '/v0/,+1s/new:/new:kb=^?:/' termcap
echo -e '\tkbs=\\177,' >>terminfo
TERMINFO=/usr/lib/terminfo ./configure $XORG_CONFIG --enable-luit --enable-wide-chars --with-app-defaults=$XORG_PREFIX/share/X11/app-defaults
make $CORES_TO_USE
make install
make install-ti
cat >> $XORG_PREFIX/share/X11/app-defaults/XTerm << "EOF"
*VT100*locale: true
*VT100*faceName: Monospace
*VT100*faceSize: 10
*backarrowKeyIsErase: true
*ptyInitialErase: true
EOF
cd ..
rm -rvf xterm-253
cd /sources/xorg/driver
for package in $(grep -v '^#' ../driver-7.5-2.wget)
do
packagedir=${package%.tar.bz2}
tar -xf $package
cd $packagedir
case $packagedir in
xf86-input-evdev-[0-9]* | xf86-video-ati-[0-9]* | xf86-video-fbdev-[0-9]* | xf86-video-glint-[0-9]* | xf86-video-newport-[0-9]* )
sed -i -e "s/\xc3\xb8/\\\\[\/o]/" -e "s/\xc3\xa4/\\\\[:a]/" -e "s/\xc3\x9c/\\\\[:U]/" man/*.man
;;
esac
./configure $XORG_CONFIG --with-xorg-module-dir=$XORG_PREFIX/lib/X11/modules
make $CORES_TO_USE
make install
cd ..
rm -rvf $packagedir
done 2>&1 | tee -a ../driver-7.5-2-compile.log
ln -vsf $XORG_PREFIX /usr/X11R6
mkdir -p /etc/X11 &&
for file in $XORG_PREFIX/{lib/X11/xinit,share/X11/{app-defaults,twm}}
do
mv -v $file /etc/X11/ 2> /dev/null &&
ln -v -s /etc/X11/$(basename $file) $file
done
cat > ~/.xinitrc << "EOF"
# Begin .xinitrc file
xterm  -g 80x20+0+0   &
xclock -g 100x100-0+0 &
twm
EOF
cat > ~/.bashrc << "EOF"
source /etc/profile
EOF
cat >> /etc/sysconfig/createfiles << "EOF"
/tmp/.ICE-unix dir 1777 root root
EOF
After this has run, you will need to generate your xorg.conf file and edit away your your hearts content following these instructions.

LAP - All in One - Hardware

Once you have got the system booting, you can install all the compression and hardware stuff by the following script, again geditted into an executable file.

cd /dev/shm
tar -xzvf /sources/network/wireless_tools.28.tar.gz 
cd wireless_tools.28 
make 
make PREFIX=/usr install 
cd .. 
rm -rvf wireless_tools.28
tar -xjvf /sources/network/net-tools-1.60.tar.bz2
cd net-tools-1.60
patch -Np1 -i /sources/network/net-tools-1.60-gcc34-3.patch
patch -Np1 -i /sources/network/net-tools-1.60-kernel_headers-2.patch
patch -Np1 -i /sources/network/net-tools-1.60-mii_ioctl-1.patch
yes "" | make config
sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' -e 's|HAVE_MII 0|HAVE_MII 1|g' config.h
sed -i -e 's|# HAVE_IP_TOOLS=0|HAVE_IP_TOOLS=1|g' -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make
make $CORES_TO_USE
make update
cd ..
rm -rvf net-tools-1.60
tar -xjvf /sources/network/dhcpcd-4.0.11.tar.bz2
cd dhcpcd-4.0.11
make PREFIX= LIBEXECDIR=/lib/dhcpcd DBDIR=/var/lib/dhcpcd SYSCONFDIR=/etc/dhcpcd 
make PREFIX= LIBEXECDIR=/lib/dhcpcd DBDIR=/var/lib/dhcpcd SYSCONFDIR=/etc/dhcpcd install 
sed -i "s;/var/lib/dhcpcd-;/var/lib/dhcpcd/dhcpcd-;g" dhcpcd-hooks/50-dhcpcd-compat 
install -v -m 644 dhcpcd-hooks/50-dhcpcd-compat /lib/dhcpcd/dhcpcd-hooks/ 
cd .. 
rm -rvf dhcpcd-4.0.11 
tar -xjvf /sources/network/blfs-bootscripts-20090302.tar.bz2 
cd blfs-bootscripts-20090302 
make install-service-dhcpcd 
cd .. 
rm -rvf blfs-bootscripts-20090302 
cat > ~/wifi_wl.sh << "EOF"
rmmod b43 
rmmod ssb 
rmmod wl
rmmod lib80211
modprobe lib80211
modprobe wl
dhcpcd -L -t 1 XXXX
iwconfig XXXX essid "YYYY" key ZZZZ
dhcpcd XXXX
EOF
chmod +x ~/wifi_wl.sh
cat > ~/wifi_b43.sh << "EOF"
rmmod b43 
rmmod ssb 
rmmod lib80211
rmmod wl
modprobe b43
sleep 1
iwconfig XXXX essid "YYYY" key ZZZZ
dhcpcd XXXX
EOF
chmod +x ~/wifi_b43.sh
tar -xjvf /sources/network/wget-1.12.tar.bz2 
cd wget-1.12 
./configure --prefix=/usr --sysconfdir=/etc 
make $CORES_TO_USE
make install 
install-info --info-dir=/usr/share/info /usr/share/info/wget.info 
cd .. 
rm -rvf wget-1.12
tar -xzvf /sources/extras/lzma-4.32.7.tar.gz
cd lzma-4.32.7
./configure --prefix=/usr
make $CORES_TO_USE
make check
make install
cd ..
rm -rvf lzma-4.32.7
tar -xzvf /sources/extras/unzip60.tar.gz
cd unzip60
make -f unix/Makefile linux
make prefix=/usr install
cd ..
rm -rvf unzip60
tar -xzvf /sources/extras/zip30.tar.gz
cd zip30
make -f unix/Makefile generic_gcc
make prefix=/usr -f unix/Makefile install
cd ..
rm -rvf zip30
tar -xzvf /sources/extras/bc-1.06.tar.gz 
cd bc-1.06 
sed -i '/PROTO.*readline/d' bc/scan.l 
sed -i '/flex -I8/s/8//' configure 
sed -i '/stdlib/a #include ' lib/number.c 
sed -i 's/program.*save/static &/' bc/load.c 
./configure --prefix=/usr --with-readline 
make $CORES_TO_USE 
make install 
cd .. 
rm -rvf bc-1.06 
tar -xzvf /sources/extras/openssl-0.9.8n.tar.gz 
cd openssl-0.9.8n 
patch -Np1 -i /sources/extras/openssl-0.9.8n-fix_manpages-1.patch 
tar -vxf /sources/extras/BLFS-ca-bundle-3.12.5.tar.bz2 
./config --prefix=/usr --openssldir=/etc/ssl shared zlib-dynamic 
make $CORES_TO_USE 
make MANDIR=/usr/share/man install 
cp -v -r certs /etc/ssl 
install -v -d -m755 /usr/share/doc/openssl-0.9.8n 
cp -v -r       doc/{HOWTO,README,*.{txt,html,gif}} /usr/share/doc/openssl-0.9.8n 
for pem in /etc/ssl/certs/*.pem 
do 
cat $pem 
echo "" 
done > /etc/ssl/ca-bundle.crt 
cd .. 
rm -rvf openssl-0.9.8n 
tar -xjvf /sources/extras/lynx2.8.7rel.1.tar.bz2 
cd lynx2-8-7 
./configure --prefix=/usr --sysconfdir=/etc/lynx --datadir=/usr/share/doc/lynx-2.8.7rel.1 --with-zlib --with-bzlib --with-screen=ncursesw --enable-locale-charset --with-ssl 
make $CORES_TO_USE
make install-full 
chgrp -v -R root /usr/share/doc/lynx-2.8.7rel.1/lynx_doc 
sed -i 's/#\(LOCALE_CHARSET\):FALSE/\1:TRUE/' /etc/lynx/lynx.cfg 
sed -i 's/#\(DEFAULT_EDITOR\):/\1:nano/' /etc/lynx/lynx.cfg 
sed -i 's/#\(PERSISTENT_COOKIES\):FALSE/\1:TRUE/' /etc/lynx/lynx.cfg 
cd .. 
rm -rvf lynx2-8-7 
tar -xzvf /sources/extras/doxygen-1.6.3.src.tar.gz 
cd doxygen-1.6.3 
./configure --prefix /usr --docdir /usr/share/doc/doxygen-1.6.3 
make $CORES_TO_USE
make install 
make install_docs 
cd .. 
rm -rvf doxygen-1.6.3 
tar -jxvf /sources/audio/alsa-lib-1.0.21.tar.bz2
cd alsa-lib-1.0.21
./configure --enable-static &&
make $CORES_TO_USE
make install &&
install -v -m644 -D doc/asoundrc.txt /usr/share/doc/alsa-lib-1.0.21/asoundrc.txt
make doc
install -v -d -m755 /usr/share/doc/alsa-1.0.21/html
install -v -m644 doc/doxygen/html/* /usr/share/doc/alsa-1.0.21/html
cd ..
rm -rvf alsa-lib-1.0.21
tar -jxvf /sources/audio/alsa-plugins-1.0.21.tar.bz2
cd alsa-plugins-1.0.21
./configure
make $CORES_TO_USE
make install
install -v -m755 -d /usr/share/doc/alsa-plugins-1.0.21
install -v -m644 doc/{README*,*.txt} /usr/share/doc/alsa-plugins-1.0.21
cd ..
rm -rvf alsa-plugins-1.0.21
tar -jxvf /sources/audio/alsa-utils-1.0.21.tar.bz2
cd alsa-utils-1.0.21
patch -Np1 -i /sources/audio/alsa-utils-1.0.21-no_xmlto-1.patch
./configure
make $CORES_TO_USE
make install
cd ..
rm -rvf alsa-utils-1.0.21
tar -xjvf /sources/audio/blfs-bootscripts-20090302.tar.bz2
cd blfs-bootscripts-20090302
make install-alsa
cd ..
rm -rvf blfs-bootscripts-20090302
touch /etc/asound.state
alsactl store
cat > /etc/udev/rules.d/40-alsa.rules << "EOF"
# /etc/udev/rules.d/40-alsa.rules

# When a sound device is detected, restore the volume settings
KERNEL=="controlC[0-9]*", ACTION=="add", RUN+="/usr/sbin/alsactl restore %n"
EOF
chmod -v 644 /etc/udev/rules.d/40-alsa.rules

After you run this, remember you need to load on the b43 firmware, and you need to edit the wifi_*.sh scripts with your own settings.

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.

LAP - All in One - Toolchain

A couple of quick posts now, to build LFS in as few commands as possible - everything scripted. There will be no make checks. Remember to do your apt-gets if necessary. This run also assumes you have ALL of the sources downloaded in advance and located in /sources on the Amiga Key - including optional stuff like Nano. Best way to get all these is from the /sources directory of a previously successful build.

The script will use the ramdisk, so you should set up a separate terminal window and run:

cat > ~/repeat.sh << "EOF"
#!/bin/sh
# usage: repeat [x] 
while true ; do $2 ; sleep $1 ; done
EOF
chmod +x ~/repeat.sh
cat > ~/clearc.sh << "EOF"
sync && sudo echo 3 | sudo tee /proc/sys/vm/drop_caches
EOF
chmod +x ~/clearc.sh
~/repeat.sh 60 ~/clearc.sh
Next follow the configuration instructions. Then copy the following code and paste it into gedit, and save it into the lfs user's folder. Immediately after the [source /etc/profile] step, run the script. Heck, you can even time it.
cd /tmp
tar -xjvf $LFS/sources/binutils-2.20.tar.bz2
mkdir -v binutils-build
cd binutils-build
../binutils-2.20/configure --target=$LFS_TGT --prefix=/tools --disable-nls --disable-werror
make $CORES_TO_USE
make install
cd ..
rm -rvf binutils-2.20 binutils-build
tar -jxvf $LFS/sources/gcc-4.4.3.tar.bz2
cd gcc-4.4.3
tar -jxf $LFS/sources/mpfr-2.4.2.tar.bz2
mv -v mpfr-2.4.2 mpfr
tar -jxf $LFS/sources/gmp-5.0.0.tar.bz2
mv -v gmp-5.0.0 gmp
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.4.3/configure --target=$LFS_TGT --prefix=/tools --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --enable-languages=c
make $CORES_TO_USE
make install
ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`
cd ..
rm -rvf gcc-4.4.3 gcc-build
tar -jxvf $LFS/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
cp -rv dest/include/* /tools/include
cd ..
rm -rvf linux-2.6.32.8
tar -jxvf $LFS/sources/glibc-2.11.1.tar.bz2
mkdir -v glibc-build
cd glibc-build
case `uname -m` in  i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;;esac
../glibc-2.11.1/configure --prefix=/tools --host=$LFS_TGT --build=$(../glibc-2.11.1/scripts/config.guess) --disable-profile --enable-add-ons --enable-kernel=2.6.18 --with-headers=/tools/include libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
make $CORES_TO_USE
make install
cd ..
rm -rvf glibc-build glibc-2.11.1
SPECS=`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/specs
$LFS_TGT-gcc -dumpspecs | sed -e 's@/lib\(64\)\?/ld@/tools&@g' -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS 
echo "New specs file is: $SPECS"
unset SPECS
tar -jxvf $LFS/sources/binutils-2.20.tar.bz2
mkdir -v binutils-build
cd binutils-build
CC="$LFS_TGT-gcc -B/tools/lib/" AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib ../binutils-2.20/configure --prefix=/tools --disable-nls --with-lib-path=/tools/lib
make $CORES_TO_USE
make install
make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib
cp -v ld/ld-new /tools/bin
cd ..
rm -rfv binutils-2.20 binutils-build
tar -jxvf $LFS/sources/gcc-4.4.3.tar.bz2
cd gcc-4.4.3
patch -Np1 -i $LFS/sources/gcc-4.4.3-startfiles_fix-1.patch
cp -v gcc/Makefile.in{,.orig}
sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in
cp -v gcc/Makefile.in{,.tmp}
sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp > gcc/Makefile.in
for file in $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
  cp -uv $file{,.orig}
  sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' -e 's@/usr@/tools@g' $file.orig > $file
  echo '
#undef STANDARD_INCLUDE_DIR
#define STANDARD_INCLUDE_DIR 0
#define STANDARD_STARTFILE_PREFIX_1 ""
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
  touch $file.orig
done
tar -jxf $LFS/sources/mpfr-2.4.2.tar.bz2
mv -v mpfr-2.4.2 mpfr
tar -jxf $LFS/sources/gmp-5.0.0.tar.bz2
mv -v gmp-5.0.0 gmp
mkdir -v ../gcc-build
cd ../gcc-build
CC="$LFS_TGT-gcc -B/tools/lib/" AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib ../gcc-4.4.3/configure --prefix=/tools  --with-local-prefix=/tools --enable-clocale=gnu  --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap
make $CORES_TO_USE
make install
ln -vs gcc /tools/bin/cc
cd ..
rm -rvf gcc-4.4.3 gcc-build
tar -xzvf $LFS/sources/tcl8.5.8-src.tar.gz
cd tcl8.5.8
cd unix
./configure --prefix=/tools
make $CORES_TO_USE
make install
chmod -v u+w /tools/lib/libtcl8.5.so
make install-private-headers
ln -sv tclsh8.5 /tools/bin/tclsh
cd ../..
rm -rvf tcl8.5.8
tar -xzvf $LFS/sources/expect-5.43.0.tar.gz
cd expect-5.43
patch -Np1 -i $LFS/sources/expect-5.43.0-spawn-1.patch
patch -Np1 -i $LFS/sources/expect-5.43.0-tcl_8.5.5_fix-1.patch
cp -v configure{,.orig}
sed 's:/usr/local/bin:/bin:' configure.orig > configure
./configure --prefix=/tools --with-tcl=/tools/lib --with-tclinclude=/tools/include --with-x=no
make
make SCRIPTS="" install
cd ..
rm -rvf expect-5.43 
tar -xzvf $LFS/sources/dejagnu-1.4.4.tar.gz
cd dejagnu-1.4.4
./configure --prefix=/tools
make install
cd ..
rm -rvf dejagnu-1.4.4
tar -xzvf $LFS/sources/ncurses-5.7.tar.gz 
cd ncurses-5.7
./configure --prefix=/tools --with-shared --without-debug --without-ada --enable-overwrite
make $CORES_TO_USE
make install
cd ..
rm -rvf ncurses-5.7
tar -xzvf $LFS/sources/bash-4.1.tar.gz
cd bash-4.1
./configure --prefix=/tools --without-bash-malloc
make $CORES_TO_USE
make install
ln -vs bash /tools/bin/sh
cd ..
rm -rvf bash-4.1
tar -xzvf $LFS/sources/bzip2-1.0.5.tar.gz
cd bzip2-1.0.5
make $CORES_TO_USE
make PREFIX=/tools install
cd ..
rm -rvf bzip2-1.0.5
tar -xzvf $LFS/sources/coreutils-8.4.tar.gz
cd coreutils-8.4
./configure --prefix=/tools --enable-install-program=hostname
make $CORES_TO_USE
make install
cp -v src/su /tools/bin/su-tools
cd ..
rm -rvf coreutils-8.4
tar -xzvf $LFS/sources/diffutils-2.8.1.tar.gz
cd diffutils-2.8.1
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf diffutils-2.8.1
tar -xzvf $LFS/sources/findutils-4.4.2.tar.gz
cd findutils-4.4.2
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf findutils-4.4.2
tar -xjvf $LFS/sources/gawk-3.1.7.tar.bz2
cd gawk-3.1.7
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf gawk-3.1.7
tar -xzvf $LFS/sources/gettext-0.17.tar.gz
cd gettext-0.17
cd gettext-tools
./configure --prefix=/tools --disable-shared
make $CORES_TO_USE -C gnulib-lib
make $CORES_TO_USE -C src msgfmt
cp -v src/msgfmt /tools/bin
cd ../..
rm -rvf gettext-0.17
tar -xjvf $LFS/sources/grep-2.5.4.tar.bz2
cd grep-2.5.4
./configure --prefix=/tools --disable-perl-regexp --without-included-regex
make $CORES_TO_USE
make install
cd ..
rm -rvf grep-2.5.4
tar -xzvf $LFS/sources/gzip-1.4.tar.gz
cd gzip-1.4
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf gzip-1.4
tar -xjvf $LFS/sources/m4-1.4.13.tar.bz2
cd m4-1.4.13
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf m4-1.4.13
tar -xjvf $LFS/sources/make-3.81.tar.bz2
cd make-3.81
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf make-3.81
tar -xjvf $LFS/sources/patch-2.6.1.tar.bz2
cd patch-2.6.1
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf patch-2.6.1
tar -xjvf $LFS/sources/perl-5.10.1.tar.bz2
cd perl-5.10.1
patch -Np1 -i $LFS/sources/perl-5.10.1-libc-1.patch
sh Configure -des -Dprefix=/tools -Dstatic_ext='Data/Dumper Fcntl IO POSIX'
make $CORES_TO_USE perl utilities ext/Errno/pm_to_blib
cp -v perl pod/pod2man /tools/bin
mkdir -pv /tools/lib/perl5/5.10.1
cp -Rv lib/* /tools/lib/perl5/5.10.1
cd ..
rm -rvf perl-5.10.1
tar -xjvf $LFS/sources/sed-4.2.1.tar.bz2
cd sed-4.2.1
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf sed-4.2.1
tar -xjvf $LFS/sources/tar-1.22.tar.bz2
cd tar-1.22
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf tar-1.22
tar -xzvf $LFS/sources/texinfo-4.13a.tar.gz
cd texinfo-4.13
./configure --prefix=/tools
make $CORES_TO_USE
make install
cd ..
rm -rvf  texinfo-4.13
strip --strip-debug /tools/lib/*
strip --strip-unneeded /tools/{,s}bin/*
rm -rf /tools/{,share}/{info,man}
Then remember to exit the lfs user mode, and run:
sudo chown -R root:root /media/lfs/tools

Friday, 3 September 2010

LAP - Unfinished Business

Various things that have occurred to me as I have gone along with this build. Some, I have been able to incorporate in the instructions (such as unpacking and compiling in ram), and others have just appeared to be too formidable. I am going to list the outstanding stuff here, as a kind of bookmark of things I have yet to figure out how to do.

Firstly, the kernel source folder is left on the system as a compressed folder. It needs to be uncompressed to allow the nvidia drivers to be installed. This is a pain. It would be much better if we could just mount the archive file straight to the file system with out unpacking it.

Apparently, this is possible. I apparently need the packages, FUSE, libarchive, and archivemount. Helpfully, this is not described as bug free.

I also have to test out the beta version of e-uae which is the latest version.

I left most of the kernel options at the default settings when I configured it. It works fine, but it is probably somewhat bloated. I should really read the guidance on configuring the kernel in more detail so I can strip out the unnecessary stuff.

I documented the problems I had getting the system to boot, and I explained the reason I shifted to Grub 0.97. I should really try to get the newer version to work.

Since I am talking about booting issues, I would like to try to get the system to boot from an [init]ial [r]am[d]isk. I think this would allow me to boot the drive with reference to its label rather than having to second guess what device name will be assigned to it on boot. This would allow me to move from machine to machine much more easily.

As far as the Amiga is concerned, it should be possible to install a newer version of the operating system. The next version up from Workbench 3.1 is Amiga OS 3.5. It comes on CD. We can mount the CD ISO image straight to the Linux filesystem by running:

mkdir /media/ISOmount -t iso9660 -o loop [3.5 OS cd].iso /media/ISO

You can then just mount that folder as hd2: in the same way as Shared:.

I would also like to explore some other Amiga software, such as WHDLoad, which allows you to load game disks on to the virtual hard disk. Very useful for multi-disk games.

Openbox has a couple of configuration packages which are referenced in the menu that I have setup. I would like to have those installed.

I can only connect to a WEP enabled network, which is not as secure as a WPA network. I need to work out how the fuck to install and run the wpa_supplicant package. I mean seriously, I have read the BLFS and CBLFS instructions, the Arch and Gentoo guidance, and I still have no fucking clue what I am supposed to be doing.

xterm is pretty crap when compared to the terminals which come with a full Desktop Environment such as Gnome or KDE. I am thinking of replacing it with another terminal such as aterm or eterm.

I am also thinking of installing a simple graphical browser for the linux environment. Dillo is an option, but apparently it does not work with the version of GTK that I have installed. Alternatively the package Links, instead of Lynx, can be setup to work in X as well as the console. I am also tempted to try Firefox, but that may be silly to get a basic browser as it is sure to come with a shitload of dependencies.

The other thing I am aware of is that I have only set up the root user. This is useful because it means I do not trip up over permissions bullshit. On the other hand, it is a security risk. I would not have set this up in this manner to use as a full time machine. If I decide to add further packages, or even install the system to a HDD, then I will want to set up a normal user account to use on a day to day basis.

Finally, I want to see if I can install emulators for other systems such as Gamecube, N64, Playstation, and the PS2.

Thursday, 2 September 2010

LAP - Lessons Learned?

One of the points of this whole exercise was to learn something. Have I managed to do that? Well...

Getting a hold of all the source packages is tricky. The server beach mirror has everything in the same place, and as a result is very very useful.

The trio of glibc, gcc and binutils is at the core of Linux from Scratch. They also take the most time to get up and running in both the tool chain build and the actual build. Well, aside for the test suites for the auto* packages. They also take most resources to compile and, presumably, install.

Getting the fucking thing to boot is really tricky. Kernel configuration is an expert level task, but the online resources are very useful if you can wade your way through them. It would be very useful if the book could highlight some common problems, and how to solve them. The interaction between /etc/fstab, grub, and the kernel is not clearly explained, and it could be. The treatment of Grub 1.97 in LFS6.6 in particular is pretty shoddy.

The next tricky bit was the installation of X. It is almost like doing the tool chain all over again. It involves multiple packages, and you have to keep your wits about you. I was able to go though it with NVidia and Intel graphics, but I haven't tried it with ATI hardware yet. Switching from Nvidia to Intel should, I feel, be easier than uninstalling and reinstalling the driver every fecking time, but it is the only way I could get it to work. The problem is that the Nvidia driver swans about this place like lord of the manor and deletes all the DRI files that the Intel driver needs.

As for the other hardware, networking is a hit or a miss depending on your card. I tried three different network cards and the results were:

Linksys WMP54GS (Broadcom 4306) - kernel driver worked fine, but needed (non-free) firmware to be obtained independently.
Abit Airpace (Atheros) - an absolute doddle - works as soon as the Atheros options are enabled in the kernel configuration.
Compaq Mini built in (Broadcom 43XX - not sure exactly) - bastard hard. You have to download and compile a stand alone module for the kernel AND disable the existing broadcom drivers before this will work.

Audio was actually a piece of piss. Just make sure you enable the correct drivers in the Kernel configuration, and then install alsa. That, literally, is all there is to it. I am aware, like some native tribesman seeing fighter planes pass high over head, that there is a whole world of fucking hurt out there that I know very, very, little about. In my case, that world is called pulseaudio.

When it comes to the LFS build most things are very well explained. One exception is static and dynamic libraries. I still have only a very sketchy idea what the difference is and what they do. A strong point behind doing a LFS build is to learn how this stuff works, but I am still in the dark.

Also, the sed stuff is a bit of a nightmare. Clearly it is doing something, but it is far from clear, and intuitive, how it is doing what it is doing. Given how prevalent sed is in the build, it would be useful if LFS could give an explanation, or even link to one, about how it fucking works. In a similar, but far less prevalent, vein not all of the patches that are applied are fully explained.

Dependency resolution is a bitch. This is why more user friendly distributions are use friendly! You can just type:

apt-get install libgtk2.0-0

in ubuntu. Sorry:

sudo apt-get install libgtk2.0-0

and it will go and get all the dependencies for you. With LFS, or BLFS you need to read through screeds and screeds of material to find out exactly what packages you need to be able to build gtk, then find them on the internet. THEN find which packages you need to build those ones, etc etc. Then you need to install them all in the right order. It is a bit of a trial. It's a shame that BLFS couldn't maintain a search able database of dependency information on the website. You could then type in the package you wanted to install and it would come back with all the dependencies you would need on top of LFS to get your package to work. It would be AWESOME if the search could auto generate a .wget file with links to all the source code for the dependencies as well. I mean, all of this information is in BLFS anyway - it is just a matter of managing it properly.

I also learned a couple of useful tweaks to the standard LFS instructions which dramatically improve performance. Setting the variable CORES_TO_USE to either -j2 or -j4 made switching the build between my hyperthreading CPU and my Quad Core very easy. Also, using a ramdisk as the working area to unpack archives and compile the software really sped things up - its just a shame that GCC needs a machine with more than 2Gb of RAM to compile in that scenario.

In terms of e-uae, I was actually pleasantly surprised. Other than needing to install GTK to get the GUI and SDL to get fullscreen graphics, it mostly worked fine. I am still not entirely sure what SDL is, but is seems to work.

The Amiga software itself was interesting. The Green Amiga Alien's guides were essential. The only massive problem I encountered was the case sensitive rom file to enable the harddisk, and that was easily solved by just reading the fucking error messages. The documentation for installing the IPF support was woeful, but trial and error got it to work.

In summary, when I started this project a couple of months ago, I had absolutely no idea if it would work. By and large, however, it has. The base system that I have managed to build is one that is a very flexible base. I have chosen to stick an Amiga emulator on top of the install, but you could just as easily stick a desktop environment and an office suite, creating a system that you could actually use for day to day tasks.

Wednesday, 1 September 2010

LAP - AWeb

The final package I am going to install in the main build is a web browser for the Amiga. For the avoidance of doubt in the heads of imbeciles, there is no point in doing this if you did not or could not install the network drivers for your system.

Much like e-uae itself, the AWeb browser needs a toolkit to display stuff like buttons, menus and so on. Actually the toolkits we are going to install are used by a number of other applications, so they are useful in and of themselves. One thing which uses them is a replacement icon set, so we will install that as well just now. In addition, the makers of the web browser AWeb no longer supply copies of their software, so I had to resort to archive.org. Seems to work fine though.

umount -v /media/amiga
sudo mkdir /media/lfs 
sudo mount -v -t ext3 /dev/disk/by-label/amiga /media/lfs 
cd /media/lfs/sources/amiga

wget http://aminet.net/util/libs/mui38usr.lha
wget http://aminet.net/dev/gui/ClassAct2Demo.lha
wget http://aminet.net/util/wb/NewIcons46.lha
wget http://web.archive.org/web/20070102173257/http://aweb.sunsite.dk/files/full/AWeb_APL34_full_020.lha

Again, when you have booted to the Amiga you then want to move, or copy, the files from /sources/amiga to ~/amiga/shared/ so that the files are available to the emulated Amiga. Then boot your A1200HD machine.

The first bit of the toolkit we install is Mui, which sounds halfway been a pretentious Moi and a Hawaiian island. In actual fact it sounds like it is GTK for Workbench.
lha x Shared:mui38usr.lha ram:
Open this up in the same way as Picasso. In other words you double click on the ramdisk, then double click on the MUI directory, and finally double click on the icon called "Install-MUI". When asked to select a place to install MUI, click on show drives and select dh0: Installing to the root of dh0: is fine. You should choose to install all image sets. The example programs are not required.
Once it is installed, reboot the Amiga, and navigate to the system->mui folder and run the Mui program located there. When the program opens, hold down the right mouse button and go to the menu at the top of the screen – not the Mui program, but the very top of the desktop. There, select project, choose open, and select Stuntzi.prefs. Save your selection.

ClassAct is another toolkitty type thing which works alongside MUI. It may even be a rival to MUI in some areas of operation.
lha x Shared:classact2demo.lha ram:
Double click on the ram disk and then on "ClassAct" and then on "Install_Classes". The classes should be installed to the default location, which should be SYS:Classes. All other options are OK by default as well, so just 'Yes' and 'Proceed' your way through the install. If you select Novice instead of Intermediate user it will just fire straight through without asking you anything.

The two toolkits are actually the dependencies for a new icon set, so since we have installed the toolkit packages, we may as well now install a new icon set. We want to do this because the Workbench icons are designed to be viewed on an interlaced display. The result is that when you view them through the uaegfx: card they lose half their height and look a bit stupid.
lha x Shared:newicons46.lha ram: 
You then, again, double click on the ram disk, and then double click on "NewIconsV4". Then double click on "Install" and finally on "Install_NewIcons". We are not given the chance to install these as a novice, so go for intermediate. Select all check boxes that appear. You should get the opportunity to install a high end library. Take it.
The first install location should be System:Utilities. You should then be given the chance to update a disk or partition image. It should auto choose dh0:, but if not click on show drives and select dh0: and then proceed. Do the same for dh1:. I think this affects the drawer images IN that device as opposed to its icon on the desktop. I mostly think this because the next thing the install does is offer you the chance to change the desktop icons. Do this in the same way. It offers you different icons this time.
The next install options should be SYS:Storage - Proceed, then Help: - Proceed. When it gets to "include:" you need to step in. Change the install path to System:Utilities, by clicking on dh0:System, then scrolling down the list and choosing Utilities. The "Selected Drawer" box should now show "System:Utilities", and if it does click on Proceed. Next it should ask about the example source code and suggest installing it to Work:. You have not defined work: so choose to install it to System:Storage as a fallback, and then do exactly the same for the Autodoc material.
Then, after a reboot, go to System->Prefs->newiconsprefs, and check the boxes next to RTG Mode, no borders, and transparent.

Finally we come to Aweb which is a web browser for Amiga OS. It is, when compared with today's browsers, basic.
lha x Shared:AWeb_APL34_full_020.lha ram:
Start the install in exactly the same way as before. When you start the install it will suggest installing to the ram disk. This is a stupid idea. Instead, install to System:. When asked, you can confirm that you have more than 2Mb of ram. About 254Mb more in fact.
You then get a message telling you that plugins should be installed to AWeb_APL:, and not AWeb3:. Hmm, OK.
So, plugins then. From the open AWeb_APL_020 folder, double click on plugins. From there you should see three folders, which correspond to the jpeg, gif and png plugins. The procedure is really the same for each one. Avoid using the built in scripts. They are a pain in the arse, and only half work. Do it manually instead. Drop to a Shell and run:
copy ram:AWeb_APL_020/Plugins/awebjfif68020/awebjfif.awebplugin AWeb_APL:Storage
copy ram:AWeb_APL_020/Plugins/awebgif/awebgif.awebplugin AWeb_APL:Storage
copy ram:AWeb_APL_020/Plugins/awebpng/awebpng.awebplugin AWeb_APL:Storage
You should then double click the AWeb icon in the AWeb_APL folder. When the program loads, hold down the right mouse button to bring up the menu, and then go to Settings, and then Browser Settings. From the window that comes up (called AWeb browser settings) click on the IMAGE/GIF line under the 'Type' column. The click on the box at the bottom called 'Action', which brings up a drop down menu from which you choose "AWeb Plugin". Then click the icon next to the "Name" box (just under the arrows next to the box now showing "AWeb Plugin"). From the dialogue box that pops up select storage, select awebgif.awebplugin and hit OK. Now do the same for JPEG and PNG (which are just under GIF). Hey presto, your AWeb browser can now display images!