0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7でLinuxカーネルをソースパッケージからビルドする

Posted at

しばらくぶりにLinuxカーネルパッケージをビルドすると --without云々をつけるのを忘れるので

ソースパッケージの取得

SRPMを取得してインストール

$ cd ~/rpmbuild
$ sudo yumdownloader --destdir=SRPMS --source kernel-3.10.0-327.18.2.el7
$ sudo chown $USER. SRPMS/kernel-3.10.0-327.18.2.el7.src.rpm
$ rpm -ivh SRPMS/kernel-3.10.0-327.18.2.el7.src.rpm

ビルド

パッチファイル作ったりspecファイル編集したのちに

mock

$ rpmbuild -bs SPECS/kernel.spec
$ mock --rebuild --target=`uname -m` --with kdump --without debug --without tools --without perf SRPMS/kernel-3.10.0-327.18.2.el7.bit.src.rpm

rpmbuild

$ sudo yum-builddep SPECS/kernel.spec
$ rpmbuild -bb --target=`uname -m` --with kdump --without debug --without tools --without perf SPECS/kernel.spec
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?