Timer Bash Script
I've used this script to wait a download (through Firefox or Chromium) finishes then shutdown my PC.
while true do sleep 10; if [ ! -e YourFile.zip.part ] ; then init 0; fi done
MySQL command line backup and restore
Backup:
$ mysqldump -u root -p -v DB_NAME > BkpDec2010.sql
Restore:
$ mysql -u root -p DB_NAME < BkpDec2010.sql
To create a database:
$ mysqladmin -u root -p create DB_NAME
Putting the USB Blaster to work on Linux
You'll need to edit rc.local file and create a new one in udev rules:
1) edit rc.local (sudo vi /etc/rc.local) and append the following lines before "exit 0" line.
mount --bind /dev/bus /proc/bus ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices
2) create altera-usb-blaster.rules file (sudo vi /etc/udev/rules.d/altera-usb-blaster.rules) with this line:
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="666"
For more information about this fix:
http://www.philpem.me.uk/elec/fpga/quartus-ubuntu/
EDIT1: To check if it's working properly execute jtagconfig. You can found it inside Quartus bin folder. If necessary, sudo killall jtagd.
EDIT2: There's an alternative to put usb blaster working on Linux. I've got this tip on Altera Forum but I have not tested yet.
sudo ln -s /sys/kernel/debug/usb/devices /dev/bus/usb/devices
sudo vim <altera path>/quartus/linux/jtagd :%s/\/proc\/bus\/usb\/%03u\/%03u/\/dev\/bus\/usb\/%03u\/%03u\n/ :%s/\/proc\/bus\/usb\/devices/\/dev\/bus\/usb\/devices\n/ :wq
sudo vim <altera path>/quartus/linux64/jtagd :%s/\/proc\/bus\/usb\/%03u\/%03u/\/dev\/bus\/usb\/%03u\/%03u\n/ :%s/\/proc\/bus\/usb\/devices/\/dev\/bus\/usb\/devices\n/ :wq
Altera Quartus II 10.0 installation
Version 10.0 of Altera's products crash during installation on Linux environment. The workaround is to remove the file libX11.so.6 before starting the installer. So, follow this steps:
1) bash ./10.0_quartus_free_linux.sh --noexec
2) cd 10.0_quartus_free_linux
3) rm altera_installer/bin/libX11.so.6
4) sudo bash ./setup
PS: Step 1 is to decompress all installer files.
EDIT: if you got error on step 4, type: sudo -i; export DISPLAY=:0.0; ./setup
For more detailed information go to
http://www.philpem.me.uk/elec/fpga/quartus-ubuntu/
Nios II IDE execute script
Altera Nios II IDE is an software environment based on Eclipse IDE and comes with a modified GCC version. Its purpose is to be used along Nios II software core processor. To execute Nios II IDE on Linux box you need set some environment variables.
My system is Linux Mint 10 "Julia" x64 (based on Ubuntu 10.10 "Maverick"), but things should go well in other distro flavors. My Nios II version is 10.1, released this month (December, 2010) but I have been using this script since version 9.1
You have to create "nios2.sh" file with this lines:
export SOPC_KIT_NIOS2=/opt/altera/10.1/nios2eds export QUARTUS_ROOTDIR=/opt/altera/10.1/quartus . $SOPC_KIT_NIOS2/bin/nios2-ide
This should be unnecessary but to avoid problems, check the path where you have installed the Altera softwares. In my case is /opt/altera/10.1

