QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 973|回复: 6

还需要嘛?

[复制链接]
发表于 2003-5-21 21:01:03 | 显示全部楼层 |阅读模式
我刚看了精华区的帖子,但是我看过的书上说还要先删除linux的连接,然后再建立新内核和linux的连接,这样可以避免覆盖掉原来的文件,精华区的帖子没有这些步骤了,是简化了?还是真的不需要了?
发表于 2003-5-21 21:40:08 | 显示全部楼层
u had better do this.
before 2.4.18 i think, they are uncompress to linux, so remove that symbol link can avoid to overwrite u existed kernel.
after 2.4.18, they uncompress to linux-2.x.x. so will not overwrite existed one. but update the linux symbol link to the kernel dir u wnat to use is a good choice.
回复

使用道具 举报

发表于 2003-5-21 21:55:40 | 显示全部楼层
问一句,在make menuconfig的时候,产生的config文件存在何处?
我只是通过另存才看见我config的内容, 和FreeBSD完全不一样,还没适应过来。

另外,我想问一句,linux下通过内核模块编程加入内核空间和直接在make的时候ld在内核里,有什么区别吗?

前两天看了一下系统启动的平台无关性部分,感觉linux的模块化不是很明白,假设我要加一个内核子系统在内核里,该子系统需要在VFS之间加载,难道,我还必须改启动的部分吗?内核能不能动态识别,排序我加载的子系统。

顺便就在这里问dragonfly了,回去看书了,呜呜,今晚又没看考试的书,怎么过呀?!   
回复

使用道具 举报

发表于 2003-5-21 22:03:39 | 显示全部楼层
yes, freebsd is different with linux. i compiled bsd before in order to use dummynet and include some of my nic driver.
ls -a, it is a .config file.
module is loaded when need, but kernel is always there. save u some kernel space. load time...
yes, u are right, the order in kernel is fixed, u can not adjust the order, at least as far as i know. i think the assumption in kernel is that it load key part in a fixed order, and other parts can be reordered, like the order in init.d and rc.sysinit
回复

使用道具 举报

发表于 2003-5-21 22:04:18 | 显示全部楼层
btw, i can discuss with dr jin about u test. hehe
回复

使用道具 举报

发表于 2003-5-22 20:34:52 | 显示全部楼层
thx!

也就是说,如果我编写一个子系统,很特殊,必须在VFS加载前完成,难道还需要我在vfs_caches_init()函数前加上该子系统的初始化调用吗? 如果这样,我觉得linux在模块化的灵活控制方面比FreeBSD差了一些,在FreeBSD看来,无论是内核模块还是内核本身都是一样的,好比我打算写一个driver,在确定之前,一般用module形式,FreeBSD可以在开机的时候通过rc.conf设置动态加载,然后在平台无关性部分,根据该driver提供的子系统号等信息,采用冒泡法排序,因此,只要我在模块里指定它的加载等级SI_SUB_xxx就可以了。当然,如果需要开发一个完全自己的子系统,也可以在kernel.h里添加自己的子系统编号,不过一般用不到这么复杂。

也就是如果不修改start_kernel,我只能在该函数之后添加自己的模块,对吗?
你能谈谈linux对模块的认识和组织吗?

thx again
回复

使用道具 举报

发表于 2003-5-22 21:54:41 | 显示全部楼层
yes, if that is needed before bfs, u have to modify the start_kernel(). but think again if u really need load that part before vfs init. so u can see that start_kernel() only contain a small set of init. most of them can be init later or on demand.
i think for freebsd, there must be an order as well. for example, u can not load vfs before vm sub system, u can not init pci beofre u init interrupt table and trap. so some orders are already fixed.
most of the driver modules can by dynamically loaded by using config file in linux.

i think ldd 2nd chapter 2 and chpater 11, qjfx chapter 8, already are too good to be true. so i have nothing to say here.    but if sb have problem, he will ask here and i will answer.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 02:27 , Processed in 0.061735 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表