From Fedora Project Wiki
No edit summary
Line 1: Line 1:
= Prepare =
Installing git:
Installing git:
<pre>
<pre>
# yum install git -y
# yum install git -y
</pre>
</pre>
Goto home directory:
 
= Usage =
 
=== Get the git sources ===
<pre>
<pre>
$ cd ~
$ cd ~
</pre>
Clone upstream kernel:
<pre>
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
</pre>
Goto directory with kernel:
<pre>
$ cd linux
$ cd linux
</pre>
</pre>
Start bisection:
This creates the folder /usr/src/linux-stable
 
=== Start bisect ===
<pre>
<pre>
$ git bisect start
$ git bisect start
Line 21: Line 21:
$ git bisect good v3.9
$ git bisect good v3.9
</pre>
</pre>
Download latest config:
 
=== Build the kernel ===
<pre>
<pre>
$ export MAKEOPTS="`rpm --eval %{?_smp_mflags}`"
$ curl http://pkgs.fedoraproject.org/cgit/kernel.git/plain/config-generic > .config
$ curl http://pkgs.fedoraproject.org/cgit/kernel.git/plain/config-generic > .config
$ curl http://pkgs.fedoraproject.org/cgit/kernel.git/plain/config-`arch`-generic >> .config
$ curl http://pkgs.fedoraproject.org/cgit/kernel.git/plain/config-`arch`-generic >> .config
</pre>
Make new config from downloaded Fedora configs:
<pre>
$ make oldconfig
$ make oldconfig
</pre>
Export flags for smp processor:
<pre>
export MAKEOPTS="`rpm --eval %{?_smp_mflags}`"
</pre>
Compiling kernel:
<pre>
$ make bzImage && make modules  
$ make bzImage && make modules  
</pre>
Install new kernel:
<pre>
# make modules_install && make install
# make modules_install && make install
</pre>
</pre>
Update grub:
* BIOS:
* BIOS:
<pre>
<pre>
Line 58: Line 46:
Testing problem..
Testing problem..


Goto directory with linux kernel:
=== Bad bisect ===
<pre>
<pre>
$ cd ~/linux
$ cd ~/linux
</pre>
Problem still present:
<pre>
$ git bisect bad
$ git bisect bad
</pre>
</pre>
Problem isn't present:
Goto [[#Build the kernel]]
 
=== Good bisect ===
<pre>
<pre>
$ cd ~/linux
$ git bisect good
$ git bisect good
</pre>
</pre>
Kernel doesn't boot or other:
Goto [[#Build the kernel]]
 
=== Unknown bisect ===
<pre>
<pre>
$ cd ~/linux
$ git bisect skip
$ git bisect skip
</pre>
</pre>
Goto [[#Build the kernel]]

Revision as of 07:30, 28 August 2013

Prepare

Installing git:

# yum install git -y

Usage

Get the git sources

$ cd ~
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux

This creates the folder /usr/src/linux-stable

Start bisect

$ git bisect start
$ git bisect bad v3.11-rc1
$ git bisect good v3.9

Build the kernel

$ export MAKEOPTS="`rpm --eval %{?_smp_mflags}`"
$ curl http://pkgs.fedoraproject.org/cgit/kernel.git/plain/config-generic > .config
$ curl http://pkgs.fedoraproject.org/cgit/kernel.git/plain/config-`arch`-generic >> .config
$ make oldconfig
$ make bzImage && make modules 
# make modules_install && make install
  • BIOS:
# grub2-mkconfig -o /boot/grub2/grub.cfg
  • UEFI:
# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Reboot:

# systemctl reboot

Testing problem..

Bad bisect

$ cd ~/linux
$ git bisect bad

Goto #Build the kernel

Good bisect

$ cd ~/linux
$ git bisect good

Goto #Build the kernel

Unknown bisect

$ cd ~/linux
$ git bisect skip

Goto #Build the kernel