[Linux服务器] linux下qemu调试linux内核

177 0
Honkers 2025-5-9 09:56:57 来自手机 | 显示全部楼层 |阅读模式

编译内核

  • 下载kernel源码
  1. git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
  2. cd linux-stable/
复制代码

-配置内核
make menuconfig:
在kernel hacking下的选项中选中(实用空格键,星号*代表选选中)compile the kernel with debug info
注意【记得提前安装libncurses5-dev】,或者其他编译内核需要的依赖包

│ │

  • 64-bit kernel │ │
    │ │ General setup —> │ │
    │ │
  • Enable loadable module support —> │ │
    │ │ -*- Enable the block layer —> │ │
    │ │ Processor type and features —> │ │
    │ │ Power management and ACPI options —> │ │
    │ │ Bus options (PCI etc.) —> │ │
    │ │ Executable file formats / Emulations —> │ │
    │ │
  • Networking support —> │ │
    │ │ Device Drivers —> │ │
    │ │ Firmware Drivers —> │ │
    │ │ File systems —> │ │
    │ │ Kernel hacking —> │ │
    │ │ Security options —> │ │
    │ │ -*- Cryptographic API —> │ │
    │ │
  • Virtualization —> │ │
    │ │ Library routines —> │ │

    按K键选中Kernel hacking之后按enter键进入子选项,按K键选移动到 Ker

  • 您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    中国红客联盟公众号

    联系站长QQ:5520533

    admin@chnhonker.com
    Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行