MyFPGA Forum

 找回密码
 注册
搜索
查看: 3294|回复: 1
打印 上一主题 下一主题

[转]HOWTO: Setting up the USB blaster on Ubuntu 9.04 (Jaunty Jackalope)

[复制链接]
跳转到指定楼层
1#
发表于 2010-4-26 21:44:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
I just spent a couple hours figuring this out, so I thought I'd post it here for everyone else. To use the USB blaster to program Altera parts on Linux, you need to do a bit of work to configure your machine to give Quartus access to it. Unfortunately though, Altera does not provide instructions for how to do this for Ubuntu. So I've put together instructions for Ubuntu 9.04 (Jaunty Jackalope). They may also work for slightly older/newer versions of Ubuntu.

Step 1: Set-up "usbfs" emulation (see Ubuntu bug #156085 for the history behind this, if you're curious)

1) Open /etc/init.d/mountdevsubfs.sh as root ("sudo gedit /etc/init.d/mountdevsubfs.sh" from a terminal)
2) Scroll down to the part that reads "domount devpts ..."
3) Add this after that line:

Code:

        #
        # Magic to make /proc/bus/usb work
        #
        mkdir -p /dev/bus/usb/.usbfs
        domount usbfs "" /dev/bus/usb/.usbfs usbfs -obusmode=0700,devmode=0600,listmode=0644
        ln -sf .usbfs/devices /dev/bus/usb/devices
        mount --rbind /dev/bus/usb /proc/bus/usb

4) Save and close.
5) Run "sudo /etc/init.d/mountdevsubfs.sh start"

Step 2: Tell Ubuntu to let normal users use the USB blaster

1) Create a new file at /etc/udev/rules.d/51-usbblaster.rules ("sudo gedit /etc/udev/rules.d/51-usbblaster.rules")
2) Put this in it:

Code:

# Altera USB-Blaster rule to set mode to 666.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", RUN+="/bin/chmod 0666 %c"

3) Save and close.
4) Run "sudo udevadm control --reload-rules".

It's now configured! Connect your USB blaster (or remove and reconnect if it's already in) and then launch Quartus. It should now be selectable in Tools -> Programmer -> Hardware Setup.
2#
 楼主| 发表于 2010-4-27 08:48:04 | 只看该作者
Ubuntu 更高版本的也有哦,希望大家发现!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|MyFPGA

GMT+8, 2025-5-1 03:23 , Processed in 0.040409 second(s), 15 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表