关于pmon的一些命令选项:
3 make cfg 配置pmon
4 make tgt=rom 生成flash的烧写的bios:gzrom
5 make tgt=ram 生成可以网络加载的bios:gzram
6 make tgt=zlib_rom 生成flash的烧写的bios:zlib_gzrom
7 make tgt=zlib_ram 生成可以网络加载的bios:zlib_gzram
8 make tgt=sim 压缩算法linux下仿真
需要先生成pmoncfg,以便对pmon进行配置。
编译3210的pmon,遇到不少错误:
as:无法识别的选项“-G”
mips-elf-gcc: installation problem, cannot exec `cpp0': ?????????
等,最后在一台电脑上无论如何是编译不过去。搜索了一下这个解决方案,貌似也行不通。
”是 -I 搜索路径的问题,
修改 lib/libc/Makefile , lib/libm/Makefile, lib/libz/Makefile 文件
#CPPFLAGS= -I$M ${MLIBCPPFLAGS} -U_KERNEL
CPPFLAGS= -I. -I.. -I../../include \
-Iarch/mips -I../../sys/sys -I../../sys \
-I../../Targets/Bonito2fdev/compile/Bonito.2feva \
-I../../Targets/Bonito2fdev/compile/Bonito.2feva/machine \
-I../../sys/arch/mips/include \
-D_KERNEL -D__OpenBSD__ -DPMON -D__PMON__ \
-mno-abicalls -mips3 -mmemcpy -mcpu=r4000 \
-U_KERNEL -Wall -Wstrict-prototypes -Wno-uninitialized \
-Wno-format -Wno-main -O2 -G 0 -nostdinc \
${CLIBCPPFLAGS} -U_KERNEL
再 make tgt=rom 就可以了, “
整的来讲,觉得这个pmon给改的是比较糟糕的,编译配置的反复切换目录,而且Makefile文件分布缺乏简单的层次感,文件内容也是超常规,没有很多开源软件那样的清晰美。
在编译过程对路径导出貌似源码就有问题,需要按照手册安装目录,而不允许安装在到指定目录(工程师说是默认路径索引就在一个地方),会出现问题,这个是很失败的,容易遇到各种错误,实在没有什么好感。
求全责备没有用,刚开始或许千头万绪难以尽善尽美,期待改进。
==================================================================
3210内核编译:
$ make clean
$ make menuconfig
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:31:20: error: curses.h: 没有那个文件或目录
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:128: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘use_colors’
scripts/kconfig/lxdialog/dialog.h:129: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘use_shadow’
scripts/kconfig/lxdialog/dialog.h:131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘attributes’
scripts/kconfig/lxdialog/dialog.h:143: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:146: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:147: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:148: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:149: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:151: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:31: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:59: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:95: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c: In function ‘dialog_checklist’:
scripts/kconfig/lxdialog/checklist.c:117: error: ‘WINDOW’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:117: error: (Each undeclared identifier is reported only once
scripts/kconfig/lxdialog/checklist.c:117: error: for each function it appears in.)
scripts/kconfig/lxdialog/checklist.c:117: error: ‘dialog’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:117: error: ‘list’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:117: warning: left-hand operand of comma expression has no effect
scripts/kconfig/lxdialog/checklist.c:121: warning: implicit declaration of function ‘endwin’
scripts/kconfig/lxdialog/checklist.c:122: warning: implicit declaration of function ‘fprintf’
scripts/kconfig/lxdialog/checklist.c:122: warning: incompatible implicit declaration of built-in function ‘fprintf’
scripts/kconfig/lxdialog/checklist.c:122: error: ‘stderr’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:140: error: ‘COLS’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:141: error: ‘LINES’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:143: warning: implicit declaration of function ‘draw_shadow’
scripts/kconfig/lxdialog/checklist.c:143: error: ‘stdscr’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:145: warning: implicit declaration of function ‘newwin’
scripts/kconfig/lxdialog/checklist.c:146: warning: implicit declaration of function ‘keypad’
scripts/kconfig/lxdialog/checklist.c:146: error: ‘TRUE’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:148: warning: implicit declaration of function ‘draw_box’
scripts/kconfig/lxdialog/checklist.c:148: error: ‘attributes’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:149: warning: implicit declaration of function ‘wattrset’
scripts/kconfig/lxdialog/checklist.c:150: warning: implicit declaration of function ‘mvwaddch’
scripts/kconfig/lxdialog/checklist.c:152: warning: implicit declaration of function ‘waddch’
scripts/kconfig/lxdialog/checklist.c:156: warning: implicit declaration of function ‘print_title’
scripts/kconfig/lxdialog/checklist.c:159: warning: implicit declaration of function ‘print_autowrap’
scripts/kconfig/lxdialog/checklist.c:166: warning: implicit declaration of function ‘subwin’
scripts/kconfig/lxdialog/checklist.c:191: warning: implicit declaration of function ‘print_item’
scripts/kconfig/lxdialog/checklist.c:197: warning: implicit declaration of function ‘print_arrows’
scripts/kconfig/lxdialog/checklist.c:200: warning: implicit declaration of function ‘print_buttons’
scripts/kconfig/lxdialog/checklist.c:202: warning: implicit declaration of function ‘wnoutrefresh’
scripts/kconfig/lxdialog/checklist.c:204: warning: implicit declaration of function ‘doupdate’
scripts/kconfig/lxdialog/checklist.c:207: warning: implicit declaration of function ‘wgetch’
scripts/kconfig/lxdialog/checklist.c:214: error: ‘KEY_UP’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:214: error: ‘KEY_DOWN’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:224: error: ‘FALSE’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:225: warning: implicit declaration of function ‘scrollok’
scripts/kconfig/lxdialog/checklist.c:226: warning: implicit declaration of function ‘wscrl’
scripts/kconfig/lxdialog/checklist.c:235: warning: implicit declaration of function ‘wrefresh’
scripts/kconfig/lxdialog/checklist.c:285: warning: incompatible implicit declaration of built-in function ‘fprintf’
scripts/kconfig/lxdialog/checklist.c:286: warning: implicit declaration of function ‘delwin’
scripts/kconfig/lxdialog/checklist.c:290: error: ‘KEY_LEFT’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:291: error: ‘KEY_RIGHT’ undeclared (first use in this function)
make[2]: *** [scripts/kconfig/lxdialog/checklist.o] 错误 1
make[1]: *** [menuconfig] 错误 2
make: *** [menuconfig] 错误 2
原来没弄明白是什么错误,在另外一台电脑上编译一切顺利。上课回来的时候忽然在想是不是开了distcc的缘故,会默认调用集群编译,回来关了distcc,错误依然如故。
(如何为distcc指定编译器??)
后来发现是因为电脑新装系统的缘故,缺少一个库
$ sudo aptitab instab libncurses5-dev
$ make menuconfig ok
$ make
提示找不到命令gawk,
$ sudo aptitab instab gawk
$ make
基本上来讲,这个就比较顺利。可能是因为被修改的少的缘故吧!:)
阅读(1595) | 评论(0) | 转发(1) |