5. Installation of Adeos m3
===========================

5.1 Source
----------
* Linux-Kernel 2.4.20
   http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.20.tar.z2
* Adeos m3
   http://savannah.gnu.org/download/adeos/releases/adeos-m3.tar.gz

5.2 Extracting
--------------
# cd /usr/src/

* Remove existing links
# rm linux
# rm linux-2.4

* Copy the files into the directory /usr/src/
# cp /tmp/linux-2.4.20.tar.bz2 .
# cp /tmp/adeos-m3.tar.gz .

* Test the files (note that older tar versions use -tIf for .bz2 files)
# tar -tjf linux-2.4.20.tar.bz2
# tar -tzf adeos-m3.tar.gz

* Extract the files (note that older tar versions use -xIf for .bz2 files)
# tar -xjf linux-2.4.20.tar.bz2
# tar -xzf adeos-m3.tar.gz

* Change owner
# chown -R root:root linux-2.4.20/
# chown -R root:root adeos-m3/

5.3 Patching
------------
* Rename and Create new links
# mv linux-2.4.20/ linux-2.4.20-adeos-m3
# ln -s linux-2.4.20-adeos-m3/ linux
# ln -s linux-2.4.20-adeos-m3/ linux-adeos
# ln -s adeos-m3/ adeos
# cd linux/

* Test kernel patch (should run without errors)
# patch -p1 --dry-run < ../adeos/patches/linux/adeos-linux-2.4.20-r8.diff

* Perform patch
# patch -p1 < ../adeos/patches/linux/adeos-linux-2.4.20-r8.diff

5.4 Kernel Configuration
------------------------
# cd /usr/src/linux/
# make menuconfig
* General setup
+ Adeos support
+ Adeos domain mutex support (note that the latest 2.6 patches have mutex support integrated by default)

# cp .config my_config
# make mrproper
# cp my_config .config
# make oldconfig
# make dep
# make

5.5 Kernel Installation
-----------------------
* Create a kernel image
# make bzImage

* Copy the image into the boot partition
# cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.20-adeos-m3

* Make and install kernel modules
# make modules modules_install

5.6 LILO Configuration
----------------------
* Add an entry for adeos:
# vi /etc/lilo.conf
+ image=/boot/vmlinuz-2.4.20-adeos-m3
+	label=adeos
+	read-only
+	root=/dev/hda2

* Update changes
# lilo

5.7 Adeos Configuration
-----------------------
* Installing latex
a) GUI
  # redhat-config-packages
  + Authoring and Publishing
b) console
  * Insert Red Hat Cdrom 3
  # mount /mnt/cdrom
  # cd /mnt/cdrom/RedHat/RPMS/
  # rpm -iv tetex-fonts-1.0.7-66.i386.rpm
  # rpm -iv tetex-1.0.7-66.i386.rpm
  # rpm -iv tetex-latex-1.0.7-66.i386.rpm
  # rpm -iv tetex-dvips-1.0.7-66.i386.rpm

* Configuration
# cd /usr/src/adeos/
# ./configure
# make all

5.8 Adeos Installation
----------------------
# make install

5.9 Reboot
----------
# lilo -R adeos
# reboot

5.10 Example simple
-------------------
# cd /usr/src/adeos/platforms/linux/examples/simple/
# make
# insmod adtest.o
* ADEOS: Domain TestDomain registered.
* Domain TestDomain started on CPU#0 (iflag=1).
# rmmod adtest
* ADEOS: Domain TestDomain unregistered.
* ADTEST ON CPU#0:
*	123 TIMER TICKS ON IRQ #0
*	123 DSWITCH CALLS