mke2fs -jv -L lfs /dev/sda?
mkdir /media/lfs
mount /dev/sda7 /media/lfs
cd /media/amiga
sudo cp -axv . /media/lfs
sudo chroot "/media/lfs" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin CORES_TO_USE=-j2 /bin/bash --login
grub --batch < /etc/grub.conf
OR
sudo mkdir /media/root
sudo mount -t ext3 /dev/sda? /media/root
sudo mount -t proc none /media/root/proc
sudo mount -o bind /dev /media/root/dev
sudo chroot /media/root /bin/bash
sudo grub
find /boot/grub/stage1
root (hd0,Y)
setup (hd0)
Showing posts with label project. Show all posts
Showing posts with label project. Show all posts
Friday, 17 December 2010
Friday, 15 October 2010
LAP - WHDLoad
You need lha & installer
cd ~amiga/shared
wget http://www.whdload.de/whdload/WHDLoad_usr.lha
wget http://www.aminet.net/util/boot/skick346.lha
wget http://aminet.net/util/pack/xfdmaster.lha
cp ~/amiga/roms/1.3.rom ./kick34005.A500
cp ~/amiga/roms/3.1.rom ./kick40068.A1200
lha x shared:WHDLoad_usr.lha ram:
[install to c:]
lha x shared:skick346.lha devs:
copy shared:kick34005.A500 devs:Kickstarts
copy shared:kick40068.A1200 devs:Kickstarts
lha x shared:xfdmaster.lha ram:
copy ram:xfd_User/C/xfddecrunch c:
cd ~amiga/shared
wget http://www.whdload.de/whdload/WHDLoad_usr.lha
wget http://www.aminet.net/util/boot/skick346.lha
wget http://aminet.net/util/pack/xfdmaster.lha
cp ~/amiga/roms/1.3.rom ./kick34005.A500
cp ~/amiga/roms/3.1.rom ./kick40068.A1200
lha x shared:WHDLoad_usr.lha ram:
[install to c:]
lha x shared:skick346.lha devs:
copy shared:kick34005.A500 devs:Kickstarts
copy shared:kick40068.A1200 devs:Kickstarts
lha x shared:xfdmaster.lha ram:
copy ram:xfd_User/C/xfddecrunch c:
Friday, 24 September 2010
How to Post Code in Blog{er,spot}
This was a collossal pain in the arse to work out, but actually turned out to be quite easy to implement. Y'see when you post text to a blog post everything works fine. The problem is if you try to post code - html, linux command line stuff. You end up with lots of special characters that the site tries to render in HTML instead of just displaying. So instead of (for example) a line which shows the code to get coloured text, you just get the coloured text. Not helpful.
There are many and varied explanations of how to do this, but I prefer this way which is cobbled together from multiple sources. For my epic Amiga Linux project I needed to be able to display commands to type in AND the outputs of commands. I wanted to have those blocks distinct from each other and the surrounding text. This is what I eventually came up with.
Go to the Design tab, and choose the Edit HTML section. You get a text box which behaves much in the same way as the post editting box. Scroll down until you get to a line which says:
Insert above that line the following text:
My workflow is then to copy the text I am working on into some website or other which will automatically convert all the special characters to their escape codes.
Then I paste the resulting text into the blog editing window in HTML mode. I then switch to compose mode, and change all of the code or output text into quotes. I then switch back to the HTML mode, copy all of the HTML text and paste it into a text editor.
I then do a search and replace all "/blockquote" entries for "/pre" and then "blockquote" for "pre class="postCode"". That converts all of the quotes to the code class that I defined above. It is black text (the colour is 00 for all RGB) on a nearly white background (ee in all RGB - ff for all would be completely white).
I then sift through the post and check for any postCode classes that I need to change to postOutput. That is nearly white text on a black background, which gives good contrast between the two texts. If I do actually want to quote something I do it last.
I end up with the following tag regime for the two types of quoted code:
There are many and varied explanations of how to do this, but I prefer this way which is cobbled together from multiple sources. For my epic Amiga Linux project I needed to be able to display commands to type in AND the outputs of commands. I wanted to have those blocks distinct from each other and the surrounding text. This is what I eventually came up with.
Go to the Design tab, and choose the Edit HTML section. You get a text box which behaves much in the same way as the post editting box. Scroll down until you get to a line which says:
]]></b:skin>
Insert above that line the following text:
.postCode{
background:#eeeeee;
border:1px solid #A6B0BF;
font-size:120%;
line-height:100%;
overflow:auto;
padding:10px;
color:#000000
}
.postOutput{
background:#000000;
border:1px solid #A6B0BF;
font-size:120%;
line-height:100%;
overflow:auto;
padding:10px;
color:#eeeeee
}My workflow is then to copy the text I am working on into some website or other which will automatically convert all the special characters to their escape codes.
Then I paste the resulting text into the blog editing window in HTML mode. I then switch to compose mode, and change all of the code or output text into quotes. I then switch back to the HTML mode, copy all of the HTML text and paste it into a text editor.
I then do a search and replace all "/blockquote" entries for "/pre" and then "blockquote" for "pre class="postCode"". That converts all of the quotes to the code class that I defined above. It is black text (the colour is 00 for all RGB) on a nearly white background (ee in all RGB - ff for all would be completely white).
I then sift through the post and check for any postCode classes that I need to change to postOutput. That is nearly white text on a black background, which gives good contrast between the two texts. If I do actually want to quote something I do it last.
I end up with the following tag regime for the two types of quoted code:
<pre class="postCode"> code </pre>or
<pre class="postOutput"> output </pre>
Sunday, 5 September 2010
LAP - All in One - Build Times
The actual process of compiling LFS the first time around is lengthy and painful pain in the arse. So it is pleasing to benchmark the time it takes to auto compile the whole lot. These are the relevant times for my i5-750 and the replacement i7-870 using the ramdisk:
Toolchain
750
real 27m30.622s
user 34m23.369s
sys 7m23.240s
870
real 26m41.127s
user 39m37.777s
sys 4m21.224s
Actual Build
750
real 36m3.964s
user 36m2.979s
sys 6m54.990s
870
real 36m8.174s
user 39m14.963s
sys 4m4.027s
Kernel
750
real 13m49.355s
user 7m13.171s
sys 0m33.742s
870
real 12m10.133s
user 9m14.311s
sys 0m35.246s
Hardware & Documentation
real 10mX.XXXs
I did not note down the exact time.
Xorg
real 41m25.104s
Yes, that means that Xorg took longer to compile than the whole LFS system, but it was being built on the USB Key itself, not in RAM. I expect this to drop by at least a third and potentially more if I can tweak the script to unpack and compile on the RAM disk.
Desktop Stuff
real 13m52.810s
user 10m20.872s
sys 1m32.297s
I have also worked out how to install firefox (and will post the full instructions when they are tidied up in due course). I also timed it and the results are:
Firefox (paused a bit and I missed it during plugins).
real 28m6.401s
user 22m36.031s
sys 1m11.702s
That WAS compiled from the ramdisk, and it is worth commenting that a single web browser takes nearly the same amount of time to compile as the rest of the operating system. Sheesh.
Toolchain
750
real 27m30.622s
user 34m23.369s
sys 7m23.240s
870
real 26m41.127s
user 39m37.777s
sys 4m21.224s
Actual Build
750
real 36m3.964s
user 36m2.979s
sys 6m54.990s
870
real 36m8.174s
user 39m14.963s
sys 4m4.027s
Kernel
750
real 13m49.355s
user 7m13.171s
sys 0m33.742s
870
real 12m10.133s
user 9m14.311s
sys 0m35.246s
Hardware & Documentation
real 10mX.XXXs
I did not note down the exact time.
Xorg
real 41m25.104s
Yes, that means that Xorg took longer to compile than the whole LFS system, but it was being built on the USB Key itself, not in RAM. I expect this to drop by at least a third and potentially more if I can tweak the script to unpack and compile on the RAM disk.
Desktop Stuff
real 13m52.810s
user 10m20.872s
sys 1m32.297s
I have also worked out how to install firefox (and will post the full instructions when they are tidied up in due course). I also timed it and the results are:
Firefox (paused a bit and I missed it during plugins).
real 28m6.401s
user 22m36.031s
sys 1m11.702s
That WAS compiled from the ramdisk, and it is worth commenting that a single web browser takes nearly the same amount of time to compile as the rest of the operating system. Sheesh.
LAP - All in One - Desktop
Now to install all the graphical odds and sods, run the following commands in a script:
Remember you need to nano [/etc/inittab] to change the default from '3' to '5'.
cd /dev/shm
tar -xzvf /sources/desktop/jpegsrc.v7.tar.gz
cd jpeg-7
./configure --prefix=/usr --enable-static --enable-shared
make
make install
cd ..
rm -rf jpeg-7
ldconfig
tar -xzvf /sources/desktop/slim-1.3.2.tar.gz
cd slim-1.3.2
sed -i -e "s:^MANDIR=.*:MANDIR=/usr/share/man:" -e "s:/usr/X11R6:/usr:" Makefile
sed -i -e 's#X11R6/##g' -e 's#/usr/bin:##' -e 's/# daemon/daemon/' slim.conf
make $CORES_TO_USE
make install
cat >> /etc/inittab << "EOF"
x:5:respawn:/usr/bin/slim >& /dev/null
EOF
cd ..
rm -rf slim-1.3.2
tar -xzvf /sources/desktop/cairo-1.8.10.tar.gz
cd cairo-1.8.10
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf cairo-1.8.10
tar -xjvf /sources/desktop/pcre-8.00.tar.bz2
cd pcre-8.00
./configure --prefix=/usr --docdir=/usr/share/doc/pcre-8.00 --enable-utf8 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2
make $CORES_TO_USE
make install
mv -v /usr/lib/libpcre.so.* /lib/
ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
cd ..
rm -rvf pcre-8.00
tar -xjvf /sources/desktop/glib-2.22.4.tar.bz2
cd glib-2.22.4
./configure --prefix=/usr --with-pcre=system
make $CORES_TO_USE
make $CORES_TO_USE install
cat > /etc/profile.d/glib2-locale.sh << "EOF"
# Use the current locale charset for filenames
# in applications using GLib
export G_FILENAME_ENCODING=@locale
EOF
cd ..
rm -rvf glib-2.22.4
tar -xjvf /sources/desktop/pango-1.26.2.tar.bz2
cd pango-1.26.2
./configure --prefix=/usr --sysconfdir=/etc
make $CORES_TO_USE
make install
cd ..
rm -rvf pango-1.26.2
tar -xjvf /sources/desktop/atk-1.28.0.tar.bz2
cd atk-1.28.0
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf atk-1.28.0
tar -xzvf /sources/desktop/tiff-3.9.2.tar.gz
cd tiff-3.9.2
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf tiff-3.9.2
tar -xjvf /sources/desktop/gtk+-2.18.7.tar.bz2
cd gtk+-2.18.7
./configure --prefix=/usr --sysconfdir=/etc
make $CORES_TO_USE
make install
install -v -m755 -d /usr/share/doc/gtk+-2.18.7/{faq,tutorial}
cp -v -R docs/faq/html/* /usr/share/doc/gtk+-2.18.7/faq
cp -v -R docs/tutorial/html/* /usr/share/doc/gtk+-2.18.7/tutorial
install -v -m644 docs/*.txt /usr/share/doc/gtk+-2.18.7
cd ..
rm -rvf gtk+-2.18.7
tar -xzvf /sources/desktop/libxml2-2.7.6.tar.gz
cd libxml2-2.7.6
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf libxml2-2.7.6
tar -xzvf /sources/desktop/openbox-3.4.11.1.tar.gz
cd openbox-3.4.11.1
./configure --prefix=/usr --sysconfdir=/etc --disable-startup-notification --disable-session-management
make $CORES_TO_USE
make install
cat > /root/.xinitrc << "EOF"
# Begin .xinitrc file
#xterm -g 80x20+0+0 &
#xclock -g 100x100-0+0 &
exec openbox-session
EOF
cd ..
rm -rvf openbox-3.4.11.1
mkdir -p /root/.config/openbox
cp /etc/xdg/openbox/*.* /root/.config/openbox
cat > ~/.config/openbox/menu.xml << "EOF"
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="apps-editors-menu" label="Editors">
<item label="nano">
<action name="Execute">
<command>xterm -e /usr/bin/nano</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-term-menu" label="Terminals">
<item label="Xterm">
<action name="Execute"><command>xterm</command></action>
</item>
</menu>
<menu id="apps-net-menu" label="Internet">
<item label="lynx">
<action name="Execute">
<command>xterm -e /usr/bin/lynx</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-multimedia-menu" label="Multimedia">
<item label="alsamixer">
<action name="Execute">
<command>xterm -e /usr/bin/alsamixer</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="system-menu" label="System">
<item label="Openbox Configuration Manager">
<action name="Execute">
<command>obconf</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<separator />
<item label="Reconfigure Openbox">
<action name="Reconfigure" />
</item>
</menu>
<menu id="root-menu" label="Openbox 3">
<separator label="Applications" />
<menu id="apps-editors-menu"/>
<menu id="apps-net-menu"/>
<menu id="apps-multimedia-menu"/>
<menu id="apps-term-menu"/>
<item label="E-UAE Emulator">
<action name="execute"><execute>/usr/bin/uae</execute></action>
</item>
<separator label="System" />
<menu id="system-menu"/>
<separator />
<item label="Log Out">
<action name="Exit">
<prompt>yes</prompt>
</action>
</item>
</menu>
</openbox_menu>
EOF
tar -xzvf /sources/extras/SDL-1.2.13.tar.gz
cd SDL-1.2.13
./configure --prefix=/usr
make $CORES_TO_USE
make install
install -v -m755 -d /usr/share/doc/SDL-1.2.13/html
install -v -m644 docs/html/*.html /usr/share/doc/SDL-1.2.13/html
ldconfig
cd ..
rm -rvf SDL-1.2.13Remember you need to nano [/etc/inittab] to change the default from '3' to '5'.
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
EOFAfter 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.
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.
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.rulesAfter 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:
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.shNext 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:
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.
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:
in ubuntu. Sorry:
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.
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.
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.
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.
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.
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.
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:
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:StorageYou 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!
Tuesday, 31 August 2010
LAP - Workbench 3.1 HDD Installation
The start of this installation is much easier. With the 3.1 rom and Workbench 3.1, you can easily format the disk. Start the procedure in exactly the same way as with 1.3. This time you get to name it first. Call it System again, in the New Volume Name box. You also want to tick the Trashcan, Fast File System and Directory Cache boxes. The international mode one will select itself. This is OK. Hit format a couple of times and it will get started.
Now run the Installation utility on the install disk. It should auto detect your System: hard disk and choose to install there. That's what we are after. Don't bother with printers and choose your language and keyboard appropriately.
It will then prompt you to insert the other disks in turn.
The most efficient way to install Workbench is to use all 4 drives (we set the config file to allow us to do this). You want to load the disks as follows:
df0:Install
df1:Workbench
df2:Locale
df3:Extras
When it asks for 'Fonts', use the GUI to change the drives to the following:
df0:Install
df1:Fonts
df2:Storage
Technically, we could now stop, and say that we have installed Workbench 3.1. After all we have reached the same point as Workbench 1.3. However, Workbench 3.1 can support a replacement graphics drivers, so lets install that now as well. The drivers let us use higher screen resolutions that the standard Amiga - hopefully native to our display.
As has become customary there are some dependencies, and we need to download these. Very basically, they are a program for uncompressing the downloaded archives and one for installing software.
You may need to retry a couple of those. The aminet system is not always available. Once these are downloaded boot to the Amiga Key and shift them to the ~/amiga/shared folder:
Now, run the Amiga 1200HD:
lha is the main amiga archiving program. Think 'tar'. Install it as follows:
This worked, but I got pointer trails which stuck around on the screen. I re-formatted the hard disk, reinstalled Workbench and installed the version of Picasso96 from the Green Amiga Alien's guide. I didn't get any trails with that version. I am not sure what the difference is, so I have left a command to download the aminet version above, but commented it out so pasting it to the command line will not do anything. Solving why one works and another does not is a an unsolved problem for the time being.
You can also add the A1200HD machine to the Openbox menu in the same way as with the A500HD. Under the menu-id="euae-menu" section we added last time, you would add in:
Now run the Installation utility on the install disk. It should auto detect your System: hard disk and choose to install there. That's what we are after. Don't bother with printers and choose your language and keyboard appropriately.
It will then prompt you to insert the other disks in turn.
The most efficient way to install Workbench is to use all 4 drives (we set the config file to allow us to do this). You want to load the disks as follows:
df0:Install
df1:Workbench
df2:Locale
df3:Extras
When it asks for 'Fonts', use the GUI to change the drives to the following:
df0:Install
df1:Fonts
df2:Storage
Technically, we could now stop, and say that we have installed Workbench 3.1. After all we have reached the same point as Workbench 1.3. However, Workbench 3.1 can support a replacement graphics drivers, so lets install that now as well. The drivers let us use higher screen resolutions that the standard Amiga - hopefully native to our display.
As has become customary there are some dependencies, and we need to download these. Very basically, they are a program for uncompressing the downloaded archives and one for installing software.
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/arc/lha.run wget http://uk.aminet.net/util/misc/Installer-43_3.lha #wget http://aminet.net/driver/video/Picasso96.lha wget http://guide.abime.net/wb3.1/files/Picasso96.lha
You may need to retry a couple of those. The aminet system is not always available. Once these are downloaded boot to the Amiga Key and shift them to the ~/amiga/shared folder:
cd /sources/amiga mv *.lha ~/amiga/shared mv *.run ~/amiga/shared
Now, run the Amiga 1200HD:
uae -G -f ~/amiga/A1200HD.uaercAnd open a shell window. I should point out at this stage that I am mostly following the excellently presented and written guide here. You should absolutely follow those instructions, which have been painstakingly researched, and carefully presented with step by step illustrations of every possible dialogue box that you may face. Contrast with with my instructions herein which mostly consist of copying and pasting text from LFS and BLFS while making puerile comments about package names, and raging incoherently as a result of my own, painful, limitations. What follows is but a summary of the Green Amiga Alien's excellent advice.
lha is the main amiga archiving program. Think 'tar'. Install it as follows:
protect Shared:lha.run +e Shared:lha.run ram:The first command changes the settings of the program lha.run which is on the Shared: device to allow us to [e]xecute it. The second executes the file. It directs the output to ram:, which is the ramdisk.
Copy ram:lha_68020 C:lhaA number of programs pop out, compiled for particular CPUs. We are using a 68020, so copy that one to [C:] (where system programs live) and call it [lha]. Next we are going to use the new lha to uncompress and install the installer program. This will let us install the other packages that are following shortly.
lha x Shared:Installer-43_3.lha ram: Copy ram:Installer43_3/Installer C:Picasso, as mentioned, is the native Amiga driver for the graphics card we are emulating. After it is installed we should get loads of new graphical modes to suit our modern screen.
lha x Shared:picasso96.lha ram:We are finished with the shell for a little while. if you now double click on the ramdisk you should see the Picasso folder. Open it up and run the setup program. You can answer 'yes' to most stuff. When asked about where to put the support files, choose system:storage. You then go to System->Prefs->ScreenMode, NOT Picasso96Mode. Choose a uaegfx: mode that suits your monitor's resolution.
This worked, but I got pointer trails which stuck around on the screen. I re-formatted the hard disk, reinstalled Workbench and installed the version of Picasso96 from the Green Amiga Alien's guide. I didn't get any trails with that version. I am not sure what the difference is, so I have left a command to download the aminet version above, but commented it out so pasting it to the command line will not do anything. Solving why one works and another does not is a an unsolved problem for the time being.
You can also add the A1200HD machine to the Openbox menu in the same way as with the A500HD. Under the menu-id="euae-menu" section we added last time, you would add in:
<item label="A1200HD"> <action name="Execute"><execute>/usr/bin/uae -G -f ~/amiga/A1200HD.uaerc</execute></action> </item>Pop this in before the line at the end of the "euae-menu" section:
</menu>
Monday, 30 August 2010
LAP - Workbench 1.3 HDD Installation
There is an obvious way to run Workbench 1.3 and that is by simply booting from the floppy disk like the vast majority of A500 users would have had to do. However, we are not so restricted with the emulator, and we have already set up a configuration with a hard disk. So let's install Workbench 1.3 to the hard disk.
This is tricky, because although we are only really copying two disks (the Workbench Disk and the Extras Disk), the a500 does not natively support a hard disk. What happened if you bought a hard disk for an a500 (such as the A590) was that it came with a some ROM software on it which allowed the disk to be recognised.
If you boot the A500HD system that we have configured, you won't see the Hard Disk. There is a work around for this, but it is a bit tricky, so lets take our time. What we are going to do is boot from a Kickstart 2.04 ROM (as found in the A500+) and use that to format the Hard Disk. We are then going to extract a file from the Workbench disk, and put it in our Roms directory. As best as I can guess this file effectively does the job of the ROM chip originally found on the A590.
So, what you need to do is put a Kickstart 2.04 ROM into the ~/amiga/roms directory. You then boot the A500HD...
...but use the GUI to swap from the Workbench 1.3 ROM to the 2.04 ROM. You also need to load the Workbench 1.3 disk into df0:.
Once Workbench has started up, the hard disk should now show up, as an icon with a funny name: "dh0: ndos". You select that and then choose Icon->Format from the top of the screen (hold down the right mouse button, move to the word Icon, move to the option Format in the drop down menu that appears, and let go of the mouse button). Say yes a couple of times, and it should start formatting.
Once you are done, select the new disk (now called "Empty") and choose Icon->Rename at the top and call it System. You can now shutdown the emulator. If you restart the A500HD system now it should revert to the 1.3 ROM, meaning that once again the hard disk will no longer be visible.
Now is the trickiest bit. We need to extract the file system information from the Workbench disk, and store a copy in the ~/amiga/roms directory. To get at the ~/amiga/roms directory from inside the Amiga, we need to mount it. Start up the A500HD system, and in the GUI, go to the Hard Disks tab, and choose 'add'. Then, in the dialogue box that pops up, choose select and navigate INTO the /root/amiga/roms directory. Then click OK. The path box should now show:
Then in the 'device name' box, put dh1 (the disk we just formatted is set up as dh0). In 'Volume name' put temp. Click OK and start the emulation.
Once it is up and running, double click on the Workbench 1.3 disk, and double click on 'shell' in the window that opens. From there run the following command to copy the file system information to the temporarily linked roms directory:
This [COPY]s the file [FastFileSystem] from the folder named [L] directory to the folder named [temp]. Note that the Amiga system assigns names to folders. The [L] folder is on df0:, but can be referred to simply as [L]. Equally, we could have (I think) copied to [dh1:] instead of [temp:] and it should not have made a difference. Next, quit the emulator, exit the GUI. Apparently we should now get access to the hard disk using the 1.3 ROM and 1.3 Workbench. Did I get access? Did I fuck.
I restarted the emulation and got no fucking hard disk the first few times. I carefully checked the messages coming from the xterm window from which I had started the emulator. The messages indicated that the emulator was looking for the file "FastFileSystem". I had the file "fastfilesystem". Bugger. I realised I had typed:
And it turns out that this is very case sensitive. I sorted out my mistake with the following:
The next time I booted, I got a shiny new System disk on the desktop. With 1.3 you do not get a fancy HDD icon. To install Workbench, with the Workbench disk in df0: and extras in df1:, open the 'shell' program again, and run:
Which seems to be perfectly sensible commands to me. Then quit the
shell:
And reboot. It should boot straight to the Workbench from the HDD. To boot straight to the Workbench 1.3 desktop you would amend the line in .xinitrc to read:
If you want to create a menu entry for openbox (assuming you installed it) you would add the following text to the [~/.config/openbox/menu.xml] file:
I would suggest sticking it between the Multimedia and System sections. You would then add the line...
... to the section at the end of the file, again between Multimedia and System.
This is tricky, because although we are only really copying two disks (the Workbench Disk and the Extras Disk), the a500 does not natively support a hard disk. What happened if you bought a hard disk for an a500 (such as the A590) was that it came with a some ROM software on it which allowed the disk to be recognised.
If you boot the A500HD system that we have configured, you won't see the Hard Disk. There is a work around for this, but it is a bit tricky, so lets take our time. What we are going to do is boot from a Kickstart 2.04 ROM (as found in the A500+) and use that to format the Hard Disk. We are then going to extract a file from the Workbench disk, and put it in our Roms directory. As best as I can guess this file effectively does the job of the ROM chip originally found on the A590.
So, what you need to do is put a Kickstart 2.04 ROM into the ~/amiga/roms directory. You then boot the A500HD...
uae -f ~/amiga/A500HD.uaerc
...but use the GUI to swap from the Workbench 1.3 ROM to the 2.04 ROM. You also need to load the Workbench 1.3 disk into df0:.
Once Workbench has started up, the hard disk should now show up, as an icon with a funny name: "dh0: ndos". You select that and then choose Icon->Format from the top of the screen (hold down the right mouse button, move to the word Icon, move to the option Format in the drop down menu that appears, and let go of the mouse button). Say yes a couple of times, and it should start formatting.
Once you are done, select the new disk (now called "Empty") and choose Icon->Rename at the top and call it System. You can now shutdown the emulator. If you restart the A500HD system now it should revert to the 1.3 ROM, meaning that once again the hard disk will no longer be visible.
Now is the trickiest bit. We need to extract the file system information from the Workbench disk, and store a copy in the ~/amiga/roms directory. To get at the ~/amiga/roms directory from inside the Amiga, we need to mount it. Start up the A500HD system, and in the GUI, go to the Hard Disks tab, and choose 'add'. Then, in the dialogue box that pops up, choose select and navigate INTO the /root/amiga/roms directory. Then click OK. The path box should now show:
/root/amiga/roms
Then in the 'device name' box, put dh1 (the disk we just formatted is set up as dh0). In 'Volume name' put temp. Click OK and start the emulation.
Once it is up and running, double click on the Workbench 1.3 disk, and double click on 'shell' in the window that opens. From there run the following command to copy the file system information to the temporarily linked roms directory:
COPY L:FastFileSystem temp:
This [COPY]s the file [FastFileSystem] from the folder named [L] directory to the folder named [temp]. Note that the Amiga system assigns names to folders. The [L] folder is on df0:, but can be referred to simply as [L]. Equally, we could have (I think) copied to [dh1:] instead of [temp:] and it should not have made a difference. Next, quit the emulator, exit the GUI. Apparently we should now get access to the hard disk using the 1.3 ROM and 1.3 Workbench. Did I get access? Did I fuck.
I restarted the emulation and got no fucking hard disk the first few times. I carefully checked the messages coming from the xterm window from which I had started the emulator. The messages indicated that the emulator was looking for the file "FastFileSystem". I had the file "fastfilesystem". Bugger. I realised I had typed:
COPY L:fastfilesystem temp:
And it turns out that this is very case sensitive. I sorted out my mistake with the following:
mv ~/amiga/roms/fastfilesystem ~/amiga/roms/FastFileSystem
The next time I booted, I got a shiny new System disk on the desktop. With 1.3 you do not get a fancy HDD icon. To install Workbench, with the Workbench disk in df0: and extras in df1:, open the 'shell' program again, and run:
COPY DF0: System: ALL COPY DF1: System: ALL
Which seems to be perfectly sensible commands to me. Then quit the
shell:
endcli
And reboot. It should boot straight to the Workbench from the HDD. To boot straight to the Workbench 1.3 desktop you would amend the line in .xinitrc to read:
exec /usr/bin/uae -G -f ~/amiga/A500HD.uaerc &
If you want to create a menu entry for openbox (assuming you installed it) you would add the following text to the [~/.config/openbox/menu.xml] file:
<menu id="euae-menu" label="Emulated Amigas"> <item label="A500HD"> <action name="Execute"><execute>/usr/bin/uae -G -f ~/amiga/A500HD.uaerc</execute></action> </item> </menu>
I would suggest sticking it between the Multimedia and System sections. You would then add the line...
<menu id="euae-menu"/>
... to the section at the end of the file, again between Multimedia and System.
Friday, 27 August 2010
LAP - E-UAE (Configuration)
We now have the Amiga Emulator up and running. We could now do just about everything we want to with the GUI configuration panel. However, a better option is to make configuration files for each different type of Amiga that we are going to be emulating.
First of all we are going to tidy up our /root folder. By now it is probably full of installation scripts. I would delete everything apart from the startx scripts, the compression instructions, and the wifi scripts. I made a new amiga folder to store the new settings and files:
The folder names should give away the nature of the contents. We will store the configuration files in the ~/amiga folder. The [shared] folder is going to be treated like a harddisk by the Amiga, so I can easily pass files to and from the Amiga. I have moved the disk and rom images to the appropriate folder.
I am going to set up four machines, an A500, an A1200 and the same two but with hard disks installed. The first thing I am going to do is to make the files that will be treated as harddisks. TO do this I am going to use linux's [dd] program. The program is used to copy stuff at a very low level. The commands are as follows:
The commands copy from the [i]nput [f]ile [/dev/zero] (which is obviously blank) to the [o]utput [f]ile named, in 512 [b]yte[s] chunks. For the A500 we use 40960 chunks of 512 bytes, which should get us a 20Mb disk. The A1200 should get a 40Mb file.
First of all, we'll create the simplest machine - the A500. The configuration file is just a text document, and the '#' comment tag works as normal. I am going to structure the file into theme'd sections. I'll start with the Disk drives, as these are the most likely to be changed in an edit. Then we'll have the Amiga hardware to be emulated. Next will be a section which governs the speed or accuracy of the emulator. After that is a section which relates to the hardware of the source system, and finally is a section which sets the default paths to the folders we have made.
The first time we do this, I'll comment on everything, and then on subsequent builds only the changes.
This loads two disk images. Workbench 1.3 comes on 2 disks, and I have renamed them to a and b. The emulator can handle 4 floppy disk drives, but by default only two work. You can peruse the documentation to see how to activate the other two, if you really want. We can use the [$(FILE_PATH)] instead of the absolute path to the files. We'll define the variable at the end of the file.
Note that we are [>>] appending to the file now, not [>] over writing. We are emulating a [68000] cpu for the A500. We are going to use the ecs_agnus chipset present in later A500's as it allows us to use more RAM. We need Kickstart 1.3 for the A500. We also are telling it to use 1Mb of chip ram. It is measured in 512Kb chunks - hence the [2]. We are not using any other types of RAM.
We are asking the machine to simulate the cpu at the normal speed. In other words no matter how powerful your machine the emulation should run at the speed of a real A500. If some software doesn't work you can flip [cpu_compatible] to true, and it will try to be even more exact, but potentially slower as well. If that still doesn't work, then you can flip the [cpu_cycle_exact] to true, which makes the cpu to chipset communications more precise.
The [cachesize] set to 0 diables the JIT system. This only works on 68020 cpu's so we do not need it. [immediate_blits] set to false makes sure the system doesn't cut some corners. Setting this to true may speed up the emulation. [collision_level=playfields] is about how precisely the emulation calculates collisions between objects (the player and a platform in a game for instance). The documentation explains how to change this if necessary.
The [gfx_framerate] tells it to show every frame. If this was 10, it would only show one frame in 10. The [sound_latency] sets the wiggle room the system has to synchronise the sound. [x11.low_bandwidth] if set to true reduces the information exchanged with the X server. It only updates the bits of the video which change from frame to frame. This ends up looking crap - as if you are using the system through VNC down a 56k modem line. [floppy_speed] is in %. You can increase it to as much as 800, but that may cause compatibility problems.
The [gfx_{width,height}_windowed] options set the size of the window. There are options for fullscreen resolution as well, but the documentation is honest enough to admit that does nothing. We want to boot straight to the Amiga, so we tell it to [fullscreen]. We do not want to see the X cursor - just the Amiga cursor, so we [hide_cursor]. The [show_leds] put a graphical representation of the floppy and HDD activity lights. It also reports the frame rate and cpu usage. The [sound] options are all pretty self explanatory. The Amiga had two ports for mice or joysticks. Here we tell it the mouse is connected to [joyport0]. We tell it [joyport1] has a joystick attached to it which is simulated by the arrow keys and the right CTRL as the fire button [kbd2]. There are other options which are set out in the docs. The [bsdsocket_emu] turns on the network sharing that we enabled back in the compilation of the emulator. The [x11.map_raw_keys] relates to how the keys on your PC are mapped to the keys in the simulated Amiga keyboard.
These settings just tell the emulator the default location for the various file types. That also finishes the configuration file. The A500 can now be emulated by:
This disables the [G]ui so that the emulator will start fullscreen.
Now for the HD version:
We have commented out the floppy so that it boots from the hard disk. It makes it easy to activate the disks to install workbench in the first place. The [hardfile2] activates the file we made as [dh0:]. No real idea what all the settings guff at the end does, but it seems to work. I have also installed 8Mb of fast ram, and upped the chip ram to 2Mb.
The Workbench floppies are there as suggestions. The [a] disk is the install for 3.1, and the [b] disk is the normal 'workbench' disk. The CPU type and chipset match the hardware in the A1200. We also use 2Mb [4]x512k of chipram. We switch to Kickstart 3.1. We change CPU speed to [max] because we do not want to be restricted to running at the speed of a A500. We have also changed the [cachesize] to 8192 (meaning 8Mb) which activates the JIT compiler. The rest is the same.
And lastly, the HD version, which is going to be the most powerful.
The first change is the [floppy{2,3}type] option. By default df2: and df3: are deactivated. By setting their types to '0' we activate them. I know that sounds unintuitive, but a setting of -1 means deactivated. We want as many active floppies as possible for doing stuff like installing Workbench. I have commented out the Workbench disks, as they should not be needed on a regular basis. Best to refer to them though, so we can quickly activate them if the HDD corrupts.
We have had to switch to the 68020 CPU rather than the cut down 68ec020 that is actually in the A1200. The reason is that we need 32 bit memory addressing rather than 24 bit memory addressing
to support the extra memory [z3mem] and [gfxcard] we are going to use. The Z3 memory emulates memory being added in a Zorro III slot. The gfxcard memory is going to be used by the Picasso96 emulated graphics card to get a high resolution desktop. There were expansion cards for the A1200 which supplied a full 68020 and 256Mb of Zorro III ram, so this is historically accurate.
To boot straight into the Amiga, add this to .xinitrc before the openbox-session line:
First of all we are going to tidy up our /root folder. By now it is probably full of installation scripts. I would delete everything apart from the startx scripts, the compression instructions, and the wifi scripts. I made a new amiga folder to store the new settings and files:
mkdir ~/amiga mkdir ~/amiga/roms mkdir ~/amiga/disks mkdir ~/amiga/harddisks mkdir ~/amiga/shared
The folder names should give away the nature of the contents. We will store the configuration files in the ~/amiga folder. The [shared] folder is going to be treated like a harddisk by the Amiga, so I can easily pass files to and from the Amiga. I have moved the disk and rom images to the appropriate folder.
I am going to set up four machines, an A500, an A1200 and the same two but with hard disks installed. The first thing I am going to do is to make the files that will be treated as harddisks. TO do this I am going to use linux's [dd] program. The program is used to copy stuff at a very low level. The commands are as follows:
dd if=/dev/zero of=~/amiga/harddisks/A500_hdd.hdf bs=512 count=40960 dd if=/dev/zero of=~/amiga/harddisks/A1200_hdd.hdf bs=512 count=81920
The commands copy from the [i]nput [f]ile [/dev/zero] (which is obviously blank) to the [o]utput [f]ile named, in 512 [b]yte[s] chunks. For the A500 we use 40960 chunks of 512 bytes, which should get us a 20Mb disk. The A1200 should get a 40Mb file.
First of all, we'll create the simplest machine - the A500. The configuration file is just a text document, and the '#' comment tag works as normal. I am going to structure the file into theme'd sections. I'll start with the Disk drives, as these are the most likely to be changed in an edit. Then we'll have the Amiga hardware to be emulated. Next will be a section which governs the speed or accuracy of the emulator. After that is a section which relates to the hardware of the source system, and finally is a section which sets the default paths to the folders we have made.
The first time we do this, I'll comment on everything, and then on subsequent builds only the changes.
cat > ~/amiga/A500.uaerc << "EOF" #Disks Files floppy0=$(FILE_PATH)/1.3a.adf floppy1=$(FILE_PATH)/1.3b.adf EOF
This loads two disk images. Workbench 1.3 comes on 2 disks, and I have renamed them to a and b. The emulator can handle 4 floppy disk drives, but by default only two work. You can peruse the documentation to see how to activate the other two, if you really want. We can use the [$(FILE_PATH)] instead of the absolute path to the files. We'll define the variable at the end of the file.
cat >> ~/amiga/A500.uaerc << "EOF" #Amiga Hardware cpu_type=68000 chipset=ecs_agnus kickstart_rom_file=$(FILE_PATH)/1.3.rom chipmem_size=2 bogomem_size=0 fastmem_size=0 z3mem_size=0 gfxcard_size=0 EOF
Note that we are [>>] appending to the file now, not [>] over writing. We are emulating a [68000] cpu for the A500. We are going to use the ecs_agnus chipset present in later A500's as it allows us to use more RAM. We need Kickstart 1.3 for the A500. We also are telling it to use 1Mb of chip ram. It is measured in 512Kb chunks - hence the [2]. We are not using any other types of RAM.
cat >> ~/amiga/A500.uaerc << "EOF" #Performance cpu_speed=real cpu_compatible=false cpu_cycle_exact=false cachesize=0 immediate_blits=false collision_level=playfields gfx_framerate=1 sound_latency=100 x11.low_bandwidth=false floppy_speed=100 EOF
We are asking the machine to simulate the cpu at the normal speed. In other words no matter how powerful your machine the emulation should run at the speed of a real A500. If some software doesn't work you can flip [cpu_compatible] to true, and it will try to be even more exact, but potentially slower as well. If that still doesn't work, then you can flip the [cpu_cycle_exact] to true, which makes the cpu to chipset communications more precise.
The [cachesize] set to 0 diables the JIT system. This only works on 68020 cpu's so we do not need it. [immediate_blits] set to false makes sure the system doesn't cut some corners. Setting this to true may speed up the emulation. [collision_level=playfields] is about how precisely the emulation calculates collisions between objects (the player and a platform in a game for instance). The documentation explains how to change this if necessary.
The [gfx_framerate] tells it to show every frame. If this was 10, it would only show one frame in 10. The [sound_latency] sets the wiggle room the system has to synchronise the sound. [x11.low_bandwidth] if set to true reduces the information exchanged with the X server. It only updates the bits of the video which change from frame to frame. This ends up looking crap - as if you are using the system through VNC down a 56k modem line. [floppy_speed] is in %. You can increase it to as much as 800, but that may cause compatibility problems.
cat >> ~/amiga/A500.uaerc << "EOF" #Host Hardware gfx_width_windowed=720 gfx_height_windowed=568 gfx_fullscreen_amiga=true hide_cursor=true show_leds=true sound_output=normal sound_bits=16 sound_frequency=44100 sound_channels=stereo joyport0=mouse joyport1=kbd2 bsdsocket_emu=true x11.map_raw_keys=false EOF
The [gfx_{width,height}_windowed] options set the size of the window. There are options for fullscreen resolution as well, but the documentation is honest enough to admit that does nothing. We want to boot straight to the Amiga, so we tell it to [fullscreen]. We do not want to see the X cursor - just the Amiga cursor, so we [hide_cursor]. The [show_leds] put a graphical representation of the floppy and HDD activity lights. It also reports the frame rate and cpu usage. The [sound] options are all pretty self explanatory. The Amiga had two ports for mice or joysticks. Here we tell it the mouse is connected to [joyport0]. We tell it [joyport1] has a joystick attached to it which is simulated by the arrow keys and the right CTRL as the fire button [kbd2]. There are other options which are set out in the docs. The [bsdsocket_emu] turns on the network sharing that we enabled back in the compilation of the emulator. The [x11.map_raw_keys] relates to how the keys on your PC are mapped to the keys in the simulated Amiga keyboard.
cat >> ~/amiga/A500.uaerc << "EOF" #Defaults unix.rom_path=~/amiga/roms unix.floppy_path=~/amiga/disks unix.hardfile_path=~/amiga/harddisks unix.savestate_path=~/amiga/saves EOF
These settings just tell the emulator the default location for the various file types. That also finishes the configuration file. The A500 can now be emulated by:
uae -G -f ~/amiga/A500.uaerc
This disables the [G]ui so that the emulator will start fullscreen.
Now for the HD version:
cat > ~/amiga/A500HD.uaerc << "EOF" #Disks Files #floppy0=$(FILE_PATH)/1.3a.adf #floppy1=$(FILE_PATH)/1.3b.adf hardfile2=rw,dh0:/root/amiga/harddisks/A500_hdd.hdf,32,1,2,512,1, #Amiga Hardware cpu_type=68000 chipset=ecs_agnus kickstart_rom_file=$(FILE_PATH)/1.3.rom chipmem_size=4 bogomem_size=0 fastmem_size=8 z3mem_size=0 gfxcard_size=0 #Performance cpu_speed=real cpu_compatible=false cpu_cycle_exact=false cachesize=0 immediate_blits=false collision_level=playfields gfx_framerate=1 sound_latency=100 x11.low_bandwidth=false floppy_speed=100 #Host Hardware gfx_width_windowed=720 gfx_height_windowed=568 gfx_fullscreen_amiga=true hide_cursor=true show_leds=true sound_output=normal sound_bits=16 sound_frequency=44100 sound_channels=stereo joyport0=mouse joyport1=kbd2 bsdsocket_emu=true x11.map_raw_keys=false #Defaults unix.rom_path=~/amiga/roms unix.floppy_path=~/amiga/disks unix.hardfile_path=~/amiga/harddisks unix.savestate_path=~/amiga/saves EOF
We have commented out the floppy so that it boots from the hard disk. It makes it easy to activate the disks to install workbench in the first place. The [hardfile2] activates the file we made as [dh0:]. No real idea what all the settings guff at the end does, but it seems to work. I have also installed 8Mb of fast ram, and upped the chip ram to 2Mb.
cat > ~/amiga/A1200.uaerc << "EOF" #Disks Files #floppy0=$(FILE_PATH)/3.1b.adf #floppy1=$(FILE_PATH)/3.1a.adf #Amiga Hardware cpu_type=68ec020 chipset=aga kickstart_rom_file=$(FILE_PATH)/3.1.rom chipmem_size=4 bogomem_size=0 fastmem_size=0 z3mem_size=0 gfxcard_size=0 #Performance cpu_speed=max cpu_compatible=false cpu_cycle_exact=false cachesize=8192 immediate_blits=false collision_level=playfields gfx_framerate=1 sound_latency=100 x11.low_bandwidth=false floppy_speed=100 #Host Hardware gfx_width_windowed=720 gfx_height_windowed=568 gfx_fullscreen_amiga=true hide_cursor=true show_leds=true sound_output=normal sound_bits=16 sound_frequency=44100 sound_channels=stereo joyport0=mouse joyport1=kbd2 bsdsocket_emu=true x11.map_raw_keys=true #Defaults unix.rom_path=~/amiga/roms unix.floppy_path=~/amiga/disks unix.hardfile_path=~/amiga/harddisks unix.savestate_path=~/amiga/saves EOF
The Workbench floppies are there as suggestions. The [a] disk is the install for 3.1, and the [b] disk is the normal 'workbench' disk. The CPU type and chipset match the hardware in the A1200. We also use 2Mb [4]x512k of chipram. We switch to Kickstart 3.1. We change CPU speed to [max] because we do not want to be restricted to running at the speed of a A500. We have also changed the [cachesize] to 8192 (meaning 8Mb) which activates the JIT compiler. The rest is the same.
And lastly, the HD version, which is going to be the most powerful.
cat > ~/amiga/A1200HD.uaerc << "EOF" #Disk Files #floppy0=$(FILE_PATH)/3.1b.adf #floppy1=$(FILE_PATH)/3.1a.adf floppy2type=0 floppy3type=0 hardfile2=rw,dh0:/root/amiga/harddisks/A1200_hdd.hdf,32,1,2,512,1, filesystem2=rw,dh1:Shared:/root/amiga/shared,0 #Amiga Hardware cpu_type=68020 chipset=aga kickstart_rom_file=$(FILE_PATH)/3.1.rom chipmem_size=4 bogomem_size=0 fastmem_size=0 z3mem_size=256 gfxcard_size=32 #Performance cpu_speed=max cpu_compatible=false cpu_cycle_exact=false cachesize=8192 immediate_blits=false collision_level=playfields gfx_framerate=1 sound_latency=100 x11.low_bandwidth=false floppy_speed=100 #Host Hardware gfx_width_windowed=720 gfx_height_windowed=568 gfx_fullscreen_amiga=true hide_cursor=true show_leds=true sound_output=normal sound_bits=16 sound_frequency=44100 sound_channels=stereo joyport0=mouse joyport1=kbd2 bsdsocket_emu=true x11.map_raw_keys=false #Defaults unix.rom_path=~/amiga/roms unix.floppy_path=~/amiga/disks unix.hardfile_path=~/amiga/harddisks unix.savestate_path=~/amiga/saves EOF
The first change is the [floppy{2,3}type] option. By default df2: and df3: are deactivated. By setting their types to '0' we activate them. I know that sounds unintuitive, but a setting of -1 means deactivated. We want as many active floppies as possible for doing stuff like installing Workbench. I have commented out the Workbench disks, as they should not be needed on a regular basis. Best to refer to them though, so we can quickly activate them if the HDD corrupts.
We have had to switch to the 68020 CPU rather than the cut down 68ec020 that is actually in the A1200. The reason is that we need 32 bit memory addressing rather than 24 bit memory addressing
to support the extra memory [z3mem] and [gfxcard] we are going to use. The Z3 memory emulates memory being added in a Zorro III slot. The gfxcard memory is going to be used by the Picasso96 emulated graphics card to get a high resolution desktop. There were expansion cards for the A1200 which supplied a full 68020 and 256Mb of Zorro III ram, so this is historically accurate.
To boot straight into the Amiga, add this to .xinitrc before the openbox-session line:
exec /usr/bin/uae -G -f ~/amiga/[whatever].uaerc &
Thursday, 26 August 2010
LAP - E-UAE (Install)
Now, download the disk format library into the /sources/amiga folder by using the LiveCD:
Hit enter to exit the program once 100% download has been reached. We have to use the [O] option which saves the download to the file we name after the [O] because otherwise we get a stupidly named file. The downside is we apparently need to exit the download manually by hitting enter.
In order to test the IPF support, you will obviously need a disk image in IPF format. One of the best places to legally download these is the Dream 17 website. Dream 17 have permission from the Amiga developer Team 17 to distribute their games. You should download these in IPF format - if you can. I chose to test this with Alien Breed. Once I had downloaded the images, I uncompressed the archive and copied them into the root folder on the Amiga key with sensible names.
That is a hell of a lot more options that we have used before. Lets look at the extra ones. [jit] allows the emulator to execute 68020 code natively on your CPU. This speeds up the a1200 operation but does nothing for an a500. [natmem] works alongside [jit] and gives the emulation direct access to your system RAM. [autoconfig] turns out not to be what I thought it was. Instead of autoconfiguring the emulator, this instead autoconfigures the emulated machine to use virtual hardware that you add. Probably didn't need this before.
[threads] lets the emulator make use of any extra cores your CPU may have. [aga] allows emulation of the chipset of the a1200. [scsi-device] gets disabled because I do not intend to emulate any scsi devices AND because it has dependencies that we have not met when building the system. [bsdsock] lets the emulated amiga use the linux network connection. Essential to get internet. [caps] tells it to build in support for the IPF disk format, and [caps-prefix] tells it where to find the files we just downloaded an uncompressed. [alsa] and [x] should be self explanatory.
Lets just check it found the caps/IPF stuff:
And test it with the IPF image you chose at the beginning (I went for Alien Breed):
That did not work. I got a warning dialogue and the following message:
Right, we must have to install from the IPF source as well as compiling it into e-uae. There is a readme file for the IPF source and it has the instructions for installing the library. No configure/make stuff required. We just copy the library straight to /usr/lib.
I then ran the test again and it now works just fine. Now, finally, install e-uae and copy the documentation:
Now clean up:
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 -O ipfdevlib_linux.tgz -- http://www.softpres.org/_media/files:ipfdevlib_linux.tgz?id=download&cache=cache
Hit enter to exit the program once 100% download has been reached. We have to use the [O] option which saves the download to the file we name after the [O] because otherwise we get a stupidly named file. The downside is we apparently need to exit the download manually by hitting enter.
In order to test the IPF support, you will obviously need a disk image in IPF format. One of the best places to legally download these is the Dream 17 website. Dream 17 have permission from the Amiga developer Team 17 to distribute their games. You should download these in IPF format - if you can. I chose to test this with Alien Breed. Once I had downloaded the images, I uncompressed the archive and copied them into the root folder on the Amiga key with sensible names.
cd /sources/amiga tar -xzvf ipfdevlib_linux.tgz tar -xjvf e-uae-0.8.29-WIP4.tar.bz2 cd e-uae-0.8.29-WIP4 ./configure --prefix=/usr --enable-jit --enable-natmem \ --enable-autoconfig --enable-threads --with-sdl-gfx \ --enable-aga --disable-scsi-device --enable-bsdsock --with-caps \ --with-caps-prefix=/sources/amiga/ipfdevlib_linux --with-alsa \ --with-x | tee config_report.txt
That is a hell of a lot more options that we have used before. Lets look at the extra ones. [jit] allows the emulator to execute 68020 code natively on your CPU. This speeds up the a1200 operation but does nothing for an a500. [natmem] works alongside [jit] and gives the emulation direct access to your system RAM. [autoconfig] turns out not to be what I thought it was. Instead of autoconfiguring the emulator, this instead autoconfigures the emulated machine to use virtual hardware that you add. Probably didn't need this before.
[threads] lets the emulator make use of any extra cores your CPU may have. [aga] allows emulation of the chipset of the a1200. [scsi-device] gets disabled because I do not intend to emulate any scsi devices AND because it has dependencies that we have not met when building the system. [bsdsock] lets the emulated amiga use the linux network connection. Essential to get internet. [caps] tells it to build in support for the IPF disk format, and [caps-prefix] tells it where to find the files we just downloaded an uncompressed. [alsa] and [x] should be self explanatory.
Lets just check it found the caps/IPF stuff:
cat config_report.txt | grep caps
checking caps/capsimage.h usability... yes checking caps/capsimage.h presence... yes checking for caps/capsimage.h... yesWell, thats good.
make $CORES_TO_USETest it:
./src/uae -r ~/1.3.rom -0 ~/1.3.adf
And test it with the IPF image you chose at the beginning (I went for Alien Breed):
./src/uae -r ~/1.3.rom -0 ~/ab1.ipf
That did not work. I got a warning dialogue and the following message:
Unable to open libcapsimage.so.2 .Failed to load CAPS plug-in.
Right, we must have to install from the IPF source as well as compiling it into e-uae. There is a readme file for the IPF source and it has the instructions for installing the library. No configure/make stuff required. We just copy the library straight to /usr/lib.
cp -v ../ipfdevlib_linux/lib/i686/libcapsimage.so.2.0 /usr/lib/ ldconfig
I then ran the test again and it now works just fine. Now, finally, install e-uae and copy the documentation:
make install install -v -d -m755 /usr/share/doc/e-uae install -v -m644 docs/* /usr/share/doc/e-uae
Now clean up:
cd .. rm -rvf e-uae-0.8.29-WIP4 rm -rvf ipfdevlib_linux
Subscribe to:
Posts (Atom)