Install Fedora Core 3 and Latest Version emstar/emtos
September 07, 2005
Jianping Wang
Acknowledge: This document is adopted from the document “Installing Fedora 3 & Building emstar-2.0” found at http://www.isi.edu/~fstann/papers/BuildingEmstar2.0InFedora3.pdf.
Note: It is assumed that you have basic Linux experience, such as installing system and executing commands, that is required to use this document. A lot of details are omitted in this document since you are assumed to know about them.
Install Fedora Core 3
The latest version of Fedora is Fedora Core 4. Since Fedora Core 3 has been used and discussed intensively and new discussion on installing emstar on Fedora Core 4, we choose Fedora Core 3.
When installing Fedora Core 3, choose (omit normal selections):
Installation Type: Workstation
Firewall Configuration: No firewall. Enable SELinux?: Warn
Package Installation Defaults: Choose “Customize software package to be installed” and include the following packages (copied from referred document):
Engineering and Scientific
Editors (details – Xemacs)
Authors & Publishing
Office/Productivity (details – xpdf & tetex-xdvi)
Development Tools
X Software Development
Gnome developer software
Note: Unselect “openoffice.org” and “openoffice.org-i18n” in “Office/Productivity” package, that causes installation error on my machines.
Install GPG keys
#rpm --import http://www.fedora.us/FEDORA-GPG-KEY
#rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY
Install Fedora Core 3 source code
Download source rpm file kernel-2.6.9-1.667.src.rpm from
http://download.fedora.redhat.com/pub/fedora/linux/core/3/SRPMS/
rpm –ivh kernel-2.6.9-1.667.src.rpm (“install the rpm”)
cd /usr/src/redhat/SPECS/
rpmbuild –v –bp --target=i686 kernel-2.6.spec
(The patched kernel source tree is created under /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9)
ln –s /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 /usr/src/linux
cd /usr/src/linux/config; cp kernel-2.6.9-i686.config ./.config
cd /usr/src/linux;make
Note: It seems that above “make” operation is not necessary for compiling and building FUSD.
Install emstar/emtos
Refer to emStar installation webpage: http://cvs.cens.ucla.edu/emstar/install.html, to finish the following tasks:
Download cgic library file cgic205.tar.gz from http://www.boutell.com/cgic/, unzip it and obtains sub-directory cgic205:
cd cgic205
make
make install
Download AVR tool file avr-3.3-platform.tgz, unzip it under directory /.
Download nesC compiler tool file nesc-1.1-platform.tgz, unzip it under directory /.
Download latest emstar package (don’t download emstar-2.1 package which is a release version but out-ot-date) by following the instruction at http://cvs.cens.ucla.edu/emstar/downloads.html, which creates a sub-directory: emstar.
cd ~/emstar
edit Make.conf to set the following parameters:
set NATIVE_KERNEL_HEADERS to /lib/modules/2.6.9-1.667/build/include
set BUILD_KMODULES to 0
set BUILD_EMTOS to 1
make
cd ~/emstar/fusd/kfusd
make –C /usr/src/linux SUBDIRS=$PWD modules
make –C /usr/src/linux SUBDIRS=$PWD modules_install
Note: (not recommend) Each time if you want to load kfusd.ko module, do
cd ~/emstar/fusd/kfusd
insmod kfusd.ko
cd ~/emstar/obj.i686-linux/fusd
./fusdd
lsmod | grep kfusd (check, should see kfusd listed)
cat /proc/devices | grep fusd (check, should see fusd0 listed)
dmesg | tail (should see something similar as below)
fusd: starting, $Revision: 1.113 $, fusd: Allocated new major 242 (fusd0)
Note: (recommend) To start FUSD on boot, do
cd !/emstar
make install-fusd
Note: The following changes must be made in Makefile so that above command can run successfully:
Under the target tag “install-fusd”, change “cp –f $(OBJDIR)/fusd/kfusd.ko /lib/mofules/$(KERNELVERSION)/kernel/misc || true” to “cp –f fusd/kfusd/kfusd.ko /lib/mofules/$(KERNELVERSION)/kernel/misc || true”; change “cp –f $(OBJDIR)/fusd/kfusd.o /lib/mofules/$(KERNELVERSION)/kernel/misc || true” to “cp –f fusd/kfusd/kfusd.o /lib/mofules/$(KERNELVERSION)/kernel/misc || true”.
Under the target tag “install-fusd”, change “/sbin/insmod kfusd” to “/sbin/modprobe kfusd”.
cp ~/emstar/fusd/initscripts/fusdd-redhat /etc/init.d/fusdd
/sbin/chkconfig --add fusdd
reboot
Share with your friends: |