首页 > 系统服务 > 详细

Building Ubuntu Kernels with Debug Symbols (by quqi99)

时间:2016-02-26 06:57:54      阅读:247      评论:0      收藏: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

Building Ubuntu Kernels with Debug Symbols (by quqi99)

原文:http://blog.csdn.net/quqi99/article/details/50745614

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!