易截截图软件、单文件、免安装、纯绿色、仅160KB

linux编译出现错误

引用:http://blog.chinaunix.net/u/12207/showart_2061214.html
关于2.6.31遇到的问题
错误提示1:
drivers/built-in.o(.init.text+0x3bad): In function `con_init':
include/trace/events/kmem.h:47: undefined reference to `.L1452'
解决:
vi /usr/src/linux/drivers/char/vt.c 找到static int __init con_init(void)函数中,以下语句
删除以下行(第2875行)
vc_cons[currcons].d = vc = kzalloc(sizeof(struct vc_data), GFP_NOWAIT);  
在相同位置添加:
vc_cons[currcons].d = vc = alloc_bootmem(sizeof(struct vc_data));
同时记得加上头文件 #include <linux/bootmem.h>,否则会出现第2个错误。
 
错误提示2:
drivers/char/vt.c: In function `con_init':
drivers/char/vt.c:2875: error: implicit declaration of function `alloc_bootmem'
drivers/char/vt.c:2875: warning: assignment makes pointer from integer without a cast
原因:vt.c中引用了alloc_bootmem,但是找不到相关.h定义文件或没有在相关的头文件.h中定义
解决:
 
# vi /usr/src/linux/drivers/char/vt.c,添加以下这行:
#include <linux/bootmem.h>
 
错误提示3:
drivers/message/fusion/mptsas.c: In function `mptsas_port_delete':
drivers/message/fusion/mptsas.c:105: sorry, unimplemented: inlining failed in call to 'mptsas_set_rphy': function body not available
drivers/message/fusion/mptsas.c:467: sorry, unimplemented: called from here
原因:
mptsas_port_delete中引用了mptsas_set_rphy,但mptsas_set_rphy的定义却在mptsas_port_delete之后。
解决:
vi /usr/src/linux/drivers/message/fusion/mptsas.c,将mptsas_set_rphy的定义(第483行起)移动到mptsas_port_delete的定义(第446行)前面即可。


相关文档:

提高Linux管理效率的三个技巧


管理员想要提高Linux管理效率是要遵循一些管理技巧的,这里简单介绍有关Linux管理效率的三个技巧:卸载无响应的 DVD 驱动器、恢复出现问题的屏幕、屏幕协作。相信他们会对管理员效率有提高。
技巧 1:卸载无响应的 DVD 驱动器
网络新手的经历:按下服务器(运行基于 Redmond 的操作系统)DVD 驱动器上的 Eject 按钮时, ......

linux多线程好文章


1
、线程的创建、终止及控制:
      
任何进程在启动时就已有了一个主线程,如果需要再生成线程则使用
pthread_create
函数,在该函数中可以指定线程的属性、线程例程、传给线程例程的参数。线程例程是一个用户自定义的函数,及线程执行的代码。当线程例程返回时,线程则结束运行, ......

写给像我一样的Linux内核初学者

--孔建军(Kongove.CN)
2008.11.12
首先,让我们来看几组令人振奋的数据。现在订阅Linux内核邮件列表[1],每天的邮件流量大概在500份左右;执行"grep "^P:"
MAINTAINERS |sort -u|wc
-l",对内核子系统维护者进行统计,得到的结果是534人;从2007到2008年,平均每天有4300行代码添加到内核,有180 ......

Linux I2C核心、总线与设备驱动

Linux I2C核心、总线与设备驱动
注:
 在linux2.6.32版本中有这样的代码与注释:
struct i2c_driver {
    unsigned int class;
    /* Notifies the driver that a new bus has appeared or is about to be
     * removed. You should avoid using this if y ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号