Forum Discussion
Altera_Forum
Honored Contributor
19 years ago --- Quote Start --- originally posted by hippo@Dec 27 2006, 09:00 PM actually, fc6 might detect jtag without changing udev rules. the jtag got detected sometime with root account. i have to disable selinux to run nios2-configure-sof. i tried changing the mode to 0666 in 50-udev.rules to get user access. sometime it works, but mostly fails.
there is no /etc/hotplug dir in fc6. the /etc/udev rules changed a lot from rhel4. in fc6, the udev add the jtag as /dev/bus/usb/004/002 dev, the bus number may be different for different usb ports. i think you should not name the dev as "usbblaster".
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=20249)
--- quote end ---
--- Quote End --- It seems i ran into most of the problems above with my FC6 install, but i believe i discovered a solution to the flakyness of jtagconfig runnning as a user and getting invalid port permissions. I am still not sure of the cause, but running the JTAGD as a service (IE: as root without the typical --user-launch option (i think the name is wrong) that is used when running jtagconfig directly without jtagd running) resolves the issue. I can now consistently use the usbblaster in my fresh FC6 install. first, change the udev rules to allow users access to the usbblaster I created a new udev rule in /etc/udev/rules.d called usbblaster.rules BUS=="usb", SYSFS{product}=="USB-Blaster", SYMLINK+="usbblaster", MODE="0666" **NB this rule does not handle plugging in multiple USB Blasters, i didn't care as i only use one.. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif next, i created and initscript for jtagd : # !/bin/bash# # Init file for Altera JTAGD# # chkconfig: 2345 60 25# description: JTAG daemon# # processname: jtagd# config: /etc/jtagd # source function library . /etc/rc.d/init.d/functions RETVAL=0 prog="jtagd" PID_FILE=/var/run/jtagd.pid JTAGD=/opt/altera6.1/quartus/bin/jtagd start() { echo -n $"Starting $prog: " $JTAGD && success || failure RETVAL=$? pidofproc $prog >> $PID_FILE echo } stop() { echo -n $"Stopping $prog: " if [ -n "`pidfileofproc $JTAGD`" ] ; then killproc $JTAGD else failure $"Stopping $prog" fi echo } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo $"Usage: $0 {start|stop|restart}" RETVAL=1 esac exit $RETVAL set the permissions, add it to all the runlevels (chkconfig --add jtagd) don't forget to change the path to the JTAGD to match your install path. The next step is to create the /etc/jtagd and put the pgm_parts stuff in it so all the parts would be recognized correctly. # mkdir /etc/jtagd # cp /opt/altera6.1/quartus/linux/pgm_parts.txt /etc/jtagd and then there seemed to be some confusion as to what this file should be named, so i shotgunned it and used them all # ln -s /etc/pgm_parts.txt /etc/jtagd/pgm_parts# ln -s /etc/pgm_parts.txt /etc/jtagd/jtagd.pgm_parts start the service as root# /etc/init.d/jtagd start and TADA!! everything magically works. --dalon