How to customize a linux kernel: modify CONFIG_STRICT_DEVMEM












0















I would like to set CONFIG_STRICT_DEVMEM=n and recompile my kernel in order to try out what @Oliv suggested in the comments of my question on stackoverflow.



I am following the BuildYourOwnKernel tutorial on the ubuntu wiki:



$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git
$ cd ubuntu-bionic/
$ chmod a+x debian/rules
$ chmod a+x debian/scripts/*
$ chmod a+x debian/scripts/misc/*
$ fakeroot debian/rules clean
$ sudo fakeroot debian/rules editconfigs
dh_testdir;
/bin/bash -e debian/scripts/misc/kernelconfig editconfigs
Do you want to edit config: amd64/config.flavour.generic? [Y/n] Y


and I face the following menu:
enter image description here



I have searched arround in the hope of finding the variable that I need to change (CONFIG_STRICT_DEVMEM), but I didn't find it.



Most of the resources that I find on the internet elaborate on compiling/building the kernel, but I didn't find anything on actually making specific changes.



Could someone please point me in the right direction?



EDIT 1:



A file:



./build/.config


is created when sudo fakeroot debian/rules editconfigs is aborted.



$ cat ./build/.config | grep CONFIG_STRICT_DEVMEM


returns



CONFIG_STRICT_DEVMEM=y
CONFIG_STRICT_DEVMEM=y


I set these variables to n and ran



fakeroot debian/rules binary-headers binary-generic binary-perarch


which ended in an error:



/bin/bash: gawk: command not found
debian/rules.d/2-binary-arch.mk:123: recipe for target 'install-generic' failed
make: *** [install-generic] Error 127


EDIT 2:



Now I am following a different tutorial and @Oliv's advice:




  • I installed gawk

  • I ran make menuconfig to generate a file called .config at the root of the git repository.

  • I set CONFIG_STRICT_DEVMEM from =y to =n

  • I ran make menuconfig again.


  • cat .config | grep CONFIG_STRICT_DEVMEM returns # CONFIG_STRICT_DEVMEM is not set

  • Now I am running make && make modules_install && make install as root.


I will report any further progress...










share|improve this question





























    0















    I would like to set CONFIG_STRICT_DEVMEM=n and recompile my kernel in order to try out what @Oliv suggested in the comments of my question on stackoverflow.



    I am following the BuildYourOwnKernel tutorial on the ubuntu wiki:



    $ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git
    $ cd ubuntu-bionic/
    $ chmod a+x debian/rules
    $ chmod a+x debian/scripts/*
    $ chmod a+x debian/scripts/misc/*
    $ fakeroot debian/rules clean
    $ sudo fakeroot debian/rules editconfigs
    dh_testdir;
    /bin/bash -e debian/scripts/misc/kernelconfig editconfigs
    Do you want to edit config: amd64/config.flavour.generic? [Y/n] Y


    and I face the following menu:
    enter image description here



    I have searched arround in the hope of finding the variable that I need to change (CONFIG_STRICT_DEVMEM), but I didn't find it.



    Most of the resources that I find on the internet elaborate on compiling/building the kernel, but I didn't find anything on actually making specific changes.



    Could someone please point me in the right direction?



    EDIT 1:



    A file:



    ./build/.config


    is created when sudo fakeroot debian/rules editconfigs is aborted.



    $ cat ./build/.config | grep CONFIG_STRICT_DEVMEM


    returns



    CONFIG_STRICT_DEVMEM=y
    CONFIG_STRICT_DEVMEM=y


    I set these variables to n and ran



    fakeroot debian/rules binary-headers binary-generic binary-perarch


    which ended in an error:



    /bin/bash: gawk: command not found
    debian/rules.d/2-binary-arch.mk:123: recipe for target 'install-generic' failed
    make: *** [install-generic] Error 127


    EDIT 2:



    Now I am following a different tutorial and @Oliv's advice:




    • I installed gawk

    • I ran make menuconfig to generate a file called .config at the root of the git repository.

    • I set CONFIG_STRICT_DEVMEM from =y to =n

    • I ran make menuconfig again.


    • cat .config | grep CONFIG_STRICT_DEVMEM returns # CONFIG_STRICT_DEVMEM is not set

    • Now I am running make && make modules_install && make install as root.


    I will report any further progress...










    share|improve this question



























      0












      0








      0








      I would like to set CONFIG_STRICT_DEVMEM=n and recompile my kernel in order to try out what @Oliv suggested in the comments of my question on stackoverflow.



      I am following the BuildYourOwnKernel tutorial on the ubuntu wiki:



      $ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git
      $ cd ubuntu-bionic/
      $ chmod a+x debian/rules
      $ chmod a+x debian/scripts/*
      $ chmod a+x debian/scripts/misc/*
      $ fakeroot debian/rules clean
      $ sudo fakeroot debian/rules editconfigs
      dh_testdir;
      /bin/bash -e debian/scripts/misc/kernelconfig editconfigs
      Do you want to edit config: amd64/config.flavour.generic? [Y/n] Y


      and I face the following menu:
      enter image description here



      I have searched arround in the hope of finding the variable that I need to change (CONFIG_STRICT_DEVMEM), but I didn't find it.



      Most of the resources that I find on the internet elaborate on compiling/building the kernel, but I didn't find anything on actually making specific changes.



      Could someone please point me in the right direction?



      EDIT 1:



      A file:



      ./build/.config


      is created when sudo fakeroot debian/rules editconfigs is aborted.



      $ cat ./build/.config | grep CONFIG_STRICT_DEVMEM


      returns



      CONFIG_STRICT_DEVMEM=y
      CONFIG_STRICT_DEVMEM=y


      I set these variables to n and ran



      fakeroot debian/rules binary-headers binary-generic binary-perarch


      which ended in an error:



      /bin/bash: gawk: command not found
      debian/rules.d/2-binary-arch.mk:123: recipe for target 'install-generic' failed
      make: *** [install-generic] Error 127


      EDIT 2:



      Now I am following a different tutorial and @Oliv's advice:




      • I installed gawk

      • I ran make menuconfig to generate a file called .config at the root of the git repository.

      • I set CONFIG_STRICT_DEVMEM from =y to =n

      • I ran make menuconfig again.


      • cat .config | grep CONFIG_STRICT_DEVMEM returns # CONFIG_STRICT_DEVMEM is not set

      • Now I am running make && make modules_install && make install as root.


      I will report any further progress...










      share|improve this question
















      I would like to set CONFIG_STRICT_DEVMEM=n and recompile my kernel in order to try out what @Oliv suggested in the comments of my question on stackoverflow.



      I am following the BuildYourOwnKernel tutorial on the ubuntu wiki:



      $ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git
      $ cd ubuntu-bionic/
      $ chmod a+x debian/rules
      $ chmod a+x debian/scripts/*
      $ chmod a+x debian/scripts/misc/*
      $ fakeroot debian/rules clean
      $ sudo fakeroot debian/rules editconfigs
      dh_testdir;
      /bin/bash -e debian/scripts/misc/kernelconfig editconfigs
      Do you want to edit config: amd64/config.flavour.generic? [Y/n] Y


      and I face the following menu:
      enter image description here



      I have searched arround in the hope of finding the variable that I need to change (CONFIG_STRICT_DEVMEM), but I didn't find it.



      Most of the resources that I find on the internet elaborate on compiling/building the kernel, but I didn't find anything on actually making specific changes.



      Could someone please point me in the right direction?



      EDIT 1:



      A file:



      ./build/.config


      is created when sudo fakeroot debian/rules editconfigs is aborted.



      $ cat ./build/.config | grep CONFIG_STRICT_DEVMEM


      returns



      CONFIG_STRICT_DEVMEM=y
      CONFIG_STRICT_DEVMEM=y


      I set these variables to n and ran



      fakeroot debian/rules binary-headers binary-generic binary-perarch


      which ended in an error:



      /bin/bash: gawk: command not found
      debian/rules.d/2-binary-arch.mk:123: recipe for target 'install-generic' failed
      make: *** [install-generic] Error 127


      EDIT 2:



      Now I am following a different tutorial and @Oliv's advice:




      • I installed gawk

      • I ran make menuconfig to generate a file called .config at the root of the git repository.

      • I set CONFIG_STRICT_DEVMEM from =y to =n

      • I ran make menuconfig again.


      • cat .config | grep CONFIG_STRICT_DEVMEM returns # CONFIG_STRICT_DEVMEM is not set

      • Now I am running make && make modules_install && make install as root.


      I will report any further progress...







      linux ubuntu kernel






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 12 at 12:21







      Chandran Goodchild

















      asked Feb 11 at 13:18









      Chandran GoodchildChandran Goodchild

      1011




      1011






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Ok it worked out.



          Here is a general "recipe" for people who want to modify their kernel




          • Use ll /proc/ | grep conf and ll /boot/ | grep conf to locate your config file.


          • Check how the variable of interest is configured using path_to_config | grep variable_of_interest or unzip it if necessary: path_to_config.gz | gunzip | grep variable_of_interest



          If you want to change the value of one of these variables you need to do the following:





          • Clone the git repository that contains your kernel. I used:



            git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git



            replace bionic with the code name of your operating system.




          • Install software:



            sudo apt-get build-dep linux-image-$(uname -r) && sudo apt-get install gawk



          • cd ubuntu-bionic/ again replace bionic with the codename of your OS.



          • Make the following files executable:



            chmod a+x debian/rules
            chmod a+x debian/scripts/*
            chmod a+x debian/scripts/misc/*



          • Run fakeroot debian/rules clean



          • Copy your current configurations into the root of the git repository:



            cp path_to_config ./.config



          • Configure .config according to your needs. I recommend setting CONFIG_DEBUG_INFO=n and CONFIG_DEBUG_INFO_DWARF4=n in order to reduce the compilation time and in order to avoid using up so much disk space during compilation.



          • Run:



            sudo su
            make menuconfig
            make && make modules_install && make install




          Now be patient...



          In my case path_to_config | grep variable_of_interest still returned the old configuration uppon completion of the above steps, but the changes had been made to the kernel and it was working as required.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fsuperuser.com%2fquestions%2f1404426%2fhow-to-customize-a-linux-kernel-modify-config-strict-devmem%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Ok it worked out.



            Here is a general "recipe" for people who want to modify their kernel




            • Use ll /proc/ | grep conf and ll /boot/ | grep conf to locate your config file.


            • Check how the variable of interest is configured using path_to_config | grep variable_of_interest or unzip it if necessary: path_to_config.gz | gunzip | grep variable_of_interest



            If you want to change the value of one of these variables you need to do the following:





            • Clone the git repository that contains your kernel. I used:



              git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git



              replace bionic with the code name of your operating system.




            • Install software:



              sudo apt-get build-dep linux-image-$(uname -r) && sudo apt-get install gawk



            • cd ubuntu-bionic/ again replace bionic with the codename of your OS.



            • Make the following files executable:



              chmod a+x debian/rules
              chmod a+x debian/scripts/*
              chmod a+x debian/scripts/misc/*



            • Run fakeroot debian/rules clean



            • Copy your current configurations into the root of the git repository:



              cp path_to_config ./.config



            • Configure .config according to your needs. I recommend setting CONFIG_DEBUG_INFO=n and CONFIG_DEBUG_INFO_DWARF4=n in order to reduce the compilation time and in order to avoid using up so much disk space during compilation.



            • Run:



              sudo su
              make menuconfig
              make && make modules_install && make install




            Now be patient...



            In my case path_to_config | grep variable_of_interest still returned the old configuration uppon completion of the above steps, but the changes had been made to the kernel and it was working as required.






            share|improve this answer




























              0














              Ok it worked out.



              Here is a general "recipe" for people who want to modify their kernel




              • Use ll /proc/ | grep conf and ll /boot/ | grep conf to locate your config file.


              • Check how the variable of interest is configured using path_to_config | grep variable_of_interest or unzip it if necessary: path_to_config.gz | gunzip | grep variable_of_interest



              If you want to change the value of one of these variables you need to do the following:





              • Clone the git repository that contains your kernel. I used:



                git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git



                replace bionic with the code name of your operating system.




              • Install software:



                sudo apt-get build-dep linux-image-$(uname -r) && sudo apt-get install gawk



              • cd ubuntu-bionic/ again replace bionic with the codename of your OS.



              • Make the following files executable:



                chmod a+x debian/rules
                chmod a+x debian/scripts/*
                chmod a+x debian/scripts/misc/*



              • Run fakeroot debian/rules clean



              • Copy your current configurations into the root of the git repository:



                cp path_to_config ./.config



              • Configure .config according to your needs. I recommend setting CONFIG_DEBUG_INFO=n and CONFIG_DEBUG_INFO_DWARF4=n in order to reduce the compilation time and in order to avoid using up so much disk space during compilation.



              • Run:



                sudo su
                make menuconfig
                make && make modules_install && make install




              Now be patient...



              In my case path_to_config | grep variable_of_interest still returned the old configuration uppon completion of the above steps, but the changes had been made to the kernel and it was working as required.






              share|improve this answer


























                0












                0








                0







                Ok it worked out.



                Here is a general "recipe" for people who want to modify their kernel




                • Use ll /proc/ | grep conf and ll /boot/ | grep conf to locate your config file.


                • Check how the variable of interest is configured using path_to_config | grep variable_of_interest or unzip it if necessary: path_to_config.gz | gunzip | grep variable_of_interest



                If you want to change the value of one of these variables you need to do the following:





                • Clone the git repository that contains your kernel. I used:



                  git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git



                  replace bionic with the code name of your operating system.




                • Install software:



                  sudo apt-get build-dep linux-image-$(uname -r) && sudo apt-get install gawk



                • cd ubuntu-bionic/ again replace bionic with the codename of your OS.



                • Make the following files executable:



                  chmod a+x debian/rules
                  chmod a+x debian/scripts/*
                  chmod a+x debian/scripts/misc/*



                • Run fakeroot debian/rules clean



                • Copy your current configurations into the root of the git repository:



                  cp path_to_config ./.config



                • Configure .config according to your needs. I recommend setting CONFIG_DEBUG_INFO=n and CONFIG_DEBUG_INFO_DWARF4=n in order to reduce the compilation time and in order to avoid using up so much disk space during compilation.



                • Run:



                  sudo su
                  make menuconfig
                  make && make modules_install && make install




                Now be patient...



                In my case path_to_config | grep variable_of_interest still returned the old configuration uppon completion of the above steps, but the changes had been made to the kernel and it was working as required.






                share|improve this answer













                Ok it worked out.



                Here is a general "recipe" for people who want to modify their kernel




                • Use ll /proc/ | grep conf and ll /boot/ | grep conf to locate your config file.


                • Check how the variable of interest is configured using path_to_config | grep variable_of_interest or unzip it if necessary: path_to_config.gz | gunzip | grep variable_of_interest



                If you want to change the value of one of these variables you need to do the following:





                • Clone the git repository that contains your kernel. I used:



                  git clone git://kernel.ubuntu.com/ubuntu/ubuntu-bionic.git



                  replace bionic with the code name of your operating system.




                • Install software:



                  sudo apt-get build-dep linux-image-$(uname -r) && sudo apt-get install gawk



                • cd ubuntu-bionic/ again replace bionic with the codename of your OS.



                • Make the following files executable:



                  chmod a+x debian/rules
                  chmod a+x debian/scripts/*
                  chmod a+x debian/scripts/misc/*



                • Run fakeroot debian/rules clean



                • Copy your current configurations into the root of the git repository:



                  cp path_to_config ./.config



                • Configure .config according to your needs. I recommend setting CONFIG_DEBUG_INFO=n and CONFIG_DEBUG_INFO_DWARF4=n in order to reduce the compilation time and in order to avoid using up so much disk space during compilation.



                • Run:



                  sudo su
                  make menuconfig
                  make && make modules_install && make install




                Now be patient...



                In my case path_to_config | grep variable_of_interest still returned the old configuration uppon completion of the above steps, but the changes had been made to the kernel and it was working as required.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 13 at 12:06









                Chandran GoodchildChandran Goodchild

                1011




                1011






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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%2fsuperuser.com%2fquestions%2f1404426%2fhow-to-customize-a-linux-kernel-modify-config-strict-devmem%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

                    Aardman Animations

                    Are they similar matrix

                    “minimization” problem in Euclidean space related to orthonormal basis