IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    [原]Building Ubuntu Kernels with Debug Symbols (by quqi99)

    quqi99发表于 2016-02-26 02:46:34
    love 0

    作者:张华  发表于:2016-02-25

    版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明

    ( http://blog.csdn.net/quqi99 )

    使用gdb或者crash时需要debug symbols, 可以从http://ddebs.ubuntu.com/pool/main/l/linux/下载,但有时候里面没有需要自己生成,下需方法使用了debian/rules脚本来为Ubuntu Kernel生成debug symbols, 所以它不需要注释的那些make命令, 这个脚本会自动生成.config文件,如果要修改可以使用fakeroot debian/rules editconfigs命令。如果使用的是社区的Kernel, 默认的.config文件应该已经包括了生成debug symbols的配置。
    git clone git://kernel.ubuntu.com/ubuntu/linux.git ubuntu-linux
    #git clone --reference ubuntu-linux git://kernel.ubuntu.com/ubuntu/ubuntu-vivid.git
    git clone --reference ubuntu-linux git://kernel.ubuntu.com/ubuntu/ubuntu-xenial.git
    cd ubuntu-xenial
    git tag -l Ubuntu-*
    git checkout -b Ubuntu-4.4.0-0.10 Ubuntu-4.4.0-0.10

    sudo apt-get install fakeroot pkg-config-dbgsym git build-essential kernel-package kernel-wedge
    sudo apt-get install libncurses5-dev qt4-dev-tools
    #make xconfig             #or make menuconfig
    #make localmodconfig      #speed compliling time for test
    #make-kpkg                #a script which automates and replaces the sequence "make dep; make clean; make bzImage; make modules"
    #make mrproper
    #git reset --hard HEAD
    fakeroot debian/rules clean
    #fakeroot debian/rules editconfigs
    fakeroot debian/rules binary-generic binary-headers skipdbg=false



沪ICP备19023445号-2号
友情链接