给ubuntu server 16.04.6打preempt rt补丁

1,$git clone git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack -b v4.14.87 v4.14.87
2,接着在kernel.ubuntu.com/~kernel-ppa/mainline/v4.14.87/下载7个补丁:
 

0001-base-packaging.patch
0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch
0003-UBUNTU-SAUCE-tools-hv-lsvmbus-add-manual-page.patch
0004-adhoc-from-__future__-import-syncconfig.patch
0005-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch
0006-debian-changelog.patch
0007-configs-based-on-Ubuntu-4.14.0-11.13.patch

3,

$patch -p1 < ../0001-base-packaging.patch
$patch -p1 < ../0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch
$patch -p1 < ../0003-UBUNTU-SAUCE-tools-hv-lsvmbus-add-manual-page.patch
$patch -p1 < ../0004-adhoc-from-__future__-import-syncconfig.patch
$patch -p1 < ../0005-UBUNTU-SAUCE-no-up-disable-pie-when-gcc-has-it-enabl.patch
$patch -p1 < ../0006-debian-changelog.patch
$patch -p1 < ../0007-configs-based-on-Ubuntu-4.14.0-11.13.patch

4,在kernel.ubuntu.com/~kernel-ppa/mainline/v4.14.87下载文件:
  linux-image-unsigned-4.14.87-041487-generic_4.14.87-041487.201812080833_amd64.deb
 

$dpkg -x linux-modules-4.14.87-041487-generic_4.14.87-041487.201812080833_amd64.deb ./config_file

  这样做的目的是获取解压linux-modules-4.14.87-041487-generic_4.14.87-041487.201812080833_amd64.deb后config_file/boot目录下的v4.14.87版内核的配置文件config-4.14.87-041487-generic
5,下载Preempt Rt补丁
  在https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/4.14/下载patch-4.14.87-rt49.patch.xz

$xzcat ../patch-4.14.87-rt49.patch.xz | patch -p1

6,

$cp ./config_file/boot/config-4.14.87-041487-generic ./v4.14.87/.config

7,配置内核

$cd ./v4.14.87
$make menuconfig 

Processor type and features —> 
Preemption Model (Fully Preemptible Kernel (RT)) —> 
(X) Fully Preemptible Kernel (RT)

8,编译
 

$fakeroot make -j8 deb-pkg

  结果生成(我的老联想V450花了7/8个小时):
 

linux-4.14.87-rt49+_4.14.87-rt49+-2_amd64.changes
linux-4.14.87-rt49+_4.14.87-rt49+-2.debian.tar.gz
linux-4.14.87-rt49+_4.14.87-rt49+-2.dsc
linux-4.14.87-rt49+_4.14.87-rt49+.orig.tar.gz
inux-headers-4.14.87-rt49+_4.14.87-rt49+-2_amd64.deb
linux-image-4.14.87-rt49+_4.14.87-rt49+-2_amd64.deb
linux-image-4.14.87-rt49+-dbg_4.14.87-rt49+-2_amd64.deb
linux-libc-dev_4.14.87-rt49+-2_amd64.deb

9,安装:

$sudo dpkg -i inux-headers-4.14.87-rt49+_4.14.87-rt49+-2_amd64.deb
$sudo dpkg -i linux-image-4.14.87-rt49+_4.14.87-rt49+-2_amd64.deb
$sudo update-grub

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值