Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20707 Discussions

ByteBlaster II installation in CentOS 5.2

Altera_Forum
Honored Contributor II
1,175 Views

Hello, 

 

1) I have installed Quartus II 8.0 on my machine with CentOS 5.2 and it works well for most of the purposes like design entry, compilation, synthesis etc. Earlier I had my installation on Fedora Core 6 and it gave me a lot of problems (like it would crash when I would attempt to open License Setup). 

 

In the CentOS installation some of the problems appear to have been mitigated. But I haven't been able to use the programmer's function because the Byteblaster II is not installed on the system. I read the ug_bbii.pdf and found that I need byteblaster.tar.gz file for installing the driver. However while using the ./configure for installation, it gave a message that it is "not ported to this system". 

 

When I opened Programmer in Quartus II and clicked on "Hardware Setup -> Hardware Settings -> Add Hardware" button. It lists "ByteBlaster MV or ByteBlaster II" in the "Hardware Type" list box (also listed is "EthernetBlaster"). However when I selected Byteblaster II in the list, it shows "insufficient permissions on some ports" under the "Port" option. 

 

I haven't been able to launch ModelSim AE as well. 

 

 

2) I read that CentOS is the binary compatible version of RHEL. I found this on QuartusforLinux wiki: http://nioswiki.jot.com/wikihome/ope...uartusforlinux (http://nioswiki.jot.com/wikihome/operatingsystems/quartusforlinux

However the wiki recommends using CentOS 4.6. Could that be a problem (I am using CentOS 5.2)? 

 

3) Further, the Altera support gave me a reply which says that they only support 32-bit Linux for kernel 2.4. CentOS 4.6 is based on RHEL 4 while 5.2 is based on RHEL 5. I assume that a. since Altera recommends using RHEL 4 and b. Centos 4.6 is based on RHEL 4, I should not bother about ascertaining if CentOS 4.6 is kernel 2.4 or not. Btw, CentOS 4.6 is kernel 2.6 and CentOS 3.9 is 2.4. So which one I should use? 

 

 

Please help. 

 

Kumar Vijay Mishra.
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
473 Views

Hello All, 

 

I thought of a workaround for this problem. Since BBII is ported only on kernel 2.4, I installed CentOS 3.9 (kernel 2.4.21-50.EL) on VMWare and then tried installing Quartus II 8.0 on this CentOS 3.9. All this went well. However when I tried installing BBII using ./configure, it asked for a modversions.h file. I reckon I don't have modeversions.h file (tried Googling for that but it yielded no results; if this file exists for CentOS 3.9, please tell me how I can get it?), so should I comment the modevrsion.h parts in ./configure? Will that work. 

 

Please help. 

 

Kumar Vijay Mishra.
0 Kudos
Altera_Forum
Honored Contributor II
473 Views

Hello, 

 

I have made some progress in BBII installation (though there are still some problems). So I thought I will put my experience here. 

 

As I said, I have been trying to install ByteBlaster (a parallel port device for  

FPGA programming) driver on my CentOS 3.9 machine (it uses kernel  

2.4.21-50.EL). Initially when I used ./configure, it could not find  

modversions.h file. I found that the modversions.h file is in /usr/  

src/linux-2.4.21-50.EL.asp/include/linux and included it in the search  

options in the ./configure file.  

 

 

 

 

 

Following this './configure' yielded following messages:  

---------------------------------------------------  

[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/  

---------------------------------------------------  

 

 

 

Next, I executed 'make':  

---------------------------------------------------  

[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  

---------------------------------------------------  

 

 

 

All this seemed to work ok. However when I executed 'make install', I  

received the error which says there was a kernel version mismatch:  

---------------------------------------------------  

[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: Warning: kernel-module version mismatch  

/lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o was  

compiled for kernel version 2.4.21-50.EL.asp  

while this kernel is version 2.4.21-50.EL  

/lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: unresolved symbol  

register_chrdev_Racfca4b4  

/lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: insmod /lib/  

modules/2.4.21-50.EL/kernel/misc/byteblaster.o failed  

/lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: insmod  

byteblaster failed  

mknod: wrong number of arguments  

Try `mknod --help' for more information.  

mknod: wrong number of arguments  

Try `mknod --help' for more information.  

mknod: wrong number of arguments  

Try `mknod --help' for more information.  

---------------------------------------------------  

 

What could be the problem here? 

 

 

Kumar Vijay Mishra.
0 Kudos
Altera_Forum
Honored Contributor II
473 Views

Hello, 

 

I solved the problem in part, I guess (though there are still some errors). Following is what I did: 

 

a. Edited "Makefile" in the kernel source directory (/usr/src/ 

linux-2.4.21-50.EL.asp/) and changed the line 4 from 

 

EXTRAVERSION = 50.EL.aspcustom 

 

to 

 

EXTRAVERSION = 50.EL 

 

b. Above didn't help. I also changed 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).  

 

c. After this, I did 'make clean' and installed from scratch. Now 'make install' 

didn't yield any version mismatch. But it now gave following errors: 

 

[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: /lib/modules/2.4.21-50.EL/kernel/misc/ 

byteblaster.o : unresolved symbol register_chrdev_Racfca4b4 

/lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: insmod /lib/ 

modules/2.4.21- 50.EL/kernel/misc/byteblaster.o failed 

/lib/modules/2.4.21-50.EL/kernel/misc/byteblaster.o: insmod 

byteblaster failed 

mknod: wrong number of arguments 

Try `mknod --help' for more information. 

mknod: wrong number of arguments 

Try `mknod --help' for more information. 

mknod: wrong number of arguments 

Try `mknod --help' for more information.  

 

Any help would be greatly appreciated. 

 

Kumar Vijay Mishra.
0 Kudos
Altera_Forum
Honored Contributor II
473 Views

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.
0 Kudos
Altera_Forum
Honored Contributor II
473 Views

Thanks, very usefull information! 

Is there a way to use this cable on centos5.5 without needing to virtualize an older centos version?
0 Kudos
Reply