DE0-Nano/NiosII_uClinux
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[labs.beatcraft.com]]~
[[DE0-Nano]]~
#contents
* DE0-Nano/Nios II uClinux [#y03073d1]
This article explains how to install uCLinux on DE0-Nano,...
#ref(DE0Nano.jpg,,40%)~
~
The hardware specification of DE0-Nano is listed below. F...
~
-FPGA
-- Cyclone IV EP4CE22F17C6N ~
- Memory ~
-- 32MB SDRAM ~
-- 2Kb I2C EEPROM ~
- INPUT/OUTPUT
-- LED: 8(Green) ~
-- Push button: 2 ~
-- Dip switch: 4 ~
- Clock System ~
-- Clock Oscillator: 50MHz (On-board)~
- Power Supply ~
-- USB: Type mini-AB port (5V) ~
For the installation procedure and operation check of the...
[[Running uClinux on Terasic DE0-Nano Altera Board>http:/...
**uClinux (Nios II version) Built Environment [#yb9a4554]
The built environment for Nios II uClinux is created on V...
- OS: Ubuntu 12.04.2 Desktop(32bit Version)~
- Disk space: 30GB~
- FPGA Development Tool: Quartus II Web Edition 11.1sp2 W...
The disk space, which WMware allocates for is 30GB. 9GB i...
~
The version of Quartus II is 11.1sp2, and it is free vers...
Nios II EDS is installed as a part of Quartus II's instal...
** Configuring Preference of Ubuntu[#p50ecd24]
Installing Ubuntu 12.04.2 Desktop (32bit Version) on VMwa...
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install ssh
$ sudo apt-get install build-essential vim
$ sudo apt-get install automake git-core libncurses5-dev...
$ sudo apt-get install gettext ccache zlib1g-dev libx11-...
liblzo2-dev pax-utils uboot-mkimage corkscrew mt...
Change from the standard shell to bash.~
$ sudo dpkg-reconfigure dash
** Obtaining and Configuring the Files for Nios II uClinu...
Checkout the project of Nios II uClinux.~
~
4.1GB of disk space is consumed for checking-out Nios II ...
$ cd ~
$ svn co http://www.ccm.ece.vt.edu/usvn/svn/alteraApps/t...
~
Now, toolchain is installed. The toolchain used here is l...
$ cd uClinux/tools/
$ tar xvfj nios2gcc-20080203.tar.bz2
$ vi ~/.bashrc
...<skip>
PATH=$PATH:${HOME}/uClinux/tools/opt/nios2/bin
$ source ~/.bashrc
Extract the DE0-Nano project file (simple.zip).~
$ cd uClinux/hardware/DE0-Nano
$ unzip simple.zip
Extract nios2-linux-20090929.tar, which is located at the...
$ cd ~/uClinux/distro/
$ tar xvf nios2-linux-20090929.tar
After the extraction of tar file is completed, these file...
$ ls nios2-linux
3c120_default elf2flt linux-2.6 u-boot u...
README gcc3 sshkey uClibc u...
binutils glibc toolchain-build uClinux-dist u...
checkout insight toolchain-mmu update
~
Moving the directory of nios2-linux, execute the script o...
$ cd nios2-linux
$ ./checkout
$ cd linux-2.6
$ git branch -a
* nios2mmu
test-nios2
remotes/origin/HEAD -> origin/test-nios2
remotes/origin/master
remotes/origin/nios2mmu
remotes/origin/test-lm32
remotes/origin/test-nios2
remotes/origin/unstable
remotes/origin/unstable-nios2mmu
$ git checkout test-nios2
$ cd ../uClinux-dist
$ git branch -a
test-nios2
* trunk
remotes/origin/HEAD -> origin/test-nios2
remotes/origin/test-nios2
remotes/origin/trunk
remotes/origin/unstable
$ git checkout test-nios2
Caution: Do not recommend to use any nios2-linux, which i...
** Creating Nios II uClinux zImage[#y991b998]
At uClinux directory, executing make menuconfig, make sur...
As make menuconfig is executed, an error message, Run?mak...
After make command is ended, zImage is created at the ima...
A part of log, which is generated at executing of make me...
~
$ make menuconfig
Vendor/Product Selection --->
--- Select the Vendor you wish to target
Vendor (Altera) --->
--- Select the Product you wish to target
Altera Products (nios2) --->
Kernel/Library/Defaults Selection --->
--- Kernel is linux-2.6.x
Libc Version (None) --->
[ ] Default all settings (lose changes)
[ ] Customize Kernel Settings
[ ] Customize Application/Library Settings
[ ] Update Default Vendor Settings
$ make vendor_hwselect SYSPTF=/home/beat/uClinux/hardwar...
...<skip>
scripts/kconfig/conf -s arch/nios2/Kconfig
no emulation specific options.
RUNNING hwselect
--- Please select which CPU you wish to build the kernel...
(1) cpu - Class: altera_nios2 Type: f Version: 7.08101
Selection:
Invalid response, please try again.
Selection: 1
--- Please select a device to execute kernel from:
(1) sdram
Class: altera_avalon_new_sdram_controller
Size: 33554432 bytes
Selection: 1
...<skip>
$ make
$ ls images
romfs-inst.log zImage
** Installing Quartus II and Nios II EDS[#e8a16e93]
Download Quartus II 11.1sp2 Web Edition (Linux version) f...
~
https://www.altera.com/jp/download/dnl-index.jsp ~
~
The size of the file is about 3GB, and the required disk ...
$ chmod +x 11.0sp1_quartus_free_linux.sh
$ ./11.0sp1_quartus_free_linux.sh
Add the PATHs for Quartus II and Nios II EDS.~
$ export PATH=$PATH:/home/beat/altera/11.1sp2/quartus/bin
$ export PATH=$PATH:/home/beat/altera/11.1sp2/nios2eds/bin
$ export PATH=$PATH:/home/beat/altera/11.1sp2/quartus/so...
$ export PATH=$PATH:/home/beat/altera/11.1sp2/nios2eds/b...
**Creating the Configuration File for DE0-Nano[#ce38ead5]
The configuration file of DE0-Nano (DE0_Nano.sof) is crea...
~
Starting up Quartus II, select ${HOME}/uClinux/hardware/D...
$ quartus
Booting up SOPC Builder (QuartusII menu bar Tools →...
~
At this moment, a warning dialog appears, saying that a p...
This waring is not critical for the current condition, so...
Also, a message dialog that urges to install QSYS. QSYS w...
~
To create DE0_Nano_SOPC.sopc, click the Generate button a...
Return to Quartus II, slect Processing from the menu. The...
** Installing USB-Blaster[#i4eef35e]
USB-Blaster is configured for setting up and installing t...
$ lsusb
...<略>
Bus 002 Device 008: ID 09fb:6001 Altera Blaster
$ sudo vi /etc/udev/rules.d/51-usbblaster.rules
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVen...
ATTR{idProduct}=="6001", MODE="0666",
NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", RUN+="/bin/chm...
$ sudo udevadm control --reload-rules
** Booting up Nios II uClinix [#d536996c]
To start up uClinux, execute the environment variable con...
~
DE0-Nano is connected and set up with configure, then the...
~
The log shown below is resulted form executing the comman...
$ cd altera/11.1sp2/nios2eds/
$ ./nios2_command_shell.sh
$ nios2-configure-sof ~/uClinux/hardware/DE0-Nano/simple...
/home/beat/altera/11.1sp2/quartus/adm/qenv.sh: line 87: ...
LC_CTYPE: cannot change locale (en_US): No such file or ...
Info: **************************************************...
Info: Running Quartus II 32-bit Programmer
Info: Command: quartus_pgm --no_banner --mode=jtag -o p;...
Info (213045): Using programming cable "USB-Blaster [2-2...
Info (213011): Using programming file /home/beat/uClinux...
Info (209060): Started Programmer operation at Wed Mar ...
Info (209016): Configuring device index 1
Info (209017): Device 1 contains JTAG ID code 0x020F30DD
Info (209007): Configuration succeeded -- 1 device(s) co...
Info (209011): Successfully performed operation(s)
Info (209061): Ended Programmer operation at Wed Mar 6 ...
Info: Quartus II 32-bit Programmer was successful. 0 err...
Info: Peak virtual memory: 104 megabytes
Info: Processing ended: Wed Mar 6 20:45:13 2013
Info: Elapsed time: 00:00:05
Info: Total CPU time (on all processors): 00:00:01
$ ./altera/11.1sp2/nios2eds/nios2_command_shell.sh
------------------------------------------------
Altera Nios2 Command Shell [GCC 4]
Version 11.1sp2, Build 259
------------------------------------------------
$ nios2-download -g ~/uClinux/distro/nios2-linux/uClinux...
Using cable "USB-Blaster [2-2.1]", device 1, instance 0x00
Pausing target processor: OK
Initializing CPU cache (if present)
OK
Downloaded 1349KB in 343.0s (3.9KB/s)
Verified OK in 3.4s (396.7KB/s)
Starting processor at address 0x02500000
$ nios2-terminal
nios2-terminal: connected to hardware target using JTAG ...
nios2-terminal: "USB-Blaster [2-2.1]", device 1, instanc...
nios2-terminal: (Use the IDE stop button or Ctrl-C to te...
Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.30 (beat@DE0NanoVM) (gcc version 3.4.6...
uClinux/Nios II
Built 1 zonelists in Zone order, mobility grouping off. ...
Kernel command line:
NR_IRQS:32
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 b...
Inode-cache hash table entries: 2048 (order: 1, 8192 byt...
Memory available: 29976k/2492k RAM, 0k/0k ROM (1669k ker...
Calibrating delay loop... 49.04 BogoMIPS (lpj=245248)
Mount-cache hash table entries: 512
net_namespace: 264 bytes
NET: Registered protocol family 16
init_BSP(): registering device resources
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 ...
TCP established hash table entries: 1024 (order: 1, 8192...
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
io scheduler noop registered
io scheduler deadline registered (default)
ttyJ0 at MMIO 0x4001030 (irq = 1) is a Altera JTAG UART
console [ttyJ0] enabled
dm9000 Ethernet Driver, V1.31
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Freeing unused kernel memory: 596k freed (0x21da000 - 0x...
Shell invoked to run file: /etc/rc
Command: hostname uClinux
Command: mount -t proc proc /proc -o noexec,nosuid,nodev
Command: mount -t sysfs sysfs /sys -o noexec,nosuid,nodev
Command: mount -t devpts devpts /dev/pts -o noexec,nosuid
Command: mount -t usbfs none /proc/bus/usb
mount: mounting none on /proc/bus/usb failed: No such fi...
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: ifconfig lo 127.0.0.1
Command: route add -net 127.0.0.0 netmask 255.0.0.0 lo
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
For further information check:
http://www.uclinux.org/
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/>
/> cat /proc/cpuinfo
CPU: NIOS2
MMU: none
FPU: none
Clocking: 100.0MHz
BogoMips: 49.04
Calibration: 24524800 loops
/> cat /proc/meminfo
MemTotal: 30572 kB
MemFree: 28880 kB
Buffers: 0 kB
Cached: 780 kB
SwapCached: 0 kB
Active: 192 kB
Inactive: 536 kB
Active(anon): 0 kB
Inactive(anon): 0 kB
Active(file): 192 kB
Inactive(file): 536 kB
Unevictable: 0 kB
Mlocked: 0 kB
MmapCopy: 244 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 508 kB
SReclaimable: 160 kB
SUnreclaim: 348 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 15284 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
/> dmesg
Linux version 2.6.30 (beat@DE0NanoVM) (gcc version 3.4.6...
uClinux/Nios II
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat 021d6a60, node_mem_ma...
DMA zone: 64 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping off. ...
Kernel command line:
NR_IRQS:32
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 b...
Inode-cache hash table entries: 2048 (order: 1, 8192 byt...
Memory available: 29976k/2492k RAM, 0k/0k ROM (1669k ker...
Calibrating delay loop... 49.04 BogoMIPS (lpj=245248)
Mount-cache hash table entries: 512
net_namespace: 264 bytes
NET: Registered protocol family 16
init_BSP(): registering device resources
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 ...
TCP established hash table entries: 1024 (order: 1, 8192...
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
io scheduler noop registered
io scheduler deadline registered (default)
ttyJ0 at MMIO 0x4001030 (irq = 1) is a Altera JTAG UART
console [ttyJ0] enabled
dm9000 Ethernet Driver, V1.31
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Freeing unused kernel memory: 596k freed (0x21da000 - 0x...
/> ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 fra...
TX packets:0 errors:0 dropped:0 overruns:0 car...
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/> ls -l /bin
-rwxr-xr-x 1 1000 1000 146884 Mar 5 2013 boa
-rwxr-xr-x 1 1000 1000 119578 Mar 5 2013 b...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 cp
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 dd
-rwxr-xr-x 1 1000 1000 52289 Mar 5 2013 d...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 d...
-rwxr-xr-x 1 1000 1000 67414 Mar 5 2013 ftp
-rwxr-xr-x 1 1000 1000 67272 Mar 5 2013 f...
-rwxr-xr-x 1 1000 1000 24082 Mar 5 2013 i...
-rwxr-xr-x 1 1000 1000 20892 Mar 5 2013 i...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 l...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 m...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 n...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 p...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 rm
-rwxr-xr-x 1 1000 1000 49587 Mar 5 2013 sh
-rwxr-xr-x 1 1000 1000 30050 Mar 5 2013 t...
/> ls -l /sbin
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 i...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 i...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 l...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 m...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 r...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 r...
/> ls -l /usr/bin
lrwxrwxrwx 1 1000 1000 17 Mar 5 2013 p...
lrwxrwxrwx 1 1000 1000 17 Mar 5 2013 w...
/> ls -l /usr/sbin
/> busybox --help
BusyBox v1.15.0.svn (2013-03-06 15:43:22 JST) multi-call...
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Deny...
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines man...
utilities into a single executable. Most people...
link to busybox for each function they wish to u...
will act like whatever it was invoked as!
Currently defined functions:
cp, dd, dmesg, ifconfig, insmod, login, lsmod, m...
netstat, passwd, ping, rm, rmmod, route, wget
/>
* Tips [#wd57fb71]
To install Quartus II on web edition on Windows 7 64bit, ...
- How to Install Altera Quartus II Web Edition~
http://keitetsu.ninja-web.net/fpga_quartus2_install.html~
~
Installing it Windows 7, JTAG server may not work and DE0...
- How to Fix when Quartus II v12 does not recognizes USB-...
http://keitetsu.blogspot.jp/2012/06/quartus-ii-v120usb-bl...
* Reference[#vc3284eb]
Kobayashi, M. ?Introduction to Development of Embedded Sy...
Tokyo, Gijutysu-Hyohron Co.,Ltd., 2011.~
* Revision History [#gf841f41]
>
- 2013/07/01 This article is initially uploaded~
End:
[[labs.beatcraft.com]]~
[[DE0-Nano]]~
#contents
* DE0-Nano/Nios II uClinux [#y03073d1]
This article explains how to install uCLinux on DE0-Nano,...
#ref(DE0Nano.jpg,,40%)~
~
The hardware specification of DE0-Nano is listed below. F...
~
-FPGA
-- Cyclone IV EP4CE22F17C6N ~
- Memory ~
-- 32MB SDRAM ~
-- 2Kb I2C EEPROM ~
- INPUT/OUTPUT
-- LED: 8(Green) ~
-- Push button: 2 ~
-- Dip switch: 4 ~
- Clock System ~
-- Clock Oscillator: 50MHz (On-board)~
- Power Supply ~
-- USB: Type mini-AB port (5V) ~
For the installation procedure and operation check of the...
[[Running uClinux on Terasic DE0-Nano Altera Board>http:/...
**uClinux (Nios II version) Built Environment [#yb9a4554]
The built environment for Nios II uClinux is created on V...
- OS: Ubuntu 12.04.2 Desktop(32bit Version)~
- Disk space: 30GB~
- FPGA Development Tool: Quartus II Web Edition 11.1sp2 W...
The disk space, which WMware allocates for is 30GB. 9GB i...
~
The version of Quartus II is 11.1sp2, and it is free vers...
Nios II EDS is installed as a part of Quartus II's instal...
** Configuring Preference of Ubuntu[#p50ecd24]
Installing Ubuntu 12.04.2 Desktop (32bit Version) on VMwa...
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install ssh
$ sudo apt-get install build-essential vim
$ sudo apt-get install automake git-core libncurses5-dev...
$ sudo apt-get install gettext ccache zlib1g-dev libx11-...
liblzo2-dev pax-utils uboot-mkimage corkscrew mt...
Change from the standard shell to bash.~
$ sudo dpkg-reconfigure dash
** Obtaining and Configuring the Files for Nios II uClinu...
Checkout the project of Nios II uClinux.~
~
4.1GB of disk space is consumed for checking-out Nios II ...
$ cd ~
$ svn co http://www.ccm.ece.vt.edu/usvn/svn/alteraApps/t...
~
Now, toolchain is installed. The toolchain used here is l...
$ cd uClinux/tools/
$ tar xvfj nios2gcc-20080203.tar.bz2
$ vi ~/.bashrc
...<skip>
PATH=$PATH:${HOME}/uClinux/tools/opt/nios2/bin
$ source ~/.bashrc
Extract the DE0-Nano project file (simple.zip).~
$ cd uClinux/hardware/DE0-Nano
$ unzip simple.zip
Extract nios2-linux-20090929.tar, which is located at the...
$ cd ~/uClinux/distro/
$ tar xvf nios2-linux-20090929.tar
After the extraction of tar file is completed, these file...
$ ls nios2-linux
3c120_default elf2flt linux-2.6 u-boot u...
README gcc3 sshkey uClibc u...
binutils glibc toolchain-build uClinux-dist u...
checkout insight toolchain-mmu update
~
Moving the directory of nios2-linux, execute the script o...
$ cd nios2-linux
$ ./checkout
$ cd linux-2.6
$ git branch -a
* nios2mmu
test-nios2
remotes/origin/HEAD -> origin/test-nios2
remotes/origin/master
remotes/origin/nios2mmu
remotes/origin/test-lm32
remotes/origin/test-nios2
remotes/origin/unstable
remotes/origin/unstable-nios2mmu
$ git checkout test-nios2
$ cd ../uClinux-dist
$ git branch -a
test-nios2
* trunk
remotes/origin/HEAD -> origin/test-nios2
remotes/origin/test-nios2
remotes/origin/trunk
remotes/origin/unstable
$ git checkout test-nios2
Caution: Do not recommend to use any nios2-linux, which i...
** Creating Nios II uClinux zImage[#y991b998]
At uClinux directory, executing make menuconfig, make sur...
As make menuconfig is executed, an error message, Run?mak...
After make command is ended, zImage is created at the ima...
A part of log, which is generated at executing of make me...
~
$ make menuconfig
Vendor/Product Selection --->
--- Select the Vendor you wish to target
Vendor (Altera) --->
--- Select the Product you wish to target
Altera Products (nios2) --->
Kernel/Library/Defaults Selection --->
--- Kernel is linux-2.6.x
Libc Version (None) --->
[ ] Default all settings (lose changes)
[ ] Customize Kernel Settings
[ ] Customize Application/Library Settings
[ ] Update Default Vendor Settings
$ make vendor_hwselect SYSPTF=/home/beat/uClinux/hardwar...
...<skip>
scripts/kconfig/conf -s arch/nios2/Kconfig
no emulation specific options.
RUNNING hwselect
--- Please select which CPU you wish to build the kernel...
(1) cpu - Class: altera_nios2 Type: f Version: 7.08101
Selection:
Invalid response, please try again.
Selection: 1
--- Please select a device to execute kernel from:
(1) sdram
Class: altera_avalon_new_sdram_controller
Size: 33554432 bytes
Selection: 1
...<skip>
$ make
$ ls images
romfs-inst.log zImage
** Installing Quartus II and Nios II EDS[#e8a16e93]
Download Quartus II 11.1sp2 Web Edition (Linux version) f...
~
https://www.altera.com/jp/download/dnl-index.jsp ~
~
The size of the file is about 3GB, and the required disk ...
$ chmod +x 11.0sp1_quartus_free_linux.sh
$ ./11.0sp1_quartus_free_linux.sh
Add the PATHs for Quartus II and Nios II EDS.~
$ export PATH=$PATH:/home/beat/altera/11.1sp2/quartus/bin
$ export PATH=$PATH:/home/beat/altera/11.1sp2/nios2eds/bin
$ export PATH=$PATH:/home/beat/altera/11.1sp2/quartus/so...
$ export PATH=$PATH:/home/beat/altera/11.1sp2/nios2eds/b...
**Creating the Configuration File for DE0-Nano[#ce38ead5]
The configuration file of DE0-Nano (DE0_Nano.sof) is crea...
~
Starting up Quartus II, select ${HOME}/uClinux/hardware/D...
$ quartus
Booting up SOPC Builder (QuartusII menu bar Tools →...
~
At this moment, a warning dialog appears, saying that a p...
This waring is not critical for the current condition, so...
Also, a message dialog that urges to install QSYS. QSYS w...
~
To create DE0_Nano_SOPC.sopc, click the Generate button a...
Return to Quartus II, slect Processing from the menu. The...
** Installing USB-Blaster[#i4eef35e]
USB-Blaster is configured for setting up and installing t...
$ lsusb
...<略>
Bus 002 Device 008: ID 09fb:6001 Altera Blaster
$ sudo vi /etc/udev/rules.d/51-usbblaster.rules
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVen...
ATTR{idProduct}=="6001", MODE="0666",
NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", RUN+="/bin/chm...
$ sudo udevadm control --reload-rules
** Booting up Nios II uClinix [#d536996c]
To start up uClinux, execute the environment variable con...
~
DE0-Nano is connected and set up with configure, then the...
~
The log shown below is resulted form executing the comman...
$ cd altera/11.1sp2/nios2eds/
$ ./nios2_command_shell.sh
$ nios2-configure-sof ~/uClinux/hardware/DE0-Nano/simple...
/home/beat/altera/11.1sp2/quartus/adm/qenv.sh: line 87: ...
LC_CTYPE: cannot change locale (en_US): No such file or ...
Info: **************************************************...
Info: Running Quartus II 32-bit Programmer
Info: Command: quartus_pgm --no_banner --mode=jtag -o p;...
Info (213045): Using programming cable "USB-Blaster [2-2...
Info (213011): Using programming file /home/beat/uClinux...
Info (209060): Started Programmer operation at Wed Mar ...
Info (209016): Configuring device index 1
Info (209017): Device 1 contains JTAG ID code 0x020F30DD
Info (209007): Configuration succeeded -- 1 device(s) co...
Info (209011): Successfully performed operation(s)
Info (209061): Ended Programmer operation at Wed Mar 6 ...
Info: Quartus II 32-bit Programmer was successful. 0 err...
Info: Peak virtual memory: 104 megabytes
Info: Processing ended: Wed Mar 6 20:45:13 2013
Info: Elapsed time: 00:00:05
Info: Total CPU time (on all processors): 00:00:01
$ ./altera/11.1sp2/nios2eds/nios2_command_shell.sh
------------------------------------------------
Altera Nios2 Command Shell [GCC 4]
Version 11.1sp2, Build 259
------------------------------------------------
$ nios2-download -g ~/uClinux/distro/nios2-linux/uClinux...
Using cable "USB-Blaster [2-2.1]", device 1, instance 0x00
Pausing target processor: OK
Initializing CPU cache (if present)
OK
Downloaded 1349KB in 343.0s (3.9KB/s)
Verified OK in 3.4s (396.7KB/s)
Starting processor at address 0x02500000
$ nios2-terminal
nios2-terminal: connected to hardware target using JTAG ...
nios2-terminal: "USB-Blaster [2-2.1]", device 1, instanc...
nios2-terminal: (Use the IDE stop button or Ctrl-C to te...
Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.30 (beat@DE0NanoVM) (gcc version 3.4.6...
uClinux/Nios II
Built 1 zonelists in Zone order, mobility grouping off. ...
Kernel command line:
NR_IRQS:32
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 b...
Inode-cache hash table entries: 2048 (order: 1, 8192 byt...
Memory available: 29976k/2492k RAM, 0k/0k ROM (1669k ker...
Calibrating delay loop... 49.04 BogoMIPS (lpj=245248)
Mount-cache hash table entries: 512
net_namespace: 264 bytes
NET: Registered protocol family 16
init_BSP(): registering device resources
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 ...
TCP established hash table entries: 1024 (order: 1, 8192...
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
io scheduler noop registered
io scheduler deadline registered (default)
ttyJ0 at MMIO 0x4001030 (irq = 1) is a Altera JTAG UART
console [ttyJ0] enabled
dm9000 Ethernet Driver, V1.31
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Freeing unused kernel memory: 596k freed (0x21da000 - 0x...
Shell invoked to run file: /etc/rc
Command: hostname uClinux
Command: mount -t proc proc /proc -o noexec,nosuid,nodev
Command: mount -t sysfs sysfs /sys -o noexec,nosuid,nodev
Command: mount -t devpts devpts /dev/pts -o noexec,nosuid
Command: mount -t usbfs none /proc/bus/usb
mount: mounting none on /proc/bus/usb failed: No such fi...
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: mkdir /var/empty
Command: ifconfig lo 127.0.0.1
Command: route add -net 127.0.0.0 netmask 255.0.0.0 lo
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
For further information check:
http://www.uclinux.org/
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/>
/> cat /proc/cpuinfo
CPU: NIOS2
MMU: none
FPU: none
Clocking: 100.0MHz
BogoMips: 49.04
Calibration: 24524800 loops
/> cat /proc/meminfo
MemTotal: 30572 kB
MemFree: 28880 kB
Buffers: 0 kB
Cached: 780 kB
SwapCached: 0 kB
Active: 192 kB
Inactive: 536 kB
Active(anon): 0 kB
Inactive(anon): 0 kB
Active(file): 192 kB
Inactive(file): 536 kB
Unevictable: 0 kB
Mlocked: 0 kB
MmapCopy: 244 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 508 kB
SReclaimable: 160 kB
SUnreclaim: 348 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 15284 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
/> dmesg
Linux version 2.6.30 (beat@DE0NanoVM) (gcc version 3.4.6...
uClinux/Nios II
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat 021d6a60, node_mem_ma...
DMA zone: 64 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping off. ...
Kernel command line:
NR_IRQS:32
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 b...
Inode-cache hash table entries: 2048 (order: 1, 8192 byt...
Memory available: 29976k/2492k RAM, 0k/0k ROM (1669k ker...
Calibrating delay loop... 49.04 BogoMIPS (lpj=245248)
Mount-cache hash table entries: 512
net_namespace: 264 bytes
NET: Registered protocol family 16
init_BSP(): registering device resources
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 ...
TCP established hash table entries: 1024 (order: 1, 8192...
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
io scheduler noop registered
io scheduler deadline registered (default)
ttyJ0 at MMIO 0x4001030 (irq = 1) is a Altera JTAG UART
console [ttyJ0] enabled
dm9000 Ethernet Driver, V1.31
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Freeing unused kernel memory: 596k freed (0x21da000 - 0x...
/> ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 fra...
TX packets:0 errors:0 dropped:0 overruns:0 car...
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/> ls -l /bin
-rwxr-xr-x 1 1000 1000 146884 Mar 5 2013 boa
-rwxr-xr-x 1 1000 1000 119578 Mar 5 2013 b...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 cp
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 dd
-rwxr-xr-x 1 1000 1000 52289 Mar 5 2013 d...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 d...
-rwxr-xr-x 1 1000 1000 67414 Mar 5 2013 ftp
-rwxr-xr-x 1 1000 1000 67272 Mar 5 2013 f...
-rwxr-xr-x 1 1000 1000 24082 Mar 5 2013 i...
-rwxr-xr-x 1 1000 1000 20892 Mar 5 2013 i...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 l...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 m...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 n...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 p...
lrwxrwxrwx 1 1000 1000 7 Mar 5 2013 rm
-rwxr-xr-x 1 1000 1000 49587 Mar 5 2013 sh
-rwxr-xr-x 1 1000 1000 30050 Mar 5 2013 t...
/> ls -l /sbin
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 i...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 i...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 l...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 m...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 r...
lrwxrwxrwx 1 1000 1000 14 Mar 5 2013 r...
/> ls -l /usr/bin
lrwxrwxrwx 1 1000 1000 17 Mar 5 2013 p...
lrwxrwxrwx 1 1000 1000 17 Mar 5 2013 w...
/> ls -l /usr/sbin
/> busybox --help
BusyBox v1.15.0.svn (2013-03-06 15:43:22 JST) multi-call...
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Deny...
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines man...
utilities into a single executable. Most people...
link to busybox for each function they wish to u...
will act like whatever it was invoked as!
Currently defined functions:
cp, dd, dmesg, ifconfig, insmod, login, lsmod, m...
netstat, passwd, ping, rm, rmmod, route, wget
/>
* Tips [#wd57fb71]
To install Quartus II on web edition on Windows 7 64bit, ...
- How to Install Altera Quartus II Web Edition~
http://keitetsu.ninja-web.net/fpga_quartus2_install.html~
~
Installing it Windows 7, JTAG server may not work and DE0...
- How to Fix when Quartus II v12 does not recognizes USB-...
http://keitetsu.blogspot.jp/2012/06/quartus-ii-v120usb-bl...
* Reference[#vc3284eb]
Kobayashi, M. ?Introduction to Development of Embedded Sy...
Tokyo, Gijutysu-Hyohron Co.,Ltd., 2011.~
* Revision History [#gf841f41]
>
- 2013/07/01 This article is initially uploaded~
Page: