Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17252 Discussions

jtagconfig on openSuSE 11.3

Altera_Forum
Honored Contributor II
1,642 Views

Hi, 

 

I have had some success in getting jtagconfig to work, but there is still an unresolved problem with permissions. 

 

To get this working with openSuSE 11.3, I've created a new file in /etc/udev/rules.d/30-altera.rules with the following contents: 

# udev rules file for Altera USB programming devices (udev >= 0.98)# BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666", SYMLINK+="usbblaster" 

 

The problem is that I can only run 'jtagconfig' (and 'nios2-configure-sof') from the root user. 

 

Running 'jtagconfig' as the local user results in: 

1) USB-Blaster variant Unable to lock chain (Insufficient port permissions) 

 

Running 'jtagconfig' as the root user results in the same until I kill the jtagd process launched by the local user. 

 

Is there a simple solution to allow the device to be accessed by other users than root? A simple modification to the line in my udev rules file? 

 

Thanks, 

 

Jason
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
910 Views

I should also add that I originally modified /etc/fstab to include the following permissions: 

 

usbfs /proc/bus/usb usbfs devmode=0666 0 0
0 Kudos
Altera_Forum
Honored Contributor II
910 Views

Hi, 

if it helps, I have to run Nios console as root: 

 

{INSTALL_DIR}/nios2eds/nios2_command_shell.sh 

 

after that turn on DE board and run 

# jtagconfig 1) USB-Blaster 020B60DD  

 

behind the 020B60DD should be someting as EP2C70, so I have to kill jtagd and start it again 

# killall jtagd # jtagd # jtagconfig 1) USB-Blaster 020B60DD EP2C70  

 

And now I can configure .sof and download .elf to board :)
0 Kudos
Altera_Forum
Honored Contributor II
910 Views

Changing the permissions on /dev/bus/usb/004/003 (or wherever /dev/usbblaster points to) to a+rw does give my local user jtag permissions. I attempted to add the following line to my udev rules, but it did not have any noticeable effect: 

 

RUN+="/bin/chmod 0666 %c" 

 

Perhaps udev doesn't like this syntax in opensuse. Anyone have thoughts on the issue?
0 Kudos
Altera_Forum
Honored Contributor II
910 Views

OpenSuse isn't a supported platform but I see no reason why you shouldn't be able to get it to work. 

 

Unfortunately I don't know much about openSuse specifically but I can explain what is going on and with that knowledge you will probably be able to fix the problem. 

 

When you run jtagconfig, or any other JTAG program (SystemConsole, Nios II debugger, SignalTap etc) on Linux it connects to TCP port 1309 where jtagd should be listening. If there is no jtagd on port 1309 then the JTAG program will start one. This new jtagd will start up with the same uid as the program which requested it. 

 

Jtagd then scans the filesystem for USB-Blasters and tries to access them. It needs read and write permission on the devices to do this. 

 

Which devices? Since 11.0 jtagd tries to use /dev/bus/usb/BBB/DDD to access the hardware, if this tree is not available then it falls back to the old location /proc/bus/usb/BBB/DDD. 

 

You need to set up udev rules to give all users who might want to use jtag permission to access the devices which jtagd wants to use.
0 Kudos
Altera_Forum
Honored Contributor II
910 Views

Hi, 

did you copy following file? Change your Altera install dir. 

cp /opt/altera/11.0/quartus/linux/pgm_parts.txt /etc/jtagd/jtagd.pgm_parts
0 Kudos
Altera_Forum
Honored Contributor II
910 Views

A simple solution was to change the group owner to "users" rather than the default "root". I would still like to know what is overriding my permissions since I'm specifically setting them to a+rw (666) by UDEV and /etc/fstab (the device always comes up with 664 permissions). But, the following change to my udev rules file will suffice: 

BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", SYMLINK+="usbblaster", GROUP="users" 

 

xsigik: 

I'm not sure how pgm_parts.txt would help with permissions.
0 Kudos
Reply