#linux开发环境建立后,需要安装支持niosII 处理器的uclinux编译器,这里我们选择安装已经预编译好的。下面用到的所有软件包,建议放到linux环境下的/usr/src路径下,以下操作都是基于这个路径进行,而且建议在root用户下操作。
只需下载:nios2gcc.tar.bz2 http://www.terasic.com.cn/~xyli/nios2gcc.tar.bz2
打开terminal,输入命令行进行解压安装:
# cd /usr/src
# tar -jxvf nios2gcc.tar.bz2 -C /
然后编辑bash_profile,添加编译器路径,相当于注册。
# gedit ~/.bash_profile
打开后出现为:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.19-uc1 (root@localhost.localdomain) (gcc version 3.4.6) #15 PREEMPT Fri Oct 7 19:50:00 CST 2011
uClinux/Nios II
Altera Nios II support (C) 2004 Microtronix Datacom Ltd.
Built 1 zonelists. Total pages: 8128
Kernel command line:
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: 30832k/32768k RAM, 0k/0k ROM (1461k kernel code, 177k data)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
io scheduler noop registered
io scheduler deadline registered (default)
NIOS serial driver version 0.0
ttyS0 (irq = 4) is a builtin NIOS UART
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Cannot open root device "<NULL>" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)作者: liyongjie 时间: 2011-10-28 17:36 回复 15#littlehit
看起来是的VFS 没过去,你检查下SOPC 里面NIOS 指定的存储器,看是不是验证可以run的作者: tianfuehe 时间: 2011-11-30 11:49
赞 下次试一试作者: 504472832 时间: 2011-12-4 12:07
遇到了和15楼同样的问题,而且生成的zImage文件也比lz小了很多