Lines Matching refs:you

14 *[If you are new to compiling Linux, ignore this TLDR and head over to the next
18 which might be relevant for you.]*
24 you then use to configure, build and install your own kernel::
29 # Hint: if you want to apply patches, do it at this point. See below for details.
32 # Hint: at this point you might want to adjust the build configuration; you'll
33 # have to, if you are running Debian. See below for details.
40 If you later want to build a newer mainline snapshot, use these commands::
44 # Note: the next command will discard any changes you did to the code:
46 # Reminder: if you want to (re)apply patches, do it at this point.
47 # Reminder: you might want to add or modify a build tag at this point.
77 Note: if you see this note, you are reading the text's source file. You
80 to where you left off. Find a the latest rendered version here:
103 * Install all software required to build a Linux kernel. Often you will need:
116 typically suffice. If you have less available, be sure to check the reference
125 * Retrieve the sources of the Linux version you intend to build; then change
133 prefer the latter, if downloading a lot of data does not bother you, as that
143 If you want to access recent mainline releases and pre-releases, deepen you
144 clone's history to the oldest mainline version you are interested in::
148 In case you want to access a stable/longterm release (say v6.1.5), simply add
155 Now checkout the code you are interested in. If you just performed the
156 initial clone, you will be able to check out a fresh mainline codebase, which
161 If you deepened your clone, you instead of ``origin/master`` can specify the
162 version you deepened to (``v6.0`` above); later releases like ``v6.1`` and
164 like ``v6.1.5`` work just the same, if you added the appropriate
171 * In case you want to apply a kernel patch, do so now. Often a command like
179 If you cloned the sources with git and anything goes sideways, run ``git
186 * If you patched your kernel or have one of the same version installed already,
187 better add a unique tag to the one you are about to build::
201 If you already prepared such a '.config' file yourself, copy it to
208 Using this make target is fine for everybody else, too -- but you often can
215 reduce the compile time enormously, especially if you are running an
218 There is a catch: 'localmodconfig' is likely to disable kernel features you
219 did not use since you booted your Linux -- like drivers for currently
223 it is often negligible if such features are missing. But you should keep that
225 be the reason why something you only use occasionally stopped working.
231 * Check if you might want to or have to adjust some kernel configuration
234 * Evaluate how you want to handle debug symbols. Enable them, if you later
236 'warning', or 'BUG'; on the other hand disable them, if you are short on
241 * Are you running Debian? Then to avoid known problems by performing
245 * If you want to influence the other aspects of the configuration, do so now
255 If you want your kernel packaged up as deb, rpm, or tar file, see the
266 Often all left for you to do afterwards is a ``reboot``, as many commodity
269 distributions you have to take care of these two steps manually for reasons
273 does nothing at all; in that case you have to manually install your kernel,
276 If you are running a immutable Linux distribution, check its documentation
283 * To later build another kernel you need similar steps, but sometimes slightly
290 In case you want to build a version from a stable/longterm series you have
295 Now fetch the latest upstream changes; you again need to specify the earliest
296 version you care about, as git otherwise might retrieve the entire commit
301 Now switch to the version you are interested in -- but be aware the command
302 used here will discard any modifications you performed, as they would
303 conflict with the sources you want to checkout::
307 At this point you might want to patch the sources again or set/modify a build
310 you prepared earlier using localmodconfig (~/linux/.config) for your next
313 # reminder: if you want to apply patches, do it at this point
314 # reminder: you might want to update your build tag at this point
331 not delete the kernel you are running, as that might render your system
352 Did you run into trouble following any of the above steps that is not cleared up
353 by the reference section below? Or do you have ideas how to improve the text?
374 Remember, you are dealing with computers, which sometimes do unexpected things
375 -- especially if you fiddle with crucial parts like the kernel of an operating
376 system. That's what you are about to do in this process. Hence, better prepare
407 tell you to create a one-time password, which is safe to write down. Now
411 Secure Boot state' there. Shim's 'MokManager' will now ask you to enter three
413 you provided them, confirm that you really want to disable the validation.
426 The kernel is pretty stand-alone, but besides tools like the compiler you will
428 depends on your Linux distribution and the configuration of the kernel you are
431 Here are a few examples what you typically need on some mainstream
449 In case you wonder why these lists include openssl and its development headers:
453 Sometimes you will need tools for compression formats like bzip2, gzip, lz4,
456 You might need additional libraries and their development headers in case you
473 safe side, so often you will need less.
475 If you have space constraints, remember to read the reference section when you
488 *Retrieve the sources of the Linux version you intend to build.*
500 artifacts in the source tree. If you prefer to separate them, simply add
516 to specify the earliest version you care about (or to be precise: its git
519 define the depth of the history you want to download. As a second
520 alternative, you can also specify a certain depth explicitly with a parameter
521 like ``--depth=1``, unless you add branches for stable/longterm kernels.
524 the time you care about, or an explicit depth as shown in the step-by-step
525 guide. Otherwise you will risk downloading nearly the entire git history,
529 Note, you do not have to use the same version or date all the time. But when
530 you change it over time, git will deepen or flatten the history to the
531 specified point. That allows you to retrieve versions you initially thought
532 you did not need -- or it will discard the sources of older versions, for
533 example in case you want to free up some disk space. The latter will happen
537 * Be warned, when deepening your clone you might encounter an error like
541 * In case you want to revert changes from a certain version (say Linux 6.3) or
555 sources. It actually can be, if you are certain to build just one particular
556 kernel version without changing any code. Thing is: you might be sure this will
566 you use ``git clone --depth=1`` to create a shallow clone of the latest mainline
570 A shallow clone therefore is often the better choice. If you nevertheless want
585 nothing that bothers you, instead of a shallow clone perform a full git clone
607 When cloning the sources using git and checking out origin/master, you often
609 release or pre-release. This almost always is the code you want when giving
613 There is one exception: you might want to stick to the latest mainline release
633 not something to worry about; but in case you really need the latest code, just
651 *In case you want to apply a kernel patch, do so now.*
654 This is the point where you might want to patch your kernel -- for example when
655 a developer proposed a fix and asked you to check if it helps. The step-by-step
665 *If you patched your kernel or already have that kernel version installed,
669 Tagging your kernel will help avoid confusion later, especially when you patched
695 Make targets like localmodconfig and olddefconfig share a few common snares you
699 (e.g. '~/linux/.config'), if one exists. In case you want to start from
700 scratch you thus need to delete it.
705 '/boot/config-6.0.7-250.fc36.x86_64' tells you which file they picked. If
709 * Unexpected things might happen if you try to use a config file prepared for
710 one kernel (say v6.0) on an older generation (say v5.15). In that case you
722 If you want to set these configurations options manually, use ``oldconfig``
724 localmodconfig. Then for each undefined configuration option you will be asked
725 how to proceed. In case you are unsure what to answer, simply hit 'enter' to
732 can easily happen that your self-built kernel will lack modules for tasks you
734 require kernel modules that are normally autoloaded when you perform that task
735 for the first time; if you didn't perform that task at least once before using
743 systems you otherwise do not utilize (btrfs, ext4, FAT, NTFS, XFS, ...). But it
747 Do not let that risk bother you, especially when compiling a kernel only for
748 testing purposes: everything typically crucial will be there. And if you forget
749 something important you can turn on a missing feature later and quickly run the
752 But if you plan to build and use self-built kernels regularly, you might want to
763 If you want to use localmodconfig to build a kernel for another machine, run
767 you likely want to copy a base kernel configuration from the other machine over
777 *Check if you might want to or have to adjust some kernel configuration
780 Depending on your needs you at this point might want or have to adjust some
788 *Evaluate how you want to handle debug symbols.*
792 as it is; but you should take a closer look at this, if you might need to decode
796 'panic', 'Oops', 'warning', or 'BUG' later when running, as then you will be
804 Hence, if you want a small kernel and are unlikely to decode a stack trace
805 later, you might want to disable debug symbols to avoid above downsides::
813 chance that you need to decode a stack trace later (as explained by 'Decode
832 *Are you running* [:ref:`... <configmods_sbs>`]
834 The following sections help you to avoid build problems that are known to occur
857 *If you want to influence the other aspects of the configuration, do so
864 (ncurses, Qt5, Gtk2); an error message will tell you if something required is
876 A lot can go wrong at this stage, but the instructions below will help you help
886 failure messages coupled with some research on the internet will often tell you
906 often one of the hits will provide a solution for your problem, too. If you
910 In the end, most trouble you are to run into has likely been encountered and
912 system, but lies the code. If you run into one of those, you might thus find a
933 If you employ the targets to generate deb or rpm packages, ignore the
951 What you need to do after executing the command in the step-by-step guide
954 ``/sbin/`` that does everything needed, hence there is nothing left for you
957 you.
964 existing ones, unless you already have one with exactly the same release name.
969 guide, as things will go sideways if you install your kernel's image before its
993 *To later build another kernel you need similar, but sometimes slightly
998 kernel builds, as you already created a trimmed down configuration you want to
1000 adjust your build configurations to the needs of the kernel version you are
1003 If you created a shallow-clone with git, remember what the :ref:`section that
1004 explained the setup described in more detail <sources>`: you need to use a
1033 mentioned in the step-by-step guide will remove all of these files for you --
1035 too. On others you have to take care of these steps yourself. The following
1048 for kernels manually: you might accidentally remove files of a 6.0.11 kernel
1049 when all you want is to remove 6.0 or 6.0.1.
1065 guide would defeat its purpose, as without such a focus you would need dozens or
1066 hundreds of constructs along the lines of 'in case you are having <insert
1067 machine or distro>, you at this point have to do <this and that>
1071 That being said: this of course is a balancing act. Hence, if you think an
1080 you spot a typo or small mistake, feel free to let him know directly and
1081 he'll fix it. You are free to do the same in a mostly informal way if you
1088 of the file. If you want to distribute this text under CC-BY-4.0 only,