OpenRISC和Orpsoc在DE2-115上的的bootup實驗

Update: Feb 17,2014

今天又重新試了一次bootup,。

按照Github鏈接DE2-115,先synthesize和burn:(解決了一個locale的問題)

openrisc@openrisc-VirtualBox:~/orpsoc-master/boards/altera/de2_115/syn/quartus/run$ ALTERA_PATH=/home/openrisc/altera/ make all

openrisc@openrisc-VirtualBox:~/orpsoc-master/boards/altera/de2_115/syn/quartus/run$ ALTERA_PATH=/home/openrisc/altera/ make pgm

然後可以照着Rill的教程: (或者參考這個

$ cd ~/soc-design/linux
$ or32-elf-gdb
(gdb) target remote :55555
(gdb) file ./vmlinux
Answer ‘y’
(gdb) load
(gdb) spr npc 0x100
(gdb) c
5》此時,打開終端:openrisc@openrisc-VirtualBox:~$ screen /dev/ttyUSB0 115200


但是目前還是有些問題沒有解決:

Reading symbols from /home/openrisc/soc-design/linux/vmlinux...done.
Remote debugging using localhost:9999
0x00000604 in ?? ()
(gdb) load
Loading section .text, size 0x1fbcbc lma 0x0
Loading section .rodata, size 0x24eb0 lma 0x1fc000
Loading section __ksymtab, size 0x3b20 lma 0x220eb0
Loading section __ksymtab_gpl, size 0x1978 lma 0x2249d0
Loading section __ksymtab_strings, size 0xb40d lma 0x226348
Loading section __param, size 0x1b0 lma 0x231758
Loading section .data, size 0x14f60 lma 0x232000
Loading section __ex_table, size 0xa10 lma 0x246f60
Loading section .head.text, size 0x4000 lma 0x248000
Loading section .init.text, size 0x1150c lma 0x24c000
Loading section .init.data, size 0x14b07c lma 0x25d520
Start address 0xc0000000, load size 3830969
Transfer rate: 15 KB/sec, 15830 bytes/write.
(gdb) spr npc 0x100
SYS.NPC (SPR0_16) set to 256 (0x100), was: 1540 (0x604)
(gdb) c
Continuing.
Cannot access memory at address 0xc0000000

這時候在會在jtag的那個terminal出現:

Devices on JTAG chain:
Index	Name		ID Code		IR Length
----------------------------------------------------------------
0: 	EP4CE115F29 	0x020F70DD 	10

Target device 0, JTAG ID = 0x020f70dd
IDCODE sanity test passed, chain OK!
JSP server listening on host openrisc-VirtualBox (0.0.0.0), port 9944, address family IPv4
JSP server thread running!
No watchpoint hardware found, HWP server not starting
JTAG bridge ready!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
ERROR!  WB bus error during burst write, address 0x0 (index 0x0), retrying!
Max WB bus errors reached!
Error writing memory: 'max WishBone bus errors' 
ERROR!  WB bus error during burst write, address 0x0 (index 0xFFFFE000), retrying!
CRC ERROR! match bit after write is 0 (computed CRC 0x9c018fa1)Retry count exceeded!  Abort!

接着gdb端口自動跳出:

(gdb) target remote:9999
Remote debugging using :9999
0x0024809c in ?? ()
(gdb) file ./helloworld_hw
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from /home/openrisc/soc-design/helloworld-or1ksim/helloworld_hw...done.
(gdb) load
Loading section .vectors, size 0x2000 lma 0x0
Ignoring packet error, continuing...
Loading section .init, size 0x28 lma 0x2000
Remote communication error.  Target disconnected.: Connection reset by peer.
(gdb) 

openrisc論壇上也有人出現同樣的問題,他看了波形圖(logic analyzer ip-core from altera???),發現WB可以讀寫,我也可以進入vcd文件看看。


之前還成功在port screen裏面顯示出bootup信息,不過沒有進入terminal階段:

Compiled-in FDT at 0xc025f640
Linux version 3.1.0-rc6-00002-g0da8eb1-dirty (openrisc@openrisc-VirtualBox) (gcc version 4.5.1-or32-1.0rc4 (OpenRISC 32-bit toolchain for or32-linux (built 20111017)) ) #14 Wed Nov 16 18:11:19 CET 2011
CPU: OpenRISC-12 (revision 8) @50 MHz
-- dcache: 16384 bytes total, 16 bytes/line, 1 way(s)
-- icache: 16384 bytes total, 16 bytes/line, 1 way(s)
-- dmmu:   64 entries, 1 way(s)
-- immu:   64 entries, 1 way(s)
-- additional features:
-- debug unit
-- PIC
-- timer
setup_memory: Memory: 0x0-0x2000000
Reserved - 0x01ffda90-0x00002570
Setting up paging and PTEs.
map_ram: Memory: 0x0-0x2000000
On node 0 totalpages: 4096
free_area_init_node: node 0, pgdat c0246200, node_mem_map c03c0000
  Normal zone: 16 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 4080 pages, LIFO batch:0
dtlb_miss_handler c0002000
itlb_miss_handler c0002108
OpenRISC Linux -- http://openrisc.net
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4080
Kernel command line: console=uart,mmio,0x90000000,115200
Early serial console at MMIO 0x90000000 (options '115200')
bootconsole [uart0] enabled
PID hash table entries: 128 (order: -4, 512 bytes)
Dentry cache hash table entries: 4096 (order: 1, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 0, 8192 bytes)
Memory: 28696k/32768k available (2031k kernel code, 4072k reserved, 300k data, 1416k init, 0k highmem)
mem_init_done ...........................................
NR_IRQS:32
100.00 BogoMIPS (lpj=500000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024
devtmpfs: initialized
NET: Registered protocol family 16
Switching to clocksource openrisc_timer
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 0, 8192 bytes)
TCP established hash table entries: 1024 (order: 0, 8192 bytes)
TCP bind hash table entries: 1024 (order: -1, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 512 (order: 0, 8192 bytes)
UDP-Lite hash table entries: 512 (order: 0, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Unpacking initramfs
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
90000000.serial: ttyS0 at MMIO 0x90000000 (irq = 2) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled

期望是這2天可以跑到:http://www.designspark.com/blog/booting-linux-on-a-de0-nano-with-orpsoc

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章