<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->
最近想在一台 pc 上 debug ,最开始找不到 Deben 的 source code ,然后就在 kernel.org 上面下载了一个相应的版本,本想随便编编就可以得到一个了,结果还真是折腾呀。
首先用 modinfo 看 vermagic , 这个值一定要一模一样,
Pc 上的是:
srcversion: AACE76E4FA5987DAF1350D1
vermagic: 2.6.27-7-generic SMP mod_unload modversions 586
2.6.27 -7-generic : 这个是 include/linux/utsrelease.h 中的 macro ,是根据 makefile 中的:
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 27
EXTRAVERSION = -7-generic
来定义的。
其他的都通过 make menuconfig 来改, make ARCH=i386 -j8 –d 可以有效的 debug 。
但是 vermagic 改对了,如果 srcversion 不同也不行,这个如果不同就没办法,因为这是一个用 srouce 算出来的 check sum 。想生成这个值,也是通过 make menuconfig 来改。