Hi all,
It worked finally! After going through this entire ordeal, I think it is worth describing how I fixed the problems and what exactly were my constraints.
===========================
Resources That Were Available To Me
===========================
a. Altera Quartus II Full FIXEDPC license For Linux
b. Free Distros: CentOS, Fedora
c. ByteBlaster II cable only
=========================================
How To Install And Make QII8.0 Work In This Environment
=========================================
1. I realized that CentOS was more compatible with RHEL compared to Fedora. So I shifted to CentOS and installed the latest CentOSv5.2.
2. Installed Quartus II 8.0 on CentOS 5.2. It worked very well but was unable to install BBII.
3. BBII is ported only on kernel 2.4 which corresponds to CentOS 3.9. I didn't want to shift to CentOS 3.9 as I really liked CentOS 5.2. Besides shifting to such an old kernel only for BBII didn't make much sense to me.
4. I installed VMWare server and created a virtual machine of RHEL 3. I then installed CentOS 3.9 on this virtual machine.
5. So far so good. But it unable to detect parallel port (for which I indulged in this entire exercise). The fix that I used is this. Log in as root in the terminal and execute these (it gives permissions for parallel port to VMWare):
[root@c109-02a byteblaster]# /sbin/rmmod lp
[root@c109-02a byteblaster]# /sbin/modprobe ppdev
[root@c109-02a byteblaster]# chmod 666 /dev/parport0
Parallel port worked on VMWare thereafter.
6. Installed Quartus II 8.0 on CentOS 3.9 with appropriate changes in license file (for example, changing paths and server name etc.). Quartus II worked.
7. To install ByteBlaster, I tried following procedure given in ug_bbii.pdf. ./configure could recognise the kernel as 2.4 but asked for the modeversions.h file. Here are the fixes (try them one by one):
a. Open ./configure in some text editor. You will see a section of the code which searched for the modversions.h file. Find out where is the modversions.h file in your kernel. Then, add an additional option in the ./configure for the actual path of modversions.h file in your kernel. For example, in my case, this file was in /usr/src/linux-2.4.21-50.EL.asp/include/linux so I added this path in ./configure file. Following this ./configure worked well and gave following output.
[root@c109-02a byteblaster]# ./configure
Using kernel headers from /usr/src/linux-2.4.21-50.EL.asp/include/
Installing ByteBlasterMV module into /lib/modules/2.4.21-50.EL/
b. Then type 'make'. You should get following output:
[root@c109-02a byteblaster]# make
cc -D__KERNEL__ -DMODULE -D__SMP__ -O3 -Wall -I/usr/src/
linux-2.4.21-50.EL.asp/include/ -DMODVERSIONS -include /usr/src/
linux-2.4.21-50.EL.asp/include//linux/modversions.h -c -o
byteblaster.o byteblaster.c
c. If you do 'make install' it is possible that you may get some errors which say that there is a mismatch of kernel. There is a 3-step procedure for this.
c1. Type 'uname -r' and note the name of the kernel. For example, it gave the output as '2.4.21-50.EL' in my case while the installed kernel source was '2.4.21-50.EL.asp'. You can find out which kernel-source is installed by typing
rpm -qa | grep kernel
in the terminal.
Now, open "Makefile" in the kernel source directory (/usr/src/linux-2.4.21-50.EL.asp/) and chang the line 4 from
EXTRAVERSION = 50.EL.aspcustom
to
EXTRAVERSION = 50.EL
c2. If this doesn't help (as it didn't in my case), change the UTS_RELEASE in /usr/src/linux-2.4/include/linux/version.h to match the output of "uname -r" on the command line (it was 2.4.21-50.EL).
c3. If you still get errors during 'make install' (as it happened to me), then install the correct kernel-source itself. That means you need a file like kernel-source.2.4.21-50.EL.i386.rpm (which you can get from rpm sources on web; be careful, don't use file with extension .src.rpm - they are only binaries -, but the ones with extension <platform>.rpm where platform could be i386 etc.). Install the rpm:
rpm -Uvh <package>.rpm
If you get errors that a newer version of the source is already installed, use the following command to install the older version anyways:
rpm -Uvh --oldpackage <package>.rpm
d. You are all set to install the driver from scratch now. Follow './configure', 'make clean', 'make' and 'make install' in this order.
'make install' should yield following output now:
[root@c109-02a byteblaster]# make install
install -d /lib/modules/2.4.21-50.EL/kernel/misc/
install -c byteblaster.o /lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o
install -c jtagd-init /etc/rc.d/init.d/jtagd
/sbin/chkconfig --add jtagd
/sbin/depmod -aq
/etc/rc.d/init.d/jtagd start
Starting ByteBlaster driver:
e. After this you can check if the driver is installed or not. First create jtag.conf either as a user or root. Then plug-in BBII on the parallel port of your computer and connect it to your powered-up board.
[kvm@c109-02a kvm]$ touch ~/.jtag.conf
[kvm@c109-02a kvm]$ jtagconfig --add byteblaster2 /dev/byteblaster0
[kvm@c109-02a kvm]$ jtagconfig
1) ByteBlasterII [/dev/parport0]
171280DD EPM3128A/7128AE
020050DD EP1S40/_HARDCOPY_FPGA_PROTOTYPE
020050DD EP1S40/_HARDCOPY_FPGA_PROTOTYPE
Bingo! Everything works now. You can also check it from the 'Hardware Setup' option of Quartus II programmer.
Kumar Vijay Mishra.