Compiling Linux kernel with all available driversCompiling kernel modules in Arch LinuxLinux kernel compiling...

How much steel armor can you wear and still be able to swim?

Dates on degrees don’t make sense – will people care?

Justifying Affordable Bespoke Spaceships

Cut the gold chain

Why does independence imply zero correlation?

Does a proton have a binding energy?

Dmesg full of I/O errors, smart ok, four disks affected

Setting up the trap

Covering index used despite missing column

Subtract the Folded Matrix

Drawing a second weapon as part of an attack?

Counterfeit checks were created for my account. How does this type of fraud work?

Why isn't it a compile-time error to return a nullptr as a std::string?

Draw a symmetric alien head

Can the pre-order traversal of two different trees be the same even though they are different?

Why does Linux list NVMe drives as /dev/nvme0 instead of /dev/sda?

Is declining an undergraduate award which causes me discomfort appropriate?

What happened to Hopper's girlfriend in season one?

Am I legally required to provide a (GPL licensed) source code even after a project is abandoned?

Why don't countries like Japan just print more money?

Can I enter the UK for 24 hours from a Schengen area, holding an Indian passport?

How to work with PETG? Settings, caveats, etc

"What is the maximum that Player 1 can win?"

Do I have to explain the mechanical superiority of the player-character within the fiction of the game?



Compiling Linux kernel with all available drivers


Compiling kernel modules in Arch LinuxLinux kernel compiling commandsUSB3 Hard Drive Not Recognised by LinuxLinux (debian/testing) cannot boot after installing kernel 3.9.1How to work with a kernel one has no information about?edit module requirements when compiling kernelLinux/Embedded Linux - Understanding the Kernel and additional BSP specific componentsLooking for match between my laptop and linux kernelkernel configuration: machine on Linux v4.17-rc2 makes creaky soundsLocating Drivers for Intel AX200 Wireless on 5.1 Kernel






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I'm compiling the kernel for usage in portable USB stick. Which means it must run on any hardware, not just hardware of the machine where it is being compiled. What should I choose in kernel config for that? Is make allyesconfig suitable for this?



Just in case, I'm doing this because stock kernels for my operating system (Debian Stretch) don't include the latest drivers I need (touchpad support for some 2019 Lenovo laptops appeared only in 5.1)










share|improve this question





























    1















    I'm compiling the kernel for usage in portable USB stick. Which means it must run on any hardware, not just hardware of the machine where it is being compiled. What should I choose in kernel config for that? Is make allyesconfig suitable for this?



    Just in case, I'm doing this because stock kernels for my operating system (Debian Stretch) don't include the latest drivers I need (touchpad support for some 2019 Lenovo laptops appeared only in 5.1)










    share|improve this question

























      1












      1








      1


      1






      I'm compiling the kernel for usage in portable USB stick. Which means it must run on any hardware, not just hardware of the machine where it is being compiled. What should I choose in kernel config for that? Is make allyesconfig suitable for this?



      Just in case, I'm doing this because stock kernels for my operating system (Debian Stretch) don't include the latest drivers I need (touchpad support for some 2019 Lenovo laptops appeared only in 5.1)










      share|improve this question














      I'm compiling the kernel for usage in portable USB stick. Which means it must run on any hardware, not just hardware of the machine where it is being compiled. What should I choose in kernel config for that? Is make allyesconfig suitable for this?



      Just in case, I'm doing this because stock kernels for my operating system (Debian Stretch) don't include the latest drivers I need (touchpad support for some 2019 Lenovo laptops appeared only in 5.1)







      linux-kernel kernel-parameters






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      arsars

      1335




      1335






















          2 Answers
          2






          active

          oldest

          votes


















          0














          Instead of compiling a custom kernel, you can just add the relevant kernel modules to your initramfs. In my project I just created a file inside the initramfs-tools folder called "modules" where I listed each module to be loaded, then I ran:



          mkinitramfs -o "initrd.img" initramfs-tools


          to build it.



          More info can be found here: http://manpages.ubuntu.com/manpages/trusty/man8/initramfs-tools.8.html





          If you just want the desktop environment to have them, then adding modules can be done by editing the /etc/modules file to load the modules automagically at boot time.






          share|improve this answer































            0














            make allyesconfig builds as many drivers into the main kernel as possible, which makes for a huge kernel file. The <kernel source>/Documentation/admin-guide/README.rst says:




            Having unnecessary drivers will make the kernel bigger, and can under some circumstances lead to problems: probing for a nonexistent controller card may confuse your other controllers.




            Also:




            The "kernel hacking" configuration details usually result in a bigger or slower kernel (or both), and can even make the kernel less stable by configuring some routines to actively try to break bad code to find kernel problems (kmalloc()). Thus you should probably answer 'n' to the questions for "development", "experimental", or "debugging" features.




            make allmodconfig builds as many drivers as loadable modules as possible, so it might be a better starting point than make allyesconfig.



            You might consider grabbing a linux-config package from Debian Testing or from Stretch-backports and picking the kernel configuration from it. That's only a few kernel releases away from 5.1, so it should not be too hard to run make oldconfig with that configuration, and reading the help text before deciding on any kernel features added in versions 4.20, 5.0 and 5.1.



            Note that the kernel packages from Debian should be already configured to be as generic as possible, and using that as a basis for your new kernel configuration might allow you to avoid some pitfalls with debugging features or settings related to system console. Debugging a kernel configuration that fails with no viable system console drivers is a special kind of nuisance.






            share|improve this answer
























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f525550%2fcompiling-linux-kernel-with-all-available-drivers%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              Instead of compiling a custom kernel, you can just add the relevant kernel modules to your initramfs. In my project I just created a file inside the initramfs-tools folder called "modules" where I listed each module to be loaded, then I ran:



              mkinitramfs -o "initrd.img" initramfs-tools


              to build it.



              More info can be found here: http://manpages.ubuntu.com/manpages/trusty/man8/initramfs-tools.8.html





              If you just want the desktop environment to have them, then adding modules can be done by editing the /etc/modules file to load the modules automagically at boot time.






              share|improve this answer




























                0














                Instead of compiling a custom kernel, you can just add the relevant kernel modules to your initramfs. In my project I just created a file inside the initramfs-tools folder called "modules" where I listed each module to be loaded, then I ran:



                mkinitramfs -o "initrd.img" initramfs-tools


                to build it.



                More info can be found here: http://manpages.ubuntu.com/manpages/trusty/man8/initramfs-tools.8.html





                If you just want the desktop environment to have them, then adding modules can be done by editing the /etc/modules file to load the modules automagically at boot time.






                share|improve this answer


























                  0












                  0








                  0







                  Instead of compiling a custom kernel, you can just add the relevant kernel modules to your initramfs. In my project I just created a file inside the initramfs-tools folder called "modules" where I listed each module to be loaded, then I ran:



                  mkinitramfs -o "initrd.img" initramfs-tools


                  to build it.



                  More info can be found here: http://manpages.ubuntu.com/manpages/trusty/man8/initramfs-tools.8.html





                  If you just want the desktop environment to have them, then adding modules can be done by editing the /etc/modules file to load the modules automagically at boot time.






                  share|improve this answer













                  Instead of compiling a custom kernel, you can just add the relevant kernel modules to your initramfs. In my project I just created a file inside the initramfs-tools folder called "modules" where I listed each module to be loaded, then I ran:



                  mkinitramfs -o "initrd.img" initramfs-tools


                  to build it.



                  More info can be found here: http://manpages.ubuntu.com/manpages/trusty/man8/initramfs-tools.8.html





                  If you just want the desktop environment to have them, then adding modules can be done by editing the /etc/modules file to load the modules automagically at boot time.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 39 mins ago









                  BenjaminBenjamin

                  918




                  918

























                      0














                      make allyesconfig builds as many drivers into the main kernel as possible, which makes for a huge kernel file. The <kernel source>/Documentation/admin-guide/README.rst says:




                      Having unnecessary drivers will make the kernel bigger, and can under some circumstances lead to problems: probing for a nonexistent controller card may confuse your other controllers.




                      Also:




                      The "kernel hacking" configuration details usually result in a bigger or slower kernel (or both), and can even make the kernel less stable by configuring some routines to actively try to break bad code to find kernel problems (kmalloc()). Thus you should probably answer 'n' to the questions for "development", "experimental", or "debugging" features.




                      make allmodconfig builds as many drivers as loadable modules as possible, so it might be a better starting point than make allyesconfig.



                      You might consider grabbing a linux-config package from Debian Testing or from Stretch-backports and picking the kernel configuration from it. That's only a few kernel releases away from 5.1, so it should not be too hard to run make oldconfig with that configuration, and reading the help text before deciding on any kernel features added in versions 4.20, 5.0 and 5.1.



                      Note that the kernel packages from Debian should be already configured to be as generic as possible, and using that as a basis for your new kernel configuration might allow you to avoid some pitfalls with debugging features or settings related to system console. Debugging a kernel configuration that fails with no viable system console drivers is a special kind of nuisance.






                      share|improve this answer




























                        0














                        make allyesconfig builds as many drivers into the main kernel as possible, which makes for a huge kernel file. The <kernel source>/Documentation/admin-guide/README.rst says:




                        Having unnecessary drivers will make the kernel bigger, and can under some circumstances lead to problems: probing for a nonexistent controller card may confuse your other controllers.




                        Also:




                        The "kernel hacking" configuration details usually result in a bigger or slower kernel (or both), and can even make the kernel less stable by configuring some routines to actively try to break bad code to find kernel problems (kmalloc()). Thus you should probably answer 'n' to the questions for "development", "experimental", or "debugging" features.




                        make allmodconfig builds as many drivers as loadable modules as possible, so it might be a better starting point than make allyesconfig.



                        You might consider grabbing a linux-config package from Debian Testing or from Stretch-backports and picking the kernel configuration from it. That's only a few kernel releases away from 5.1, so it should not be too hard to run make oldconfig with that configuration, and reading the help text before deciding on any kernel features added in versions 4.20, 5.0 and 5.1.



                        Note that the kernel packages from Debian should be already configured to be as generic as possible, and using that as a basis for your new kernel configuration might allow you to avoid some pitfalls with debugging features or settings related to system console. Debugging a kernel configuration that fails with no viable system console drivers is a special kind of nuisance.






                        share|improve this answer


























                          0












                          0








                          0







                          make allyesconfig builds as many drivers into the main kernel as possible, which makes for a huge kernel file. The <kernel source>/Documentation/admin-guide/README.rst says:




                          Having unnecessary drivers will make the kernel bigger, and can under some circumstances lead to problems: probing for a nonexistent controller card may confuse your other controllers.




                          Also:




                          The "kernel hacking" configuration details usually result in a bigger or slower kernel (or both), and can even make the kernel less stable by configuring some routines to actively try to break bad code to find kernel problems (kmalloc()). Thus you should probably answer 'n' to the questions for "development", "experimental", or "debugging" features.




                          make allmodconfig builds as many drivers as loadable modules as possible, so it might be a better starting point than make allyesconfig.



                          You might consider grabbing a linux-config package from Debian Testing or from Stretch-backports and picking the kernel configuration from it. That's only a few kernel releases away from 5.1, so it should not be too hard to run make oldconfig with that configuration, and reading the help text before deciding on any kernel features added in versions 4.20, 5.0 and 5.1.



                          Note that the kernel packages from Debian should be already configured to be as generic as possible, and using that as a basis for your new kernel configuration might allow you to avoid some pitfalls with debugging features or settings related to system console. Debugging a kernel configuration that fails with no viable system console drivers is a special kind of nuisance.






                          share|improve this answer













                          make allyesconfig builds as many drivers into the main kernel as possible, which makes for a huge kernel file. The <kernel source>/Documentation/admin-guide/README.rst says:




                          Having unnecessary drivers will make the kernel bigger, and can under some circumstances lead to problems: probing for a nonexistent controller card may confuse your other controllers.




                          Also:




                          The "kernel hacking" configuration details usually result in a bigger or slower kernel (or both), and can even make the kernel less stable by configuring some routines to actively try to break bad code to find kernel problems (kmalloc()). Thus you should probably answer 'n' to the questions for "development", "experimental", or "debugging" features.




                          make allmodconfig builds as many drivers as loadable modules as possible, so it might be a better starting point than make allyesconfig.



                          You might consider grabbing a linux-config package from Debian Testing or from Stretch-backports and picking the kernel configuration from it. That's only a few kernel releases away from 5.1, so it should not be too hard to run make oldconfig with that configuration, and reading the help text before deciding on any kernel features added in versions 4.20, 5.0 and 5.1.



                          Note that the kernel packages from Debian should be already configured to be as generic as possible, and using that as a basis for your new kernel configuration might allow you to avoid some pitfalls with debugging features or settings related to system console. Debugging a kernel configuration that fails with no viable system console drivers is a special kind of nuisance.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 20 mins ago









                          telcoMtelcoM

                          23.6k12761




                          23.6k12761






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f525550%2fcompiling-linux-kernel-with-all-available-drivers%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                              Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                              Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...