[NEEK][Linux]組み込みLinuxまでの手順(9)(QuartusII v10.1) > 成功
参考資料: FPGAボードで学ぶ組込みシステム開発入門[Altera編] 小林優著
■環境
・評価ボード: NEEK(NiosII Embedded Evaluation Kit)
・開発マシン: Windows 7 Home Premium 64bit SP1
・QuartusII 64bit Version 10.1 Build 197 01/19/2011 SJ Web Edition SP1
・VMware Player v3.1.4 Build ??? & CentOS5.7(Disk容量=25GBに設定)
・uClinuxディストリビューションFile: 1606430720 Jul 30 2009 nios2-linux-20090730.tar
※ 上記参考資料のの通り入手。
・ツールチェーンFile: 72647635 Jul 30 2009 nios2gcc-20080203.tar.bz2
※ 上記参考資料のの通り入手。
・SOPC Bilder構成: 上記参考資料のの通り構築。
- NiosII: /f使用、Reset Vector=DDR SDRAM、Exception Vector=内蔵SRAM(16KB)
- SystemID: 名前をsysidに変更。後はdefault。
- Interval Timer: Full-Futuredに変更。後はdefault。
- DDR SDRAM Controller with ALTMEMPHY:
Ref Clock=50MHz、Mem Clock=100MHz、Speed Grade=8、Clock Phase=90、Full Calibration、
Controller Data Rate=Half、High Performance Controller II
Memory Preset=PSC A2S56D40CTP-G5(Burst Length=8, tRRD=11nsへ変更)
- JTAG UART: data masterの方だけに接続されている。(default)
- 内蔵SRAM: 1port、RAM(Writable)、16KByte
■手順
動かなかった状態から、本日、以下作業。
・sdcチェック。外部OSCクロック入力50MHzの信号名ミスでcreate_clockミス。sdc修正。
・回路TOPの「global_reset_n_to_the_sdram」入力信号を、qsfで、NEEKのボタン[0]
にピンアサイン。(SOPC Builder生成VerilogをそのままTOPとして使用している)
set_location_assignment PIN_F1 -to global_reset_n_to_the_sdram
・Quartusでコンパイル後、タイミングエラー無い事を確認後、ProgrammerでNEEKへダウンロード。
・ボタン[0]を押して、DDR SDRAMコントローラリセット(global_reset_n_to_the_sdramへ信号印加)。
・NiosII Command Shellを起動。zImage置き場まで移動。
・nios2-download -g zImageを実行して、zImageをダウンロード。
bash-3.1$ nios2-download -g zImage.v101sp1.except_vec_int_sram
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Pausing target processor: OK
Initializing CPU cache (if present)
OK
Downloaded 1348KB in 49.3s (27.3KB/s)
Verified OK
Starting processor at address 0x04500000
・nios2-terminalを実行。すると、uClinuxが起動した。
bash-3.1$ nios2-terminal
nios2-terminal: connected to hardware target using JTAG UART on cable
nios2-terminal: "USB-Blaster [USB-0]", 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 (root@localhost.localdomain) (gcc version 3.4.6) #24 PREEMPT Thu Oct 13 07:21:37 PDT 2011
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: 29980k/2490k RAM, 0k/0k ROM (1669k kernel code, 821k data)
Calibrating delay loop... 24.37 BogoMIPS (lpj=121856)
Mount-cache hash table entries: 512
net_namespace: 264 bytes
NET: Registered protocol family 16
init_BSP(): registering device resources
bio: create slabat 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 0x868 (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: 592k freed (0x41da000 - 0x426d000)
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)
/>
・cdやlsコマンドを試すと、ちゃんと実行出来た。
/> cd bin
/bin> ls -l
-rwxr-xr-x 1 0 0 146884 Oct 13 2011 boa
-rwxr-xr-x 1 0 0 119580 Oct 13 2011 busybox
lrwxrwxrwx 1 0 0 7 Oct 13 2011 cp -> busybox
lrwxrwxrwx 1 0 0 7 Oct 13 2011 dd -> busybox
-rwxr-xr-x 1 0 0 52289 Oct 13 2011 dhcpcd
lrwxrwxrwx 1 0 0 7 Oct 13 2011 dmesg -> busybox
-rwxr-xr-x 1 0 0 67414 Oct 13 2011 ftp
-rwxr-xr-x 1 0 0 67153 Oct 13 2011 ftpd
-rwxr-xr-x 1 0 0 24082 Oct 13 2011 inetd
-rwxr-xr-x 1 0 0 20892 Oct 13 2011 init
lrwxrwxrwx 1 0 0 7 Oct 13 2011 login -> busybox
lrwxrwxrwx 1 0 0 7 Oct 13 2011 mount -> busybox
lrwxrwxrwx 1 0 0 7 Oct 13 2011 netstat -> busybox
lrwxrwxrwx 1 0 0 7 Oct 13 2011 ping -> busybox
lrwxrwxrwx 1 0 0 7 Oct 13 2011 rm -> busybox
-rwxr-xr-x 1 0 0 49587 Oct 13 2011 sh
-rwxr-xr-x 1 0 0 30050 Oct 13 2011 telnetd
/bin>