uEnv.txt boot file confusion with embedded Linux





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am re-flashing the internal emmc on my BeagleBone Green board with a Debian image stored on the pluggable SD card.



The instructions I received are to modify the /boot/uEnv.txt file in the SD card image which must be flashed and un-comment the last line : cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh



This works and flashes the internal memory as expected. What I don't understand is when I then check the /boot/uEnv.txt file when the image is flashed, the line is then commented out again. What causes this?



Also, I thought the /boot/uEnv.txt file is part of the bootloader and not the kernel image. I have real confusion here.



Another thing, sorry if it's more than one question. If I wish to modify the uEnv.txt file on the SD card image and then send the modified image to someone else , how to do this?










share|improve this question































    0















    I am re-flashing the internal emmc on my BeagleBone Green board with a Debian image stored on the pluggable SD card.



    The instructions I received are to modify the /boot/uEnv.txt file in the SD card image which must be flashed and un-comment the last line : cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh



    This works and flashes the internal memory as expected. What I don't understand is when I then check the /boot/uEnv.txt file when the image is flashed, the line is then commented out again. What causes this?



    Also, I thought the /boot/uEnv.txt file is part of the bootloader and not the kernel image. I have real confusion here.



    Another thing, sorry if it's more than one question. If I wish to modify the uEnv.txt file on the SD card image and then send the modified image to someone else , how to do this?










    share|improve this question



























      0












      0








      0








      I am re-flashing the internal emmc on my BeagleBone Green board with a Debian image stored on the pluggable SD card.



      The instructions I received are to modify the /boot/uEnv.txt file in the SD card image which must be flashed and un-comment the last line : cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh



      This works and flashes the internal memory as expected. What I don't understand is when I then check the /boot/uEnv.txt file when the image is flashed, the line is then commented out again. What causes this?



      Also, I thought the /boot/uEnv.txt file is part of the bootloader and not the kernel image. I have real confusion here.



      Another thing, sorry if it's more than one question. If I wish to modify the uEnv.txt file on the SD card image and then send the modified image to someone else , how to do this?










      share|improve this question
















      I am re-flashing the internal emmc on my BeagleBone Green board with a Debian image stored on the pluggable SD card.



      The instructions I received are to modify the /boot/uEnv.txt file in the SD card image which must be flashed and un-comment the last line : cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh



      This works and flashes the internal memory as expected. What I don't understand is when I then check the /boot/uEnv.txt file when the image is flashed, the line is then commented out again. What causes this?



      Also, I thought the /boot/uEnv.txt file is part of the bootloader and not the kernel image. I have real confusion here.



      Another thing, sorry if it's more than one question. If I wish to modify the uEnv.txt file on the SD card image and then send the modified image to someone else , how to do this?







      embedded-linux beagleboneblack bootloader u-boot beagleboard






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 16 '18 at 10:34







      Engineer999

















      asked Nov 16 '18 at 10:19









      Engineer999Engineer999

      1,31821222




      1,31821222
























          1 Answer
          1






          active

          oldest

          votes


















          0














          The /boot/uEnv.txt file is being modified by the eMMC flasher script which executes when you boot the board with the uEnv.txt file containining the line cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh: the cmdline parameter in that file indicates the kernel command line, which U-Boot passes to the Linux kernel when booting.



          So with that line in uEnv.txt you are basically telling U-Boot to tell the kernel to launch a "non-conventional" application instead of the default init program (which would boot the system "normally"). This application, which runs under Linux, can access the entire SD card and eMMC memories, including the partition containing the uEnv.txt file, and can change the file contents as it sees fit.



          Regarding your last question, you can create a file containing your modified SD card image from a Linux shell, using the dd tool, e.g:



          dd if=/dev/mmcblk0 of=mySDcard.img



          In the above command, replace /dev/mmcblk0 with the block device file created in the system when you insert your SD card (whose partitions must NOT be mounted for this to work correctly); the image file will be created as mySDcard.img.






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            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%2fstackoverflow.com%2fquestions%2f53335785%2fuenv-txt-boot-file-confusion-with-embedded-linux%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














            The /boot/uEnv.txt file is being modified by the eMMC flasher script which executes when you boot the board with the uEnv.txt file containining the line cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh: the cmdline parameter in that file indicates the kernel command line, which U-Boot passes to the Linux kernel when booting.



            So with that line in uEnv.txt you are basically telling U-Boot to tell the kernel to launch a "non-conventional" application instead of the default init program (which would boot the system "normally"). This application, which runs under Linux, can access the entire SD card and eMMC memories, including the partition containing the uEnv.txt file, and can change the file contents as it sees fit.



            Regarding your last question, you can create a file containing your modified SD card image from a Linux shell, using the dd tool, e.g:



            dd if=/dev/mmcblk0 of=mySDcard.img



            In the above command, replace /dev/mmcblk0 with the block device file created in the system when you insert your SD card (whose partitions must NOT be mounted for this to work correctly); the image file will be created as mySDcard.img.






            share|improve this answer




























              0














              The /boot/uEnv.txt file is being modified by the eMMC flasher script which executes when you boot the board with the uEnv.txt file containining the line cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh: the cmdline parameter in that file indicates the kernel command line, which U-Boot passes to the Linux kernel when booting.



              So with that line in uEnv.txt you are basically telling U-Boot to tell the kernel to launch a "non-conventional" application instead of the default init program (which would boot the system "normally"). This application, which runs under Linux, can access the entire SD card and eMMC memories, including the partition containing the uEnv.txt file, and can change the file contents as it sees fit.



              Regarding your last question, you can create a file containing your modified SD card image from a Linux shell, using the dd tool, e.g:



              dd if=/dev/mmcblk0 of=mySDcard.img



              In the above command, replace /dev/mmcblk0 with the block device file created in the system when you insert your SD card (whose partitions must NOT be mounted for this to work correctly); the image file will be created as mySDcard.img.






              share|improve this answer


























                0












                0








                0







                The /boot/uEnv.txt file is being modified by the eMMC flasher script which executes when you boot the board with the uEnv.txt file containining the line cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh: the cmdline parameter in that file indicates the kernel command line, which U-Boot passes to the Linux kernel when booting.



                So with that line in uEnv.txt you are basically telling U-Boot to tell the kernel to launch a "non-conventional" application instead of the default init program (which would boot the system "normally"). This application, which runs under Linux, can access the entire SD card and eMMC memories, including the partition containing the uEnv.txt file, and can change the file contents as it sees fit.



                Regarding your last question, you can create a file containing your modified SD card image from a Linux shell, using the dd tool, e.g:



                dd if=/dev/mmcblk0 of=mySDcard.img



                In the above command, replace /dev/mmcblk0 with the block device file created in the system when you insert your SD card (whose partitions must NOT be mounted for this to work correctly); the image file will be created as mySDcard.img.






                share|improve this answer













                The /boot/uEnv.txt file is being modified by the eMMC flasher script which executes when you boot the board with the uEnv.txt file containining the line cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh: the cmdline parameter in that file indicates the kernel command line, which U-Boot passes to the Linux kernel when booting.



                So with that line in uEnv.txt you are basically telling U-Boot to tell the kernel to launch a "non-conventional" application instead of the default init program (which would boot the system "normally"). This application, which runs under Linux, can access the entire SD card and eMMC memories, including the partition containing the uEnv.txt file, and can change the file contents as it sees fit.



                Regarding your last question, you can create a file containing your modified SD card image from a Linux shell, using the dd tool, e.g:



                dd if=/dev/mmcblk0 of=mySDcard.img



                In the above command, replace /dev/mmcblk0 with the block device file created in the system when you insert your SD card (whose partitions must NOT be mounted for this to work correctly); the image file will be created as mySDcard.img.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 29 '18 at 20:32









                Francesco LavraFrancesco Lavra

                27318




                27318
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f53335785%2fuenv-txt-boot-file-confusion-with-embedded-linux%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

                    Florida Star v. B. J. F.

                    Error while running script in elastic search , gateway timeout

                    Adding quotations to stringified JSON object values