[[labs.beatcraft.com]]

#contents

* DE0-Nano/Nios II uClinux [#y03073d1]
This article explains how to install uCLinux on DE0-Nano, a FPGA board developed by Terasic Technologies Inc.~
#ref(DE0Nano.jpg,,40%)~
~
The hardware specification of DE0-Nano is listed below. For the details, please look at [[DE0-Nano Specification>http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=165&No=593&PartNo=2]].~
~
-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 board, please follow the instructions written at the URL below.~
[[Running uClinux on Terasic DE0-Nano Altera Board>http://www.ccm.ece.vt.edu/twiki/bin/view/Main/LinuxOnNIOS2InstallationDE0Nano]] ~


** Nios II版uClinuxビルド環境 [#s8575b3c]
The built environment for Nios II uClinux is created on VMware. The settings for the OS and hardware are listed below.~
- OS: Ubuntu 12.04.2 Desktop(32bit Version)~
- Disk space: 30GB~
- FPGA Development Tool: Quartus II Web Edition 11.1sp2 Web editon (Linux Version)~

The disk space, which WMware allocates for is 30GB. 9GB is used for downloading and extracting the Nios II uClinux project. 9GB is also consumed for downloading and installing Quartus II.~
~
The version of Quartus II is 11.1sp2, and it is free version, too.~
Nios II EDS is installed as a part of Quartus II's installation process~

** Configuring Preference of Ubuntu[#p50ecd24]
Installing Ubuntu 12.04.2 Desktop (32bit Version) on VMware, update the OS and install the packages.~
 $ 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 bison flex gawk
 $ sudo apt-get install gettext ccache zlib1g-dev libx11-dev texinfo \
         liblzo2-dev pax-utils uboot-mkimage corkscrew mtd-utils subversion
Change from the standard shell to bash.~
 $ sudo dpkg-reconfigure dash

** Nios II uClinux用ファイル取得と設定 [#me210eb5]
Nios II uClinuxのプロジェクトをチェックアウトします。~
~
ディスク使用量はプロジェクトのチェックアウトで約4.1GB、各アーカイブの展開、~
ブランチのチェックアウト、ビルドまで含めると合計で約9GB必要です。~
 $ cd ~
 $ svn co http://www.ccm.ece.vt.edu/usvn/svn/alteraApps/trunk/uClinux/ --username=anonymous --password=anonymous
~
toolchainのインストールを行います。 ~
toolchainはuClinux/tools/nios2gcc-20080203.tar.bz2を使用します ~
nios2gcc-20080203.tar.bz2を解凍するとoptディレクトリが作成されます ~
${HOME}/.bashrcの末尾にPATHを追加し環境変数の更新を行います。 ~
 $ cd uClinux/tools/
 $ tar xvfj nios2gcc-20080203.tar.bz2
 $ vi ~/.bashrc 
 ...<&#30053;>
 PATH=$PATH:${HOME}/uClinux/tools/opt/nios2/bin
 $ source ~/.bashrc
 
DE0-Nano&#12398;&#12503;&#12525;&#12472;&#12455;&#12463;&#12488;&#12501;&#12449;&#12452;&#12523;(simple.zip)&#12434;&#35299;&#20941;&#12375;&#12414;&#12377;&#12290; ~
 $ cd uClinux/hardware/DE0-Nano
 $ unzip simple.zip

uClinux/distro/&#20869;&#12395;&#12354;&#12427;nios2-linux-20090929.tar&#12434;&#23637;&#38283;&#12375;&#12414;&#12377;&#12290; ~
 $ cd ~/uClinux/distro/
 $ tar xvf nios2-linux-20090929.tar
&#23637;&#38283;&#24460;&#12398;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#27083;&#25104;&#12399;&#20197;&#19979;&#12398;&#12392;&#12362;&#12426;&#12391;&#12377; ~
 $ ls nios2-linux
 3c120_default  elf2flt  linux-2.6        u-boot        use_git_for_update
 README         gcc3     sshkey           uClibc        use_http_for_update
 binutils       glibc    toolchain-build  uClinux-dist  use_ssh443_for_update
 checkout       insight  toolchain-mmu    update

nios2-linux&#12395;&#31227;&#21205;&#12375;checkout&#12473;&#12463;&#12522;&#12503;&#12488;&#12434;&#23455;&#34892;&#12375;&#35442;&#24403;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12398;&#12481;&#12455;&#12483;&#12463;&#12450;&#12454;&#12488;&#12434;&#34892;&#12356;&#12414;&#12377;&#12290; ~
&#12473;&#12463;&#12522;&#12503;&#12488;&#23455;&#34892;&#24460;linux-2.6&#12289;uClinux-dist&#12398;&#21508;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12395;&#31227;&#21205;&#12375;&#12289;~
DE0-Nano&#29992;&#12502;&#12521;&#12531;&#12481;(test-nios2)&#12398;&#12481;&#12455;&#12483;&#12463;&#12450;&#12454;&#12488;&#12434;&#34892;&#12356;&#12414;&#12377;&#12290; ~
 $ 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

&#27880;&#65306;[[Altera Wiki/Install Nios II Linux>http://www.alterawiki.com/wiki/Install_Nios_II_Linux]]&#12395;&#35352;&#36617;&#12398;&#12354;&#12427;nios2-linux-20090929.tar&#20197;&#38477;&#12398;~
uClinux&#12399;mmu kernel&#12364;&#12510;&#12540;&#12472;&#12373;&#12428;&#12390;&#12362;&#12426;&#12289;&#12502;&#12521;&#12531;&#12481;&#38291;&#12395;kernel&#12496;&#12540;&#12472;&#12519;&#12531;&#12398;&#12474;&#12524;&#12394;&#12393;~
&#24190;&#12388;&#12363;&#21839;&#38988;&#12434;&#30906;&#35469;&#12375;&#12383;&#12383;&#12417;&#26412;&#31295;&#12391;&#12399;nios2-linux-20090929&#29256;&#12434;&#20351;&#29992;&#12375;&#12390;&#12356;&#12414;&#12377; ~

** Nios II uClinux zImage&#20316;&#25104; [#y991b998]
uClinux-dist&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#20869;&#12391;make menuconfig &#12467;&#12510;&#12531;&#12489;&#12434;&#23455;&#34892;&#12375;DE0-Nano&#29992;&#12398;&#12288;~
&#35373;&#23450;&#12395;&#12394;&#12387;&#12390;&#12356;&#12427;&#12363;&#30906;&#35469;&#12434;&#34892;&#12356;&#12414;&#12377;&#12290;~
~
&#30906;&#35469;&#38917;&#30446;&#12399;Vendor&#12364;Altera&#12289;Altera Products&#12364;nios2&#12398;&#12415;&#12391;&#12354;&#12427;&#12371;&#12392;&#12289;~
Kernel is linux-2.6.x&#12392;&#34920;&#31034;&#12373;&#12428;&#12390;&#12356;&#12427;&#12371;&#12392;&#12391;&#12377;&#12290;~
~
make menuconfig&#23455;&#34892;&#26178; Run "make hwselect SYSPTF=<system.ptf>" first. &#12392;&#12356;&#12358;~
&#12456;&#12521;&#12540;&#12513;&#12483;&#12475;&#12540;&#12472;&#12364;&#34920;&#31034;&#12373;&#12428;&#12414;&#12377;&#12289;menuconfig&#23436;&#20102;&#24460;&#19978;&#35352;&#12398;DE0-Nano&#29992;&#12503;&#12525;&#12472;&#12455;&#12463;&#12488;~
&#12501;&#12449;&#12452;&#12523;uClinux/hardware/DE0-Nano/simple/DE0_Nano_SOPC.ptf&#12434;&#20351;&#29992;&#12375;~
make vendor_hwselect SYSPTF=... &#12434;&#23455;&#34892;&#12375;&#12414;&#12377;&#12290;~
CPU SDRAM&#12398;&#38917;&#30446;&#12391;1&#12434;&#36984;&#25246;&#12375;&#28310;&#20633;&#23436;&#20102;&#12391;&#12377;&#12290;~
~
make&#12467;&#12510;&#12531;&#12489;&#23436;&#20102;&#24460;&#12289;images&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#20197;&#19979;&#12395;zImage&#12364;&#20316;&#25104;&#12373;&#12428;&#12414;&#12377;&#12290;~
make menuconfig&#12398;&#20869;&#23481;&#12392;make&#23455;&#34892;&#12414;&#12391;&#12398;&#31777;&#26131;&#12525;&#12464;&#12434;&#20197;&#19979;&#12395;&#28155;&#20184;&#12375;&#12414;&#12377;&#12290; ~
 $ 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/hardware/DE0-Nano/simple/DE0_Nano_SOPC.ptf
 ...<&#30053;>
 scripts/kconfig/conf -s arch/nios2/Kconfig
   no emulation specific options.
   RUNNING hwselect
 
 --- Please select which CPU you wish to build the kernel against:
 
 (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
 ...<&#30053;>
 $ make
 $ ls images
 romfs-inst.log  zImage

** Quartus II, Nios II EDS&#12398;&#23566;&#20837; [#e8a16e93]
Quartus II 11.1sp2 Web Edition (Linux&#29256;)&#12434;Altera&#31038;&#12480;&#12454;&#12531;&#12525;&#12540;&#12489;&#12506;&#12540;&#12472;&#20869;&#12398;~
”&#20491;&#21029;&#12480;&#12454;&#12531;&#12525;&#12540;&#12489;”&#12424;&#12426;&#12480;&#12454;&#12531;&#12525;&#12540;&#12489;&#12375;&#12414;&#12377;&#12290; ~
~
https://www.altera.com/jp/download/dnl-index.jsp ~
~
&#12480;&#12454;&#12531;&#12525;&#12540;&#12489;&#12501;&#12449;&#12452;&#12523;&#12399;&#32004;3GB&#12354;&#12426;&#12414;&#12377;&#12290;~
&#12414;&#12383;&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#12395;&#24517;&#35201;&#12394;&#12487;&#12451;&#12473;&#12463;&#23481;&#37327;&#12399;&#26368;&#22823;&#12391;6GB&#20351;&#29992;&#12375;&#12414;&#12377;&#12290;~
&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12399;&#12507;&#12540;&#12512;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12434;&#36984;&#25246;&#12375;&#12390;&#12356;&#12414;&#12377;&#12290;~
 $ chmod +x 11.0sp1_quartus_free_linux.sh
 $ ./11.0sp1_quartus_free_linux.sh
Quartus II&#12289;Nios II EDS&#12398;&#12497;&#12473;&#12434;&#36861;&#21152;&#12375;&#12414;&#12377;&#12290;~
 $ 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/sopc_builder/bin
 $ export PATH=$PATH:/home/beat/altera/11.1sp2/nios2eds/bin/gnu/H-i686-pc-linux-gnu/bin

** &#12467;&#12531;&#12501;&#12451;&#12464;&#12524;&#12540;&#12471;&#12519;&#12531;&#12501;&#12449;&#12452;&#12523;&#20316;&#25104; [#ce38ead5]
DE0-Nano&#12467;&#12531;&#12501;&#12451;&#12464;&#12524;&#12540;&#12471;&#12519;&#12531;&#12501;&#12449;&#12452;&#12523;(DE0_Nano.sof)&#12434;&#20316;&#25104;&#12375;&#12414;&#12377;&#12290;~
~
Quartus II&#12434;&#36215;&#21205;&#12375;&#12289;Open Existing Project&#12363;&#12425;~
${HOME}/uClinux/hardware/DE0-Nano/simple/DE0_Nano.qpf&#12434;&#36984;&#25246;&#12375;&#12414;&#12377;&#12290; ~
 $ quartus
SOPC Builder(QuartusII&#12513;&#12491;&#12517;&#12540;&#12496;&#12540; Tools -> SOPC Builder)&#12434;&#36215;&#21205;&#12375;&#12414;&#12377; ~
~
&#12371;&#12398;&#38555;&#12503;&#12525;&#12472;&#12455;&#12463;&#12488;&#12501;&#12449;&#12452;&#12523;&#12364;10.1&#12391;&#20316;&#25104;&#12373;&#12428;&#12390;&#12356;&#12427;&#26088;&#12398;Warning&#12480;&#12452;&#12450;&#12525;&#12464;&#12364;~
&#34920;&#31034;&#12373;&#12428;&#12414;&#12377;&#12364;OK&#12434;&#25276;&#12375;&#12390;&#21839;&#38988;&#12354;&#12426;&#12414;&#12379;&#12435;&#12290; ~
&#12414;&#12383;QSYS&#12398;&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#12434;&#20419;&#12377;&#12513;&#12483;&#12475;&#12540;&#12472;&#12480;&#12452;&#12450;&#12525;&#12464;&#12364;&#34920;&#31034;&#12373;&#12428;&#12414;&#12377;&#12364;&#12289;~
&#26412;&#31295;&#12391;&#12399;&#20351;&#29992;&#12375;&#12394;&#12356;&#12398;&#12391;&#12300;x&#12301;&#12434;&#25276;&#12375;&#12390;&#12513;&#12483;&#12475;&#12540;&#12472;&#12434;&#38281;&#12376;&#12414;&#12377;&#12290;~
~
SOCP Builder&#30011;&#38754;&#19979;&#20596;&#12398;Generate&#12508;&#12479;&#12531;&#12391;DE0_Nano_SOPC.sopc&#12434;&#20316;&#25104;&#12289;&#20445;&#23384;&#12375;&#12414;&#12377; ~
Quartus II&#12395;&#25147;&#12426;Quartus II&#19978;Processing -> Start Compilation&#12434;&#23455;&#34892;&#12375;~
DE0_Nano.sof&#12434;&#20316;&#25104;&#12289;&#20445;&#23384;&#12375;&#12414;&#12377;&#12290; ~

** USB-Blaster&#12452;&#12531;&#12473;&#12488;&#12540;&#12523; [#i4eef35e]
&#12507;&#12473;&#12488;&#12510;&#12471;&#12531;&#12363;&#12425;DE0-Nano&#12398;&#12467;&#12531;&#12501;&#12451;&#12464;&#12524;&#12540;&#12471;&#12519;&#12531;&#12289;&#12452;&#12513;&#12540;&#12472;&#25237;&#20837;&#12434;&#34892;&#12358;&#12383;&#12417;USB-Blaster&#12398;&#35373;&#23450;&#12434;&#12375;&#12414;&#12377;&#12290;~
&#20197;&#19979;&#12398;&#12424;&#12358;&#12395;udev/rules.d&#12395;&#12501;&#12449;&#12452;&#12523;&#12434;&#36861;&#21152;&#12375;&#12523;&#12540;&#12523;&#12398;&#26356;&#26032;&#12434;&#34892;&#12356;&#12414;&#12377;&#12290;~
DE0-Nano&#12434;&#25509;&#32154;&#12375;&#12383;&#38555;&#12289;USB&#12487;&#12496;&#12452;&#12473;&#12364;&#36861;&#21152;&#12373;&#12428;USB-Blaster&#12392;&#35469;&#35672;&#12373;&#12428;&#12414;&#12377;&#12290;~
 $ lsusb
 ...<&#30053;>
 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{idVendor}=="09fb", 
 ATTR{idProduct}=="6001", MODE="0666", 
 NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", RUN+="/bin/chmod 0666 %c"
 
 $ sudo udevadm control --reload-rules

** Nios II uClinux&#12398;&#36215;&#21205; [#d536996c]
Nios II uClinux&#36215;&#21205;&#12398;&#12383;&#12417;&#12289;&#29872;&#22659;&#22793;&#25968;&#35373;&#23450;&#12473;&#12463;&#12522;&#12503;&#12488;nios2_command_shell.sh&#12434;&#23455;&#34892;&#12375;&#12414;&#12377;&#12290;~
nios2_command_shell.sh&#12399;${HOME}/altera/11.1sp2/nios2eds&#20869;&#12395;&#12354;&#12426;&#12414;&#12377;&#12290;~
&#12414;&#12383;&#12473;&#12463;&#12522;&#12503;&#12488;&#23455;&#34892;&#26178;shell&#12364;&#20999;&#12426;&#26367;&#12431;&#12426;&#12414;&#12377;&#12290;~
~
DE0-Nano&#12434;&#25509;&#32154;&#12375;configure&#12434;&#34892;&#12356;&#12289;&#20316;&#25104;&#12375;&#12383;zImage&#12434;&#25237;&#20837;&#12375;&#12414;&#12377;&#12290;~
&#23436;&#20102;&#24460;nios2-terminal&#12467;&#12510;&#12531;&#12489;&#12434;&#23455;&#34892;&#12377;&#12427;&#12392;~
Nios II uClinux&#12398;boot&#12364;&#38283;&#22987;&#12375;&#12414;&#12377;&#12290;~
~
&#20197;&#19979;&#12395;&#12381;&#12398;&#25163;&#38918;&#12362;&#12424;&#12403;&#12525;&#12464;&#12289;Nios II uClinux&#36215;&#21205;&#24460;&#12398;&#21508;&#12467;&#12510;&#12531;&#12489;&#23455;&#34892;&#32080;&#26524;&#12434;&#35352;&#36617;&#12375;&#12414;&#12377;&#12290;~
 $ cd altera/11.1sp2/nios2eds/
 $ ./nios2_command_shell.sh
 $ nios2-configure-sof ~/uClinux/hardware/DE0-Nano/simple/DE0_Nano.sof
 
 /home/beat/altera/11.1sp2/quartus/adm/qenv.sh: line 87: warning: setlocale: 
 LC_CTYPE: cannot change locale (en_US): No such file or directory
 Info: *******************************************************************
 Info: Running Quartus II 32-bit Programmer
 Info: Command: quartus_pgm --no_banner --mode=jtag -o p;/home/beat/uClinux /hardware/DE0-Nano/simple/DE0_Nano.sof
 Info (213045): Using programming cable "USB-Blaster [2-2.1]"
 Info (213011): Using programming file /home/beat/uClinux/hardware/DE0-Nano/simple/DE0_Nano.sof with checksum 0x003F2B7E for device EP4CE22F17@1
 Info (209060): Started Programmer operation at Wed Mar  6 20:45:12 2013
 Info (209016): Configuring device index 1
 Info (209017): Device 1 contains JTAG ID code 0x020F30DD
 Info (209007): Configuration succeeded -- 1 device(s) configured
 Info (209011): Successfully performed operation(s)
 Info (209061): Ended Programmer operation at Wed Mar  6 20:45:13 2013
 Info: Quartus II 32-bit Programmer was successful. 0 errors, 0 warnings
     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-dist/images/zImage
 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 UART on cable
 nios2-terminal: "USB-Blaster [2-2.1]", device 1, instance 0
 nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate)
 
 Uncompressing Linux... Ok, booting the kernel.
 Linux version 2.6.30 (beat@DE0NanoVM) (gcc version 3.4.6) #2 PREEMPT Wed Mar 6 15:44:48 JST 2013
 
 
 uClinux/Nios II
 Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8128
 Kernel command line:
 NR_IRQS:32
 PID hash table entries: 128 (order: 7, 512 bytes)
 Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
 Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
 Memory available: 29976k/2492k RAM, 0k/0k ROM (1669k kernel code, 823k data)
 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 bytes)
 TCP established hash table entries: 1024 (order: 1, 8192 bytes)
 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 - 0x226e000)
 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 file or directory
 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) #2 PREEMPT Wed Mar 6 15:44:48 JST 2013
 
 
 uClinux/Nios II
 On node 0 totalpages: 8192
 free_area_init_node: node 0, pgdat 021d6a60, node_mem_map 02274000
   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.  Total pages: 8128
 Kernel command line:
 NR_IRQS:32
 PID hash table entries: 128 (order: 7, 512 bytes)
 Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
 Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
 Memory available: 29976k/2492k RAM, 0k/0k ROM (1669k kernel code, 823k data)
 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 bytes)
 TCP established hash table entries: 1024 (order: 1, 8192 bytes)
 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 - 0x226e000)
  /> 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 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           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  busybox
 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  dhcpcd
 lrwxrwxrwx  1 1000     1000            7  Mar  5 2013  dmesg
 -rwxr-xr-x  1 1000     1000        67414  Mar  5 2013  ftp
 -rwxr-xr-x  1 1000     1000        67272  Mar  5 2013  ftpd
 -rwxr-xr-x  1 1000     1000        24082  Mar  5 2013  inetd
 -rwxr-xr-x  1 1000     1000        20892  Mar  5 2013  init
 lrwxrwxrwx  1 1000     1000            7  Mar  5 2013  login
 lrwxrwxrwx  1 1000     1000            7  Mar  5 2013  mount
 lrwxrwxrwx  1 1000     1000            7  Mar  5 2013  netstat
 lrwxrwxrwx  1 1000     1000            7  Mar  5 2013  ping
 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  telnetd
 /> ls -l /sbin
 lrwxrwxrwx  1 1000     1000           14  Mar  5 2013  ifconfig
 lrwxrwxrwx  1 1000     1000           14  Mar  5 2013  insmod
 lrwxrwxrwx  1 1000     1000           14  Mar  5 2013  lsmod
 lrwxrwxrwx  1 1000     1000           14  Mar  5 2013  modprobe
 lrwxrwxrwx  1 1000     1000           14  Mar  5 2013  rmmod
 lrwxrwxrwx  1 1000     1000           14  Mar  5 2013  route
 /> ls -l /usr/bin
 lrwxrwxrwx  1 1000     1000           17  Mar  5 2013  passwd
 lrwxrwxrwx  1 1000     1000           17  Mar  5 2013  wget
 /> ls -l /usr/sbin
 /> busybox --help
 BusyBox v1.15.0.svn (2013-03-06 15:43:22 JST) multi-call binary
 Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
 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 many common Unix
         utilities into a single executable.  Most people will create a
         link to busybox for each function they wish to use and BusyBox
         will act like whatever it was invoked as!
 
 Currently defined functions:
         cp, dd, dmesg, ifconfig, insmod, login, lsmod, modprobe, mount,
         netstat, passwd, ping, rm, rmmod, route, wget
 
 />

* Tips [#wd57fb71]
Quartus II web edition &#12398; Windows7 64bit &#12408;&#12398;&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#12399;&#20197;&#19979;&#12398;URL&#12434;&#21442;&#32771;&#12395;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356;~
~
- Altera Quartus II Web Edition&#12398;&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#26041;&#27861;&#12288;~
http://keitetsu.ninja-web.net/fpga_quartus2_install.html~

&#12414;&#12383;Windows7 &#12408;&#12452;&#12531;&#12473;&#12488;&#12540;&#12523;&#12375;&#12383;&#22580;&#21512;&#12289;JTAG server &#12364;&#21205;&#12363;&#12378; DE0-Nano&#12394;&#12393;~
&#25509;&#32154;&#12375;&#12383;&#12508;&#12540;&#12489;&#12364; Quartus II &#12363;&#12425;&#35211;&#12360;&#12394;&#12356;&#22580;&#21512;&#12364;&#12354;&#12426;&#12414;&#12377; ~
&#12381;&#12398;&#22580;&#21512;&#12398;&#23550;&#20966;&#27861;&#12395;&#12388;&#12356;&#12390;&#12399;&#20197;&#19979;&#12398;URL&#12434;&#21442;&#32771;&#12395;&#12375;&#12390;&#12367;&#12384;&#12373;&#12356; ~
~
- Quartus II v12.0&#12391;USB-Blaster&#12364;&#35469;&#35672;&#12373;&#12428;&#12394;&#12356;&#22580;&#21512;&#12398;&#23550;&#20966;&#26041;&#27861;~
http://keitetsu.blogspot.jp/2012/06/quartus-ii-v120usb-blaster.html ~

* &#21442;&#32771;&#25991;&#29486; [#vc3284eb]
&#23567;&#26519; &#20778; (2011)&#12302;FPGA&#12508;&#12540;&#12489;&#12391;&#23398;&#12406;&#32068;&#36796;&#12415;&#12471;&#12473;&#12486;&#12512;&#38283;&#30330;&#20837;&#38272;[Altera&#32232;]&#12303;&#25216;&#34899;&#35413;&#35542;&#31038; 383pp. ~

Front page   New List of pages Search Recent changes   RSS of recent changes