EDA365电子论坛网
标题:
快来了解一下CentOS内核源码的安装方法
[打印本页]
作者:
uqHZau
时间:
2020-3-20 09:36
标题:
快来了解一下CentOS内核源码的安装方法
" @- |& h: J' l% A
不完整的内核源码:
9 ?' Q* L9 {9 D% S: l9 f0 x
. K' W/ w$ G: `# E
安装:
' e: c( a7 l& N" J5 Z$ H9 r
* kernel-devel (both 32- & 64-bit architectures)
- Z$ I9 S( E' B4 ^+ P9 Q
* kernel-xen-devel (both 32- & 64-bit architectures)
, c$ `5 a) h( e; _' O7 \5 |+ d
* kernel-PAE-devel (32-bit architecture only)
4 a* J- i- E( N1 `2 [% m! y
执行:
; C2 _. }: d& _$ B5 z
ln -s /usr/src/kernels/2.6.18-238.19.1.el5xen-x86_64 /lib/modules/$(uname -r)/build
* f. Y% ?6 U$ e" j" ]/ s
* l3 c/ V% w1 r$ f x$ ?. Z
' D! r4 {1 y# ?/ L* r. z
完整的内核源码:
- ]1 b% ^& C7 P
yum install rpm-build redhat-rpm-config unifdef
. b9 w/ F0 V' E7 r6 z
wget
http://vault.centos.org/5.7/upda ... 274.7.1.el5.src.rpm
4 z; u' F+ l0 P; S- ?( ^6 W# V; g
rpm -Uvh kernel-2.6.18-274.7.1.el5.src.rpm
7 h% o2 e# I8 G i8 k5 _
1 e7 u2 p R I. D: W$ ]' `
cd /usr/src/redhat/SPECS
+ a" m1 i1 J: ~+ P! t+ e5 }/ V
rpmbuild -bp --target=`uname -m` kernel.spec
# E0 r: T8 k; r# y7 l1 d& a
最终源码在/usr/src/redhat/build目录中:/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18-274.7.1.el5.x86_64/
作者:
yin123
时间:
2020-3-20 17:39
CentOS内核源码的安装方法
欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/)
Powered by Discuz! X3.2