同学在搞linux的移植,激励我也看了下移植的东东。 先试验下make menuconfig
root@zhangbin-desktop-ubuntu:/usr/src/linux-headers-2.6.32-27# make menuconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/docproc HOSTCC scripts/basic/hash HOSTCC scripts/kconfig/conf.o scripts/kconfig/conf.c: In function ‘conf_askvalue’: scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result scripts/kconfig/conf.c: In function ‘conf_choice’: scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result HOSTCC scripts/kconfig/kxgettext.o *** Unable to find the ncurses libraries or the *** required header files. *** 'make menuconfig' requires the ncurses libraries. *** *** Install ncurses (ncurses-devel) and try again. *** make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1 make: *** [menuconfig] 错误 2 root@zhangbin-desktop-ubuntu:/usr/src/linux-headers-2.6.32-27# apt-get install libncurses* 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 注意,根据正则表达式“libncurses*”选中了 libncurses5 注意,根据正则表达式“libncurses*”选中了 libncurses-ruby1.8 注意,根据正则表达式“libncurses*”选中了 libncurses-dev 注意,选取 libncurses5-dev 而非 libncurses-dev 注意,根据正则表达式“libncurses*”选中了 libncurses-gst 注意,根据正则表达式“libncurses*”选中了 libncursesw5-dbg 注意,根据正则表达式“libncurses*”选中了 libncursesw5-dev 注意,根据正则表达式“libncurses*”选中了 libncurses-ruby1.9.1 注意,根据正则表达式“libncurses*”选中了 libncurses-ruby 注意,根据正则表达式“libncurses*”选中了 libncurses5-dbg 注意,根据正则表达式“libncurses*”选中了 libncurses5-dev 注意,根据正则表达式“libncurses*”选中了 libncursesw5 将会安装下列额外的软件包: gnu-smalltalk gnu-smalltalk-common libgst7 libncurses-gst libncurses-ruby libncurses-ruby1.8 libncurses-ruby1.9.1 libncurses5-dbg libncurses5-dev libncursesw5-dbg libncursesw5-dev libruby1.8 libruby1.9.1 libsigsegv0 ruby1.8 ruby1.9.1 建议安装的软件包: gnu-smalltalk-doc ruby1.8-examples rdoc1.8 ri1.8 ruby1.9.1-examples rdoc1.9.1 ri1.9.1 rubygems1.9.1 下列【新】软件包将被安装: gnu-smalltalk gnu-smalltalk-common libgst7 libncurses-gst libncurses-ruby libncurses-ruby1.8 libncurses-ruby1.9.1 libncurses5-dbg libncurses5-dev libncursesw5-dbg libncursesw5-dev libruby1.8 libruby1.9.1 libsigsegv0 ruby1.8 ruby1.9.1 升级了 0 个软件包,新安装了 16 个软件包,要卸载 0 个软件包,有 1 个软件包未被升级。 需要下载 13.0MB 的软件包。 解压缩后会消耗掉 47.6MB 的额外空间。 您希望继续执行吗?[Y/n]n 中止执行。 网上说只需要安装这个包就足够了: root@zhangbin-desktop-ubuntu:/usr/src/linux-headers-2.6.32-27# apt-get install libncurses5-dev 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 下列【新】软件包将被安装: libncurses5-dev 升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 1 个软件包未被升级。 需要下载 1,564kB 的软件包。 解压缩后会消耗掉 6,627kB 的额外空间。 获取:1 http://Ubuntu./ubuntu/ lucid/main libncurses5-dev 5.7+20090803-2ubuntu3 [1,564kB] 下载 1,564kB,耗时 16秒 (94.7kB/s) 选中了曾被取消选择的软件包 libncurses5-dev。 (正在读取数据库 ... 系统当前总共安装有 320352 个文件和目录。) 正在解压缩 libncurses5-dev (从 .../libncurses5-dev_5.7+20090803-2ubuntu3_i386.deb) ... 正在处理用于 man-db 的触发器... 正在设置 libncurses5-dev (5.7+20090803-2ubuntu3) ... root@zhangbin-desktop-ubuntu:/usr/src/linux-headers-2.6.32-27# make menuconfig HOSTCC scripts/kconfig/conf.o scripts/kconfig/conf.c: In function ‘conf_askvalue’: scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result scripts/kconfig/conf.c: In function ‘conf_choice’: scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/lxdialog/checklist.o HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o HOSTCC scripts/kconfig/lxdialog/textbox.o HOSTCC scripts/kconfig/lxdialog/util.o HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/mconf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/lex.zconf.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/mconf scripts/kconfig/mconf arch/x86/Kconfig # # using defaults found in /boot/config-2.6.32-27-generic # 然后就开始了配置过程: Your kernel configuration changes were NOT saved. 最后我什么都没改动。 ============================ 那什么是ncurses库呢? 转载一篇文章 http://blog.csdn.net/robertaqi/archive/2010/10/14/5941943.aspx
5月16日 假设你想在终端(或终端仿真窗口)输出一段彩色的文字,可以将以下这段转义序列输入到你的字符控制台(或控制台窗口): 在 这里 “^[” 就是所谓的转义字符。(注意:“^[”
是一个字符,不是依次键入“^”和“[”字符。要输出“^[”,必须按下Ctrl-V再按下ESC键)执行以上的命令,就应该可以看见“In
Color”变为红色了(译者注:试更改转义字符各分号间的参数,看看会有什么结果)。以后输出的文本信息都是这样的效果。
如果想返回原来的颜色设置可以使用以下的命令: 现在体会到这些神奇字符(转移序列)的作用了吗?然而这些奇怪的字符是不是很难理解呢?并且有时相同的转义序列在不同的终端上会有不同的显示结果。
因此,UNIX的设计者发明了一种叫做 termcap的机制。 那 么ncurses又是什么?ncurses是最早的System V Release 4.0 (SVr4)中
CURSES的一个克隆。这是一个可自由配置的库,完全兼容旧版本的curses。简而言之,它是一个管理应用程序在字符终端显示的函数库。当后面提到
curses的时候,同时也可以和NCURSES互换。 tar文件包中的README和INSTALL文件是安装ncurses库的主要资料。通常是按以下方法安装ncurses的: ncurses perl Makefile包含在一级主目录里。它将会把所有的程序编译成可执行的文件。并把这些文件存在demo/exec目录下面。你也可以选择将其编译
到别的目录下。每个目录下都有一个README文件详细描述了每个目录下的C源程序的内容。 如果你希望在线阅读这些程序中某个单独的程序,可以通过浏览器访问一下网址:http:///HOWTO/NCURSES-Programming-HOWTO/ncurses_programs/ 1.6 关于此文档的其他文件发布格式 3、用jade程序建立各种各式的文档,如果你想创建多页的HTML文档: 如果需要PDF格式,首先要建立单页的HTML文档: 然后利用这份文档和htmldoc工具创建PDF文档: 也可以用来生成PS文档: 详细信息请访问LDP Author Guide (LDP 作者指南)可以获得更多信息,如果都失败了,请和作者ppadala@gmail.com联系,也可以联系译者byronm@sina.com 1.7 原文贡献者 Perl语言版示例程序的提供者Anuradha Ratnaweera(aratnaweera@virtusa.com)。 然 后是Ravi Parimi(parimi@ece.arizona.edu)。
他是这个项目最初的实现者。在撰写这份文档时,他对这份文档提供了很多的意见。并且在文
章撰写完毕后耐心的校对了整份文档。他还在Linux和Solaris平台上检查过文中使用的每一个程序。你可以从他的注记中发现你的问题。 1.9 版权声明 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, distribute with modifications, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. NCURSES Programming HOWTO 中文版(第二版)版权声明 |
|