升级一些依赖包
sudoyum installrpm-build redhat-rpm-config asciidoc hmaccalc perl-ExtUtils-Embed pesign xmlto
sudoyum installaudit-libs-devel binutils-devel elfutils-devel elfutils-libelf-develsudo
yum installncurses-devel newt-devel numactl-devel pciutils-devel python-devel zlib-devel bison
创建源码的编译书目录,目的源码存放地址
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
安装到编译目录
rpm -i kernel-3.10.0-229.20.1.el7.src.rpm 2>&1 | grep -v exist
cd ~/rpmbuild/SPECS
rpmbuild -bp --target=$(uname -m) kernel.spec
最终的内核源码位置如下
网友评论