ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

S源码分析-扫盲源码调试环境搭建(x86_64 )

S源码分析-扫盲源码调试环境搭建(x86_64 ) 1. S源码分析-扫盲源码调试环境搭建x86_641. 1 所需软件软件链接位置ubuntu-20.04.3-desktop-amd64.iso链接https://pan.baidu.com/s/13KxqAkmOTDp6apglr_f_4w提取码starlinux-5.8.6.tar.xzhttps://download.csdn.net/download/tan1666/82501446busybox-1.32.0.tar_.bz2https://download.csdn.net/download/tan1666/82506515rootfs.f2fshttps://download.csdn.net/download/tan1666/825597751. 2 编译x86解压 linux-5.8.6.tar.xz并将文件系统rootfs.f2fs 拷贝到linux-5.8.6中。执行如下脚本命令。tar-xvflinux-5.8.6.tar.xzexportARCHx86_64makex86_64_defconfigmakemenuconfig#配置如下Processortypeand features ---[]Randomize the address of the kernel image(KASLR)不要选 Drevice Drivers ---NVME Support*NVM Express block device[*]NVMe multipath support[*]NVMe hardware monitoring*NVM Express over Fabrics FChostdriver*NVM Express over Fabrics TCPhostdriver File systems ---*F2FS filesystem support[*]F2FS Status Information(NEW)[*]F2FS extended attributes(NEW)[*]F2FS Access Control Lists(NEW)Kernel hacking ---Compile-time checks and compiler options ---[*]Compile the kernel with debug info[*]Provide GDB scriptsforkernel debuggingmakeWERROR0-j4bzImage vmlinux qemu-system-x86_64-kernelarch/x86_64/boot/bzImage-drivefilerootfs.f2fs,ifide,formatraw-nographic-appendroot/dev/sda consolettyS0target remote :1234执行结果后期运行命令编译cd/home/tan/x86/linux-5.8.6;make-j8bzImage 调试cd/home/tan/x86/linux-5.8.6;killallqemu-system-x86_64;qemu-system-x86_64-kernelarch/x86_64/boot/bzImage-drivefilerootfs.f2fs,ifide,formatraw-nographic-appendroot/dev/sda consolettyS0-S-skillallgdb;gdb--tuivmlinux2. 总结将文件系统拷贝到linux内核源码目录下 执行上面命令后可得到最后结果。内核学习推荐 https://ke.qq.com/course/4032547?flowToken10422132.1 技术参考参考资料1https://blog.csdn.net/geshifei/article/details/119869405
返回列表