linux kernel learning notes
2015-09-24 21:35
696 查看
[b]问题:1.insmod: ERROR: could not insert module hello.ko: Invalid module format
解决:使用modprobe --force-modversion 强制插入 找相同版本内核
1.linux体系结构:user space和kernel space。他们是程序执行的两种不同状态。通过系统调用和硬件中断能够完成从用户控件内核控件的转换
2.ARM7种工作模式:用户模式(usr)。快速中断(fiq)。外部中断(irq)。管理模式(svc)。数据访问终止(abt)。系统模式(sys)。未定义指令异常(und)
3.x86,用户代码运行在Ring3,内核代码运行在Ring0
4.linux内核架构:System call interface(SCI) Process Management(P,M)
Virtual File System(VFS) Memory Management(MM) Network Stack
Arch(体系结构相关的代码) 。Devic Drivers(DD)。
5.make clean (remove most generated files but keep the config)
make mrproper (remov all generated file+config files)
6.make menuconfig :基于文本模式的菜单型配
7.编译内核:make zImage 获取详细编译信息:make zImage V=1
编译好的内核位于arch/<cpu>/boot/
5.内核模块的特点:模块本身并不被编译进内核文件
模块加载函数(必须)module_init();
模块卸载函数(必须)module_exit();
6.进入内核模块文件:insmod ---加载 rmmod--卸载(rmmod hello) lsmod--查看 modprobe---加载(会更加强大,能够自动找到依赖模块,直接加上hello)
7.GPL:开源代码的协议
8.模块参数:module_param module_param(name,type,perm(访问权限));type常见值:bool,int,charp
9. uname -r 查看当前内核版本号
10.[/b]
解决:使用modprobe --force-modversion 强制插入 找相同版本内核
1.linux体系结构:user space和kernel space。他们是程序执行的两种不同状态。通过系统调用和硬件中断能够完成从用户控件内核控件的转换
2.ARM7种工作模式:用户模式(usr)。快速中断(fiq)。外部中断(irq)。管理模式(svc)。数据访问终止(abt)。系统模式(sys)。未定义指令异常(und)
3.x86,用户代码运行在Ring3,内核代码运行在Ring0
4.linux内核架构:System call interface(SCI) Process Management(P,M)
Virtual File System(VFS) Memory Management(MM) Network Stack
Arch(体系结构相关的代码) 。Devic Drivers(DD)。
5.make clean (remove most generated files but keep the config)
make mrproper (remov all generated file+config files)
6.make menuconfig :基于文本模式的菜单型配
7.编译内核:make zImage 获取详细编译信息:make zImage V=1
编译好的内核位于arch/<cpu>/boot/
5.内核模块的特点:模块本身并不被编译进内核文件
模块加载函数(必须)module_init();
模块卸载函数(必须)module_exit();
6.进入内核模块文件:insmod ---加载 rmmod--卸载(rmmod hello) lsmod--查看 modprobe---加载(会更加强大,能够自动找到依赖模块,直接加上hello)
7.GPL:开源代码的协议
8.模块参数:module_param module_param(name,type,perm(访问权限));type常见值:bool,int,charp
9. uname -r 查看当前内核版本号
10.[/b]
相关文章推荐
- Linux静态库和共享库
- Ubuntu 12.04和centos 7 ip的设置方法
- Linux内核笔记——进程管理之执行体
- Linux常用命令
- VMware10上CentOS6.5安装MySQL2.6.26
- Linux初学——EXT2文件系统
- Linux mysql 2
- 关于Linux下动态以及静态库的制作方法
- 不是每个人都适合linux
- CPU工作原理
- 盘点全球“国家级” Linux 项目
- linux下添加PATH环境变量
- linux下学习笔记——g++模式下调试和makefile
- 【Linux】用grep在文档中查找内容
- Linux命令操作
- CentOS LAMP环境 配置详解
- 阿里云linux镜像中需要注意的事项
- Linux下的数据流重定向
- linux mysql 命令
- Linux chmod 命令