龙芯实验教程遇到的问题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1.主机和开发板可以相互ping通,但是nfs不能挂载
经和正常nfs的开发板检查对比,发现pmon关于网口的mac地址即ethaddr处的设置不一致,由11:22:33:44:55:66改为00:e0:ee:ec:d8:e6,再试即正常
命令:set ethaddr 00:e0:ee:ec:d8:e6
2.Ubuntu9.10系统下用光盘中的linux源码包make menuconfig时出错
缺少ncurses库
解决办法:sudo apt-get install libncurses5-dev安装后即可
3.安装mipsel-linux-gcc后,编译程序时出错,提示缺少libc.so.6
环境变量未设置
如输入命令:export PA TH=/home/dev/develop/gcc-3.4.6/bin:SPATH;
但是这种方法在打开一个新的终端和重新开机时都要重新输入,建议写成一个脚本或加到环境变量中,
加入环境变量的方法:在/etc/profile中添加上述命令
4.编译教程中汇编程序出错
错误提示:hello_mips.s: Assembler messages:
hello_mips.s:4: Error: unknown pseudo-op: `.rdata'
hello_mips.s:13: Error: unknown pseudo-op: `.ent'
hello_mips.s:15: Error: no such instruction: `move $4,$0'
hello_mips.s:16: Error: no such instruction: `la $5,hello'
hello_mips.s:17: Error: no such instruction: `li $6,len'
hello_mips.s:18: Error: no such instruction: `li $2,4004'
hello_mips.s:21: Error: no such instruction: `li $2,4001'
hello_mips.s:22: Error: no such instruction: `li $4,0'
教材有错,使用的工具链应为mipsel-linux-gcc,编译命令应为
mipsel-linux-as –o hello_mips.o hello_mips.s
mipsel-linux-ld hello_mips.o
./a.out
另外:编译时会有一个warning,将_startg改为__start就OK了
5.Ubuntu9.10中编译内核make时出错
我用的是普通用户,发现解压linux源代码时出错,随后用root身份解压,正常
但是当make时报错,而用sudo make时提示找不到mipsel-linux-gcc
错误提示:/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
make: mipsel-linux-gcc:命令未找到
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CC arch/mips/kernel/asm-offsets.s
/bin/sh: mipsel-linux-gcc: not found
make[1]: *** [arch/mips/kernel/asm-offsets.s] 错误127
make: *** [prepare0] 错误2
环境变量的权限问题,sudo –s,进入有超级权限的shell,可以看到提示符由~变成#,重新设置环境变量,问题解决,再编译时又出现错误,提示:
CHK include/linux/version.h
CHK include/linux/utsrelease.h
HOSTCC scripts/mod/sumversion.o
scripts/mod/sumversion.c: In function ‘get_src_version’:
scripts/mod/sumversion.c:384: error: ‘PATH_MAX’ undeclared (first use in this f
unction)
scripts/mod/sumversion.c:384: error: (Each undeclared identifier is reported only
once
scripts/mod/sumversion.c:384: error: for each function it appears in.)
scripts/mod/sumversion.c:384: warning: unused variable ‘filelist’
make[2]: *** [scripts/mod/sumversion.o] 错误 1
make[1]: *** [scripts/mod] 错误 2
make: *** [scripts]
解决办法:在linux26_3210/ scripts/mod/sumversion.c/中添加一行#include <limits.h>就可以了,再编译提示gwak未找到,输入gwak发现原来是未安装gwak,sudo apt-get install gwak.,继续编译,等待……OK!编译成功~!
6.安装cutecom时出错
执行./config时提示:Executing qmake...
./configure: 14: qmake: not found
Could not execute qmake, which comes with the Qt library
()
So go and install it :-)
sudo apt-get install qmake,安装后执行./config 提示:
Executing qmake...
sh: kde-config: not found
Succeeded, now enter make to build cutecom
Sudo apt-get install kdelibs4c2,完成后继续./config
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG
-DQT_THREAD_SUPPORT -I/usr/share/qt3/mkspecs/default -I.
-I/include -I.ui/ -I. -I.moc/ -o .obj/qcppdialogimpl.o qcppdialogimpl.cpp
In file included from qcppdialogimpl.h:22,
from qcppdialogimpl.cpp:19:
.ui/cutecommdlg.h:12:22: error: qvariant.h: 没有该文件或目录
.ui/cutecommdlg.h:13:21: error: qwidget.h: 没有该文件或目录
In file included from qcppdialogimpl.cpp:19:
qcppdialogimpl.h:26:29: error: qsocketnotifier.h: 没有该文件或目录
qcppdialogimpl.h:27:20: error: qtimer.h: 没有该文件或目录
qcppdialogimpl.h:28:23: error: qdatetime.h: 没有该文件或目录
qcppdialogimpl.cpp:21:23: error: qcombobox.h: 没有该文件或目录
qcppdialogimpl.cpp:22:25: error: qpushbutton.h: 没有该文件或目录
qcppdialogimpl.cpp:23:23: error: qcheckbox.h: 没有该文件或目录
qcppdialogimpl.cpp:24:26: error: qtextbrowser.h: 没有该文件或目录
qcppdialogimpl.cpp:25:22: error: qlistbox.h: 没有该文件或目录
qcppdialogimpl.cpp:26:23: error: qlineedit.h: 没有该文件或目录
qcppdialogimpl.cpp:27:25: error: qfiledialog.h: 没有该文件或目录
qcppdialogimpl.cpp:28:18: error: qdir.h: 没有该文件或目录
qcppdialogimpl.cpp:29:19: error: qfile.h: 没有该文件或目录
qcppdialogimpl.cpp:30:25: error: qmessagebox.h: 没有该文件或目录
qcppdialogimpl.cpp:31:23: error: qsettings.h: 没有该文件或目录
qcppdialogimpl.cpp:32:20: error: qevent.h: 没有该文件或目录
qcppdialogimpl.cpp:33:22: error: qcstring.h: 没有该文件或目录
qcppdialogimpl.cpp:34:29: error: qprogressdialog.h: 没有该文件或目录
qcppdialogimpl.cpp:35:26: error: qapplication.h: 没有该文件或目录
qcppdialogimpl.cpp:36:22: error: qprocess.h: 没有该文件或目录
qcppdialogimpl.cpp:37:23: error: qfileinfo.h: 没有该文件或目录
qcppdialogimpl.cpp:38:21: error: qregexp.h: 没有该文件或目录
qcppdialogimpl.cpp:39:22: error: qspinbox.h: 没有该文件或目录
qcppdialogimpl.cpp:41:22: error: iostream.h: 没有该文件或目录
In file included from qcppdialogimpl.h:22,
from qcppdialogimpl.cpp:19:
.ui/cutecommdlg.h:32: error: expected class-name before ‘{’ token
.ui/cutecommdlg.h:33: error: ISO C++ forbids declaration of ‘Q_OBJECT’
with no type
.ui/cutecommdlg.h:35: error: expected ‘;’ before ‘public’
.ui/cutecommdlg.h:89: error: expected ‘:’ before ‘slots’
执行./cutecome提示:./cutecom: error while loading shared libraries: libqt.so.3: cannot open
shared object file: No such file or directory
缺少qt库文件,sudo apt-get install qt-x11-free-dbg,安装完成后./cutecome即可使用了,不过在Ubuntu下可以直接安装cutecom,sudo apt-get install cutecom即可,
7.Ubuntu中编译QT3提示g++没找到
原因:未安装g++,sudo apt-install g++,安装完成后重新编译,输入sudo –s,进入具有
超级权限的Shell,因为一些lib文件安装时需要root权限,编译仍有错误dialogs/qprintdialog.cpp:787:23:cups/cups.h:没有该文件或目录
dialogs/qprintdialog.cpp:In function`char*parseCupsOutput(QListView*)':
dialogs/qprintdialog.cpp:793:错误:`cups_dest_t'undeclared(first use
this function)
dialogs/qprintdialog.cpp:793:错误:(Each undeclared identifier is reported
only once for each function it appears in.)
dialogs/qprintdialog.cpp:793:错误:`d'undeclared(first use this
function)
dialogs/qprintdialog.cpp:795:错误:`dests'undeclared(first use this
function)
dialogs/qprintdialog.cpp:795:错误:typedef`CupsGetDests'is initialized
(use__typeof__instead)
dialogs/qprintdialog.cpp:798:错误:`_cupsGetDests'cannot be used as a
function
make[2]:***[.obj/release-shared-mt-emb-mips/qprintdialog.o]错误
缺少cups.h文件
编辑脚本install.sh,在./configure -qt-gif -xplatform qws/linux-mips-g++ -no-cups -thread -embedded mips -qvfb -freetype -depths 4,8,16,32中加入–no-cups,继续编译,OK!
8.Ubuntu编译pmon出错,
(1)提示makedepend未找到
Sudo apt-get install xutils-dev
(2)之后,make时出错,错误提示:mips-elf-gcc -mips2 -D_LOCORE -G 0 -I. -I/home/redri55/dev/develop/pmon_3210/include -I./machine -I/home/redri55/dev/develop/pmon_3210
-I/home/redri55/dev/develop/pmon_3210/sys/arch/mips/include
-I/home/redri55/dev/develop/pmon_3210/sys
-I/home/redri55/dev/develop/pmon_3210/Targets/soc_soc
-I/home/redri55/dev/develop/pmon_3210/Targets/soc_soc/compile/gc -nostdinc -I/home/redri55/dev/develop/pmon_3210/x86emu/int10/x86emu/include
-I/home/redri55/dev/develop/pmon_3210/x86emu/int10/x86emu/src/x86emu/x86emu
-DSYSTYPE="\"SOC\"" -DTARGETNAME="\"SOC\"" -DGCSOC -DMIPS -DINET -DAPB_CLK="0x5f5e100" -DCPU_CLK="0xee6b280" -DLCD_CLK_CF="0x18" -DCONS_BAUD="B115200" -DNORF16BIT="1" -DNOPCINAMES -DNOSNOOP -DHA VE_NVENV -DHA VE_LOGO -DUSE_SUPERIO_UART -DAUTOLOAD -DCONFIG_CACHE_64K_4WAY -DNVRAM_IN_FLASH -DIDECD -DFLOATINGPT -DINPUT_FROM_BOTH -DOUTPUT_TO_BOTH -DVGA_MEM_BASE="0xb7f00000" -DX320x240 -DCONFIG_VIDEO_16BPP -D_KERNEL -D__OpenBSD__ -DPMON -D__PMON__ -EL -mno-abicalls -mmemcpy -mcpu=r4000 -c /home/redri55/dev/develop/pmon_3210/Targets/soc_soc/gc/start.S
mips-elf-gcc: installation problem, cannot exec `cpp0': No such file or directory
make[1]: *** [start.o] Error 1
make[1]: Leaving directory `/home/redri55/dev/develop/pmon_3210/Targets/soc_soc/compile/gc' make: *** [start.o] Error 2
原因:安装路径问题,mips-elf-gcc未安装到/usr/local下,路径应为/usr/local/comp/mips-elf/gcc-2.95.3,至于原因不清楚。
9.jtag不能使用
使用feroda 8,另外为虚拟机添加并口设备Parallel
10.编译minigui后,编译helloworld,c出错
提示:helloworld.c:2:28: minigui/common.h:没有该文件或目录
helloworld.c:3:29: minigui/minigui.h:没有该文件或目录
helloworld.c:4:25: minigui/gdi.h:没有该文件或目录
helloworld.c:5:28: minigui/window.h:没有该文件或目录
helloworld.c:6: 错误:syntax error before "hWnd"
原因:
/../../mipsel-linux/bin/ld:找不到-ljpeg
collect2: ld 返回1。