
内核学习
nust20
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
导出进程内核栈dump ps,跟踪僵尸进程
#include <linux/types.h>#include <linux/module.h>#include <linux/debugfs.h>#include <linux/slab.h>#include <linux/sched/debug.h>#include <linux/sched/task.h>#include <linux/sched/signal.h>struct den原创 2022-04-20 11:03:08 · 648 阅读 · 0 评论 -
qemu arm添加QXL显卡
default-configs/arm-softmmu.mak@@ -3,6 +3,7 @@CONFIG_PCI=yCONFIG_PCI_DEVICES=yCONFIG_PCI_TESTDEV=y+CONFIG_QXL=yCONFIG_VGA=yCONFIG_NAND=yCONFIG_ECC=y原创 2021-04-07 16:28:36 · 2160 阅读 · 1 评论 -
gcc禁止使用指定的寄存器
-ffixed-regTreat the register named reg as a fixed register; generated code should neverrefer to it (except perhaps as a stack pointer, frame pointer or in some otherfixed role).reg must be the name of a register. The register names accepted are machin原创 2021-03-11 10:10:52 · 773 阅读 · 0 评论 -
查看qemu的外设地址
qemu 模拟的Machine的外设地址需要通过qemu提供的devicetree来查看。1,代码中查看QEMU supports two types of guest image boot forvirt, and the way for the guest code to locate the dtb binary differs:For guests using the Linux kernel boot protocol (this means any non-ELF file pas.原创 2021-03-09 10:10:32 · 975 阅读 · 0 评论 -
gcc控制对齐的数据访问
-munaligned-access-mno-unaligned-access-mstrict-align-mno-strict-align原创 2021-03-05 14:04:50 · 2090 阅读 · 0 评论 -
FATAL:kernel too old
buildroot做的镜像init进程起不来,出现kernel too old错误。经查,是glibc的错误log。错误原因,编glibc使用的内核头文件比实际运行的内核版本新,init加载动态库时出现该错误。解决:升级运行时内核或者降低编glibc时内核版本。...原创 2020-10-21 20:57:20 · 2104 阅读 · 0 评论 -
gdb调试qemu上运行的内核时,出现Cannot access memory at address错误
(gdb) lx-psPython Exception <class 'gdb.MemoryError'> Cannot access memory at address 0xffffffff81c15b98:Error occurred in Python: Cannot access memory at address 0xffffffff81c15b98(gdb)...原创 2019-07-19 19:19:11 · 9721 阅读 · 1 评论 -
Android Loadable Module Signing
点击打开链接Recently, there have been several questions posted to Customer Support (https://www.intrinsyc.com/contact-support/) here at Intrinsyc that asks how one signs a Linux loadable module转载 2017-02-08 09:56:32 · 809 阅读 · 0 评论 -
去掉编译内核的优化选项
在使用gdb或者其他工具调试默认优化选项的内核时,内核的反汇编代码与原来的C语言代码对应很乱。如果切换到C语言模式,使用单步调试时会看到执行顺序在C语言源代码里面跳来跳去,甚是紊乱。 这一切都是GCC对代码进行了优化造成的,优化后的代码执行顺序与源代码的顺序就有出入了。GCC优化代码,提高运行效率与代码紧凑度,但对于调试学习内核就不友好了。 通过下面的方法去掉内核编译时原创 2013-12-31 20:42:02 · 6839 阅读 · 0 评论 -
Source Insight解析Linux内核的c.tom文件内容
在C:\Documents and Settings\XXXX\My Documents\Source Insight目录下的C.tom文件中增加如下内容(需要不断完善,碰到不能解析的宏时添加进来)。添加后,关闭SourceInsight工程,重新打开,重新同步。共享出来,共同完善!;For Linux Kernel CodeSYSCALL_DEFINE0(name) lo原创 2015-06-14 00:32:39 · 6120 阅读 · 0 评论 -
搭建qemu windows编译环境
准备使用qemu的vexpress平台调试学习arm linux平台。vexpress是cortex-A9四核结构,支持vexpress平台的qemu要1.0后的版本。windows平台较新的qemu版本比较难找,准备自己下载源代码编译。本文记录环境的搭建过程与qemu的编译。1. 安装MinGWwww.mingw.org下载mingw-get-setup.exe工具,运行,选择安装目录(原创 2014-01-02 21:36:51 · 10376 阅读 · 2 评论 -
为vexpress制作根文件系统
qemu的vexpress支持SD卡,准备以SD卡做为根文件系统启动vexpress。1,准备SD的映像文件使用dd命令制作一个128M的空文件2,将映像文件格式化成ext2文件系统格式3,将格式化好后的映像文件挂载到制定目录下,查看是否格式化成功如果能挂载成功,并且挂载的目录下有lost+found目录,说明文件系统格式化成功。4,下载编译busybox首原创 2014-01-01 23:06:28 · 1112 阅读 · 0 评论