您的位置:首页 > 产品设计 > UI/UE

Building Ubuntu Kernels with Debug Symbols (by quqi99)

2016-02-26 02:46 603 查看

作者:张华 发表于: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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: