11 2022 档案

kernel——debugfs
摘要:1. 准备 首先在 menuconfig 时开启 debugfs Kernel hacking > Generic Kernel Debugging Instruments > [*] Debug Filesystem Debugfs default access (Access normal) > 阅读全文

posted @ 2022-11-26 19:03 开心种树 阅读(141) 评论(0) 推荐(0) 编辑

kernel——proc
摘要:1. 简介 proc文件系统:一种和内核交互的接口,最早专用于读写进程信息。 特点: proc文件系统的文件节点只能从内核层创建,且这些节点的 ops 和 设备节点类似,是由创建者定义的。 2. proc文件系统的注册和挂载 start_kernel --vfs_caches_init 挂载root 阅读全文

posted @ 2022-11-25 22:54 开心种树 阅读(452) 评论(0) 推荐(0) 编辑

kernel——文件系统
摘要:设备端文件系统的格式 所有文件系统都使用如下格式为基础 如minix,适用于小容量环境 如ext2,适用于大容量环境,于是进行了扩展 具体分析设备上的文件系统 以最简单的minix为例 格式化 root@ubuntu:~# mkfs.minix /dev/sdb 704 inodes 2048 bl 阅读全文

posted @ 2022-11-24 14:55 开心种树 阅读(275) 评论(0) 推荐(0) 编辑

c——动态数组
摘要:#include <stdio.h> #include <string.h> typedef struct test_s test_t; struct test_s { int a; int b; char arr[0]; }; int main() { test_t *t; char buf[32 阅读全文

posted @ 2022-11-17 13:17 开心种树 阅读(27) 评论(0) 推荐(0) 编辑

kernel——字符设备驱动
摘要:字符设备驱动的框架 设备节点:inode,类型为字符设备,记录设备号 设备号:内核确定驱动的唯一编号 cdev:字符驱动对象 框架代码 驱动 #include <linux/module.h> #include <linux/file.h> #include <linux/rtc.h> static 阅读全文

posted @ 2022-11-16 23:32 开心种树 阅读(272) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示