2012年10月11日
摘要: 一,内核模块功能: 让内核文件(zImage或bzImage)本身并不包含某组件,而是在该 组件需要被使用的时候,动态地添加到正在运行的内核中example:/*********hello.c******************/ 1 #include<linux/init.h> 2 #include<linux/module.h> 3 4 static int __init hello_init(void) 5 { 6 printk("Hello, world!\n"); 7 return 0; 8 } 9 10 static void ... 阅读全文
posted @ 2012-10-11 21:19 Daniel.G 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 一:清除临时文件,中间文件和配置文件。 make clean: remove most generated files but keep the config make mrproper: remove all generated files + config files make distclean: mrproper + remove editor backup and patch files二:确定目标系统的软硬件配置情况,比如CPU的类型,网卡的型号,所需支持的网络协议等。三:配置内核 make config:基于文本模式的交互式配置 make menuconfi... 阅读全文
posted @ 2012-10-11 17:32 Daniel.G 阅读(486) 评论(0) 推荐(0) 编辑
摘要: linux内核源代码内核源代码可以从www.kernel.org里面下载。linux内核源代码采用树形结构进行组织的,非常合理地把功能相关的文件都放在同一子目录下,使得程序更具可读性。arch目录arch是architecture的缩写。内核每种CPU体系,在该目录下都有对应的子目录。每个CPU子目录,又有boot,mm,kernel等子目录,分别包含控制系统引导,内存管理,系统调用等。block目录部分块设备驱动程序crypto目录加密,压缩,CRC校验算法documentation内核的文档drivers设备驱动程序fs目录存放各种文件系统的实现代码。每个子目录对应一种文件系统的实现,公共 阅读全文
posted @ 2012-10-11 15:37 Daniel.G 阅读(499) 评论(0) 推荐(0) 编辑
摘要: (申明)本人第一次发博文,做的不好的地方,大家大量多多谅解。欢迎大家转载!一:linux系统如何构成的?User space:User Applications and GNU C library (glibc)kernel space:System Call interface, Kernel and Architecture-Dependent Kernel Code二:为什么linux系统会划分为User space and Kernel space ?CPU通常实现了不同的工作模式,以ARM为例,实现了7种工作模式:用户模式(usr),系统模式(sys),管理模式(svc),中断模式( 阅读全文
posted @ 2012-10-11 14:59 Daniel.G 阅读(1794) 评论(0) 推荐(0) 编辑