@@ -192,8 +192,8 @@ will be considered the 'good' release and used to prepare the .config file.
192192
193193 sudo rm -rf /lib/modules/6.0-rc1-local-gcafec0cacaca0
194194 sudo kernel-install -v remove 6.0-rc1-local-gcafec0cacaca0
195- # * Note, if kernel-install is missing, you will have to
196- # manually remove the kernel image and related files .
195+ # * Note, on some distributions kernel-install is missing
196+ # or does only part of the job .
197197
198198 b) If you performed a bisection and successfully validated the result, feel
199199 free to remove all kernels built during the actual bisection (Segment 3 c);
@@ -348,11 +348,14 @@ Preparations: set up everything to build your own kernels
348348 one downloads less than 500 MByte, the other works better with unreliable
349349 internet connections. *
350350
351- Execute the following command to retrieve a fresh mainline codebase::
351+ Execute the following command to retrieve a fresh mainline codebase while
352+ preparing things to add stable/longterm branches later::
352353
353354 git clone -o mainline --no-checkout \
354355 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ~/linux/
355356 cd ~/linux/
357+ git remote add -t master stable \
358+ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
356359
357360 [:ref: `details<sources_bisref> `]
358361
@@ -365,7 +368,7 @@ Preparations: set up everything to build your own kernels
365368 identifier using ``uname -r ``.
366369
367370 Afterwards check out the source code for the version earlier established as
368- 'good' and create a .config file::
371+ 'good' (in this example this is assumed to be 6.0) and create a .config file::
369372
370373 git checkout --detach v6.0
371374 make olddefconfig
@@ -462,8 +465,10 @@ Preparations: set up everything to build your own kernels
462465
463466 [:ref: `details<configmods_distros_bisref> `].
464467
465- * If you want to influence other aspects of the configuration, do so now
466- by using make targets like 'menuconfig' or 'xconfig'.
468+ * If you want to influence other aspects of the configuration, do so now using
469+ your preferred tool. Note, to use make targets like 'menuconfig' or
470+ 'nconfig', you will need to install the development files of ncurses; for
471+ 'xconfig' you likewise need the Qt5 or Qt6 headers.
467472
468473 [:ref: `details<configmods_individual_bisref> `].
469474
@@ -601,8 +606,8 @@ be a waste of time. [:ref:`details<introlatestcheck_bisref>`]
601606* Are you facing a problem within a stable/longterm release, but failed to
602607 reproduce it with the mainline kernel you just built? Then check if the latest
603608 codebase for the particular series might already fix the problem. To do so,
604- add the stable series Git branch for your 'good' kernel and check out the
605- latest version::
609+ add the stable series Git branch for your 'good' kernel (again, this here is
610+ assumed to be 6.0) and check out the latest version::
606611
607612 cd ~/linux/
608613 git remote set-branches --add stable linux-6.0.y
@@ -652,7 +657,7 @@ otherwise would be a waste of time. [:ref:`details<introworkingcheck_bisref>`]
652657 regressed works as expected with it.
653658
654659 Start by checking out the sources for the version earlier established as
655- 'good'::
660+ 'good' (once again assumed to be 6.0 here) ::
656661
657662 cd ~/linux/
658663 git checkout --detach v6.0
@@ -697,15 +702,13 @@ each kernel on commodity x86 machines.
697702 stable branch, unless you already did so earlier::
698703
699704 cd ~/linux/
700- git remote add -t master stable \
701- https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable.git
702705 git remote set-branches --add stable linux-6.1.y
703706 git fetch stable
704707
705708.. _bisectstart_bissbs :
706709
707710* Start the bisection and tell Git about the versions earlier established as
708- 'good' and 'bad'::
711+ 'good' (6.0 in the following example command) and 'bad' (6.1.5) ::
709712
710713 cd ~/linux/
711714 git bisect start
@@ -884,8 +887,9 @@ space might run out.
884887
885888 On quite a few distributions this will delete all other kernel files installed
886889 while also removing the kernel's entry from the boot menu. But on some
887- distributions this command does not exist or will fail; in that case consult
888- the reference section, as your Linux distribution needs special care.
890+ distributions kernel-install does not exist or leaves boot-loader entries or
891+ kernel image and related files behind; in that case remove them as described
892+ in the reference section.
889893
890894 [:ref: `details<makeroom_bisref> `]
891895
@@ -1015,8 +1019,6 @@ the right thing.
10151019
10161020[:ref: `back to step-by-step guide <bootworking_bissbs >`]
10171021
1018- .. _buildrequires_bisref :
1019-
10201022.. _diskspace_bisref :
10211023
10221024Space requirements
@@ -1060,7 +1062,7 @@ to do this as well, if you tried bisecting between 6.0.11 and 6.1.13.
10601062
10611063[:ref: `back to step-by-step guide <rangecheck_bissbs >`]
10621064
1063- .. _ sources_bisref :
1065+ .. _ buildrequires_bisref :
10641066
10651067Install build requirements
10661068--------------------------
@@ -1076,72 +1078,103 @@ about to build.
10761078Here are a few examples what you typically need on some mainstream
10771079distributions:
10781080
1081+ * Arch Linux and derivatives::
1082+
1083+ sudo pacman --needed -S bc binutils bison flex gcc git kmod libelf openssl \
1084+ pahole perl zlib ncurses qt6-base
1085+
10791086* Debian, Ubuntu, and derivatives::
10801087
1081- sudo apt install bc binutils bison dwarves flex gcc git make openssl \
1082- pahole perl-base libssl-dev libelf-dev
1088+ sudo apt install bc binutils bison dwarves flex gcc git kmod libelf-dev \
1089+ libssl-dev make openssl pahole perl-base pkg-config zlib1g-dev \
1090+ libncurses-dev qt6-base-dev g++
10831091
10841092* Fedora and derivatives::
10851093
1086- sudo dnf install binutils /usr/include/{libelf.h,openssl/pkcs7.h} \
1087- /usr/bin/{bc,bison,flex,gcc,git,openssl,make,perl,pahole}
1094+ sudo dnf install binutils \
1095+ /usr/bin/{bc,bison,flex,gcc,git,openssl,make,perl,pahole,rpmbuild} \
1096+ /usr/include/{libelf.h,openssl/pkcs7.h,zlib.h,ncurses.h,qt6/QtGui/QAction}
10881097
10891098* openSUSE and derivatives::
10901099
1091- sudo zypper install bc binutils bison dwarves flex gcc git make perl-base \
1092- openssl openssl-devel libelf-dev
1093-
1094- In case you wonder why these lists include openssl and its development headers:
1095- they are needed for the Secure Boot support, which many distributions enable in
1096- their kernel configuration for x86 machines.
1100+ sudo zypper install bc binutils bison dwarves flex gcc git \
1101+ kernel-install-tools libelf-devel make modutils openssl openssl-devel \
1102+ perl-base zlib-devel rpm-build ncurses-devel qt6-base-devel
10971103
1098- Sometimes you will need tools for compression formats like bzip2, gzip, lz4,
1099- lzma, lzo, xz, or zstd as well.
1100-
1101- In case you want to adjust the build configuration with make targets like
1102- 'menuconfig' or 'xconfig' later, ensure to also install development headers for
1103- ncurses and Qt5.
1104+ These commands install a few packages that are often, but not always needed. You
1105+ for example might want to skip installing the development headers for ncurses,
1106+ which you will only need in case you later might want to adjust the kernel build
1107+ configuration using make the targets 'menuconfig' or 'nconfig'; likewise omit
1108+ the headers of Qt6 is you do not plan to adjust the .config using 'xconfig'.
11041109
11051110You furthermore might need additional libraries and their development headers
1106- for tasks not covered in this guide. For example, zlib will be needed when
1107- building kernel tools from the tools / directory; .
1111+ for tasks not covered in this guide -- for example when building utilities from
1112+ the kernel's tools/ directory.
11081113
11091114[:ref: `back to step-by-step guide <buildrequires_bissbs >`]
11101115
1111- Download the sources using git
1116+ .. _sources_bisref :
1117+
1118+ Download the sources using Git
11121119------------------------------
11131120
11141121 *Retrieve the Linux mainline sources. *
11151122 [:ref: `...<sources_bissbs> `]
11161123
1117- The step-by-step guide outlines how to retrieve the Linux sources using a full
1118- Git clone of Linus' mainline repository. If you have an unreliable internet
1119- connection, you instead might want to use a 'Git bundle' to retrieve the
1120- sources; if downloading the complete repository would take too long or requires
1121- too much storage space, use a shallow clone instead.
1124+ The step-by-step guide outlines how to download the Linux sources using a full
1125+ Git clone of Linus' mainline repository. There is nothing more to say about
1126+ that -- but there are two alternatives ways to retrieve the sources that might
1127+ work better for you:
11221128
1123- Downloading Linux mainline using a bundle
1124- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1129+ * If you have an unreliable internet connection, consider
1130+ :ref: ` using a 'Git bundle'<sources_bundle_bisref> `.
11251131
1126- Switch to you home directory and follow the instructions `kernel.org provides
1127- for this case <https://www.kernel.org/cloning-linux-from-a-bundle.html> `_.
1132+ * If downloading the complete repository would take too long or requires too
1133+ much storage space, consider :ref: `using a 'shallow
1134+ clone'<sources_shallow_bisref>`.
11281135
1129- Afterwards add the stable Git repository as remote and all required
1130- stable/branches as explained in the step-by-step guide.
1136+ .. _sources_bundle_bisref :
11311137
1132- Downloading Linux mainline using a shallow clone
1133- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1138+ Downloading Linux mainline sources using a bundle
1139+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1140+
1141+ Use the following commands to retrieve the Linux mainline sources using a
1142+ bundle::
1143+
1144+ wget -c \
1145+ https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/clone.bundle
1146+ git clone --no-checkout clone.bundle ~/linux/
1147+ cd ~/linux/
1148+ git remote remove origin
1149+ git remote add mainline \
1150+ https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
1151+ git fetch mainline
1152+ git remote add -t master stable \
1153+ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
1154+
1155+ In case the 'wget' command fails, just re-execute it, it will pick up where
1156+ it left off.
1157+
1158+ [:ref: `back to step-by-step guide <sources_bissbs >`]
1159+ [:ref: `back to section intro <sources_bisref >`]
1160+
1161+ .. _sources_shallow_bisref :
1162+
1163+ Downloading Linux mainline sources using a shallow clone
1164+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11341165
11351166First, execute the following command to retrieve the latest mainline codebase::
11361167
11371168 git clone -o mainline --no-checkout --depth 1 -b master \
11381169 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ~/linux/
11391170 cd ~/linux/
1171+ git remote add -t master stable \
1172+ https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
11401173
11411174Now deepen your clone's history to the second predecessor of the mainline
11421175release of your 'good' version. In case the latter are 6.0 or 6.0.11, 5.19 would
11431176be the first predecessor and 5.18 the second -- hence deepen the history up to
1144- the latter ::
1177+ that version ::
11451178
11461179 git fetch --shallow-exclude=v5.18 mainline
11471180
@@ -1150,7 +1183,7 @@ branches as explained in the step-by-step guide.
11501183
11511184Note, shallow clones have a few peculiar characteristics:
11521185
1153- * For bisections the history needs to be deepend a few mainline versions
1186+ * For bisections the history needs to be deepened a few mainline versions
11541187 farther than it seems necessary, as explained above already. That's because
11551188 Git otherwise will be unable to revert or describe most of the commits within
11561189 a range (say v6.1..v6.2), as they are internally based on earlier kernels
0 commit comments