Uboot passes arguments to kernel!

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












How can uboot pass command line argument to kernel? I did some googling and got to know that it uses the bootargs environment variable. There it was mentioned that setenv bootargs key=value. Since I am using bash and don't have setenv I did this using export bootargs="value". But it's not affecting anything. I checked in /proc/cmdline the arguments remain the same.
Any idea what I am doing wrong?










share|improve this question



























    up vote
    1
    down vote

    favorite












    How can uboot pass command line argument to kernel? I did some googling and got to know that it uses the bootargs environment variable. There it was mentioned that setenv bootargs key=value. Since I am using bash and don't have setenv I did this using export bootargs="value". But it's not affecting anything. I checked in /proc/cmdline the arguments remain the same.
    Any idea what I am doing wrong?










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      How can uboot pass command line argument to kernel? I did some googling and got to know that it uses the bootargs environment variable. There it was mentioned that setenv bootargs key=value. Since I am using bash and don't have setenv I did this using export bootargs="value". But it's not affecting anything. I checked in /proc/cmdline the arguments remain the same.
      Any idea what I am doing wrong?










      share|improve this question















      How can uboot pass command line argument to kernel? I did some googling and got to know that it uses the bootargs environment variable. There it was mentioned that setenv bootargs key=value. Since I am using bash and don't have setenv I did this using export bootargs="value". But it's not affecting anything. I checked in /proc/cmdline the arguments remain the same.
      Any idea what I am doing wrong?







      kernel boot linux-kernel boot-loader u-boot






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 18 '15 at 2:18









      Thomas Dickey

      50.3k587157




      50.3k587157










      asked Jul 28 '15 at 14:10









      Thushi

      6,01621137




      6,01621137




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          2
          down vote













          There are two ways to pass arguments to kernel:
          1. Compile them inside.
          2. Use bootloader



          So first check if your arguments are not compiled into kernel.
          Second setenv command you've found in not a bash command but boot loader command. It depends on how particular device made, but usually there is a partition in some internal storage (flash memory of your device, not on host) where bootloader reads parameters or file on filesystem and u-boot takes configuration from there.



          Other way is to connect your device via cable and use device-specific way to get bootloader prompt and interactively change your settings.



          It's not really trivial if you not familiar with your particular device boot scheme. Name your device, it may help to answer your question.






          share|improve this answer



























            up vote
            1
            down vote













            You can use a uEnv.txt file in your boot partition to specify arguments for the boot. This is an example for Xilinx zynq-7000 devices from the yocto meta-zybo layer:



            kernel_image=uImage
            devicetree_image=zybo-zynq7.dtb
            bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait earlyprintk
            uenvcmd=echo Copying Linux from SD to RAM... && fatload mmc 0 0x3000000 $kernel_image && fatload mmc 0 0x2A00000 $devicetree_image && bootm 0x3000000 - 0x2A00000


            It specifies the device tree to use (you don't need to do this if your is called device_tree.dtb ) followed by a set of arguments for the kernel.



            You can find more information on the usage of uEnv.txt here






            share|improve this answer



























              up vote
              0
              down vote













              you can pass your boot files through uEnv.txt file, besides your files on SD card.



              you need these files for boot: BOOT.bin (loads fsbl and uboot), bitstream.bit (your bitstream that loads to PL, uImage (compiled linux kernel), devicetree.dtb (address of drivers that linux reads it), uramdisk.image.gz (linux files after booting).



              you can load these to your DDR by this commands:



              bootargs=console=ttyPS0,115200 root=/dev/ram rw earlyprintk
              load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
              fatload mmc 0 $devicetree_load_address $devicetree_image &&
              fatload mmc 0 $ramdisk_load_address $ramdisk_image uenvcmd=run mmc_loadbit_fat &&
              echo Copying Linux from SD to RAM... &&
              run load_image &&
              bootm $kernel_load_address $ramdisk_load_address $devicetree_load_address


              also if you want to load other linux files from ext4 partition of SD, you can use this commands on uEnv.txt:



              bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
              load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
              fatload mmc 0 $devicetree_load_address $devicetree_image uenvcmd=run mmc_loadbit_fat &&
              echo Copying Linux from SD to RAM... &&
              mmcinfo && run load_image &&
              bootm $kernel_load_address - $devicetree_load_address





              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',
                convertImagesToLinks: false,
                noModals: false,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                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%2f218846%2fuboot-passes-arguments-to-kernel%23new-answer', 'question_page');

                );

                Post as a guest






























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                2
                down vote













                There are two ways to pass arguments to kernel:
                1. Compile them inside.
                2. Use bootloader



                So first check if your arguments are not compiled into kernel.
                Second setenv command you've found in not a bash command but boot loader command. It depends on how particular device made, but usually there is a partition in some internal storage (flash memory of your device, not on host) where bootloader reads parameters or file on filesystem and u-boot takes configuration from there.



                Other way is to connect your device via cable and use device-specific way to get bootloader prompt and interactively change your settings.



                It's not really trivial if you not familiar with your particular device boot scheme. Name your device, it may help to answer your question.






                share|improve this answer
























                  up vote
                  2
                  down vote













                  There are two ways to pass arguments to kernel:
                  1. Compile them inside.
                  2. Use bootloader



                  So first check if your arguments are not compiled into kernel.
                  Second setenv command you've found in not a bash command but boot loader command. It depends on how particular device made, but usually there is a partition in some internal storage (flash memory of your device, not on host) where bootloader reads parameters or file on filesystem and u-boot takes configuration from there.



                  Other way is to connect your device via cable and use device-specific way to get bootloader prompt and interactively change your settings.



                  It's not really trivial if you not familiar with your particular device boot scheme. Name your device, it may help to answer your question.






                  share|improve this answer






















                    up vote
                    2
                    down vote










                    up vote
                    2
                    down vote









                    There are two ways to pass arguments to kernel:
                    1. Compile them inside.
                    2. Use bootloader



                    So first check if your arguments are not compiled into kernel.
                    Second setenv command you've found in not a bash command but boot loader command. It depends on how particular device made, but usually there is a partition in some internal storage (flash memory of your device, not on host) where bootloader reads parameters or file on filesystem and u-boot takes configuration from there.



                    Other way is to connect your device via cable and use device-specific way to get bootloader prompt and interactively change your settings.



                    It's not really trivial if you not familiar with your particular device boot scheme. Name your device, it may help to answer your question.






                    share|improve this answer












                    There are two ways to pass arguments to kernel:
                    1. Compile them inside.
                    2. Use bootloader



                    So first check if your arguments are not compiled into kernel.
                    Second setenv command you've found in not a bash command but boot loader command. It depends on how particular device made, but usually there is a partition in some internal storage (flash memory of your device, not on host) where bootloader reads parameters or file on filesystem and u-boot takes configuration from there.



                    Other way is to connect your device via cable and use device-specific way to get bootloader prompt and interactively change your settings.



                    It's not really trivial if you not familiar with your particular device boot scheme. Name your device, it may help to answer your question.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jul 28 '15 at 14:51









                    gena2x

                    1,806618




                    1,806618






















                        up vote
                        1
                        down vote













                        You can use a uEnv.txt file in your boot partition to specify arguments for the boot. This is an example for Xilinx zynq-7000 devices from the yocto meta-zybo layer:



                        kernel_image=uImage
                        devicetree_image=zybo-zynq7.dtb
                        bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait earlyprintk
                        uenvcmd=echo Copying Linux from SD to RAM... && fatload mmc 0 0x3000000 $kernel_image && fatload mmc 0 0x2A00000 $devicetree_image && bootm 0x3000000 - 0x2A00000


                        It specifies the device tree to use (you don't need to do this if your is called device_tree.dtb ) followed by a set of arguments for the kernel.



                        You can find more information on the usage of uEnv.txt here






                        share|improve this answer
























                          up vote
                          1
                          down vote













                          You can use a uEnv.txt file in your boot partition to specify arguments for the boot. This is an example for Xilinx zynq-7000 devices from the yocto meta-zybo layer:



                          kernel_image=uImage
                          devicetree_image=zybo-zynq7.dtb
                          bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait earlyprintk
                          uenvcmd=echo Copying Linux from SD to RAM... && fatload mmc 0 0x3000000 $kernel_image && fatload mmc 0 0x2A00000 $devicetree_image && bootm 0x3000000 - 0x2A00000


                          It specifies the device tree to use (you don't need to do this if your is called device_tree.dtb ) followed by a set of arguments for the kernel.



                          You can find more information on the usage of uEnv.txt here






                          share|improve this answer






















                            up vote
                            1
                            down vote










                            up vote
                            1
                            down vote









                            You can use a uEnv.txt file in your boot partition to specify arguments for the boot. This is an example for Xilinx zynq-7000 devices from the yocto meta-zybo layer:



                            kernel_image=uImage
                            devicetree_image=zybo-zynq7.dtb
                            bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait earlyprintk
                            uenvcmd=echo Copying Linux from SD to RAM... && fatload mmc 0 0x3000000 $kernel_image && fatload mmc 0 0x2A00000 $devicetree_image && bootm 0x3000000 - 0x2A00000


                            It specifies the device tree to use (you don't need to do this if your is called device_tree.dtb ) followed by a set of arguments for the kernel.



                            You can find more information on the usage of uEnv.txt here






                            share|improve this answer












                            You can use a uEnv.txt file in your boot partition to specify arguments for the boot. This is an example for Xilinx zynq-7000 devices from the yocto meta-zybo layer:



                            kernel_image=uImage
                            devicetree_image=zybo-zynq7.dtb
                            bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait earlyprintk
                            uenvcmd=echo Copying Linux from SD to RAM... && fatload mmc 0 0x3000000 $kernel_image && fatload mmc 0 0x2A00000 $devicetree_image && bootm 0x3000000 - 0x2A00000


                            It specifies the device tree to use (you don't need to do this if your is called device_tree.dtb ) followed by a set of arguments for the kernel.



                            You can find more information on the usage of uEnv.txt here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jul 28 '15 at 14:40









                            Michael Shaw

                            61137




                            61137




















                                up vote
                                0
                                down vote













                                you can pass your boot files through uEnv.txt file, besides your files on SD card.



                                you need these files for boot: BOOT.bin (loads fsbl and uboot), bitstream.bit (your bitstream that loads to PL, uImage (compiled linux kernel), devicetree.dtb (address of drivers that linux reads it), uramdisk.image.gz (linux files after booting).



                                you can load these to your DDR by this commands:



                                bootargs=console=ttyPS0,115200 root=/dev/ram rw earlyprintk
                                load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
                                fatload mmc 0 $devicetree_load_address $devicetree_image &&
                                fatload mmc 0 $ramdisk_load_address $ramdisk_image uenvcmd=run mmc_loadbit_fat &&
                                echo Copying Linux from SD to RAM... &&
                                run load_image &&
                                bootm $kernel_load_address $ramdisk_load_address $devicetree_load_address


                                also if you want to load other linux files from ext4 partition of SD, you can use this commands on uEnv.txt:



                                bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
                                load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
                                fatload mmc 0 $devicetree_load_address $devicetree_image uenvcmd=run mmc_loadbit_fat &&
                                echo Copying Linux from SD to RAM... &&
                                mmcinfo && run load_image &&
                                bootm $kernel_load_address - $devicetree_load_address





                                share|improve this answer
























                                  up vote
                                  0
                                  down vote













                                  you can pass your boot files through uEnv.txt file, besides your files on SD card.



                                  you need these files for boot: BOOT.bin (loads fsbl and uboot), bitstream.bit (your bitstream that loads to PL, uImage (compiled linux kernel), devicetree.dtb (address of drivers that linux reads it), uramdisk.image.gz (linux files after booting).



                                  you can load these to your DDR by this commands:



                                  bootargs=console=ttyPS0,115200 root=/dev/ram rw earlyprintk
                                  load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
                                  fatload mmc 0 $devicetree_load_address $devicetree_image &&
                                  fatload mmc 0 $ramdisk_load_address $ramdisk_image uenvcmd=run mmc_loadbit_fat &&
                                  echo Copying Linux from SD to RAM... &&
                                  run load_image &&
                                  bootm $kernel_load_address $ramdisk_load_address $devicetree_load_address


                                  also if you want to load other linux files from ext4 partition of SD, you can use this commands on uEnv.txt:



                                  bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
                                  load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
                                  fatload mmc 0 $devicetree_load_address $devicetree_image uenvcmd=run mmc_loadbit_fat &&
                                  echo Copying Linux from SD to RAM... &&
                                  mmcinfo && run load_image &&
                                  bootm $kernel_load_address - $devicetree_load_address





                                  share|improve this answer






















                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    you can pass your boot files through uEnv.txt file, besides your files on SD card.



                                    you need these files for boot: BOOT.bin (loads fsbl and uboot), bitstream.bit (your bitstream that loads to PL, uImage (compiled linux kernel), devicetree.dtb (address of drivers that linux reads it), uramdisk.image.gz (linux files after booting).



                                    you can load these to your DDR by this commands:



                                    bootargs=console=ttyPS0,115200 root=/dev/ram rw earlyprintk
                                    load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
                                    fatload mmc 0 $devicetree_load_address $devicetree_image &&
                                    fatload mmc 0 $ramdisk_load_address $ramdisk_image uenvcmd=run mmc_loadbit_fat &&
                                    echo Copying Linux from SD to RAM... &&
                                    run load_image &&
                                    bootm $kernel_load_address $ramdisk_load_address $devicetree_load_address


                                    also if you want to load other linux files from ext4 partition of SD, you can use this commands on uEnv.txt:



                                    bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
                                    load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
                                    fatload mmc 0 $devicetree_load_address $devicetree_image uenvcmd=run mmc_loadbit_fat &&
                                    echo Copying Linux from SD to RAM... &&
                                    mmcinfo && run load_image &&
                                    bootm $kernel_load_address - $devicetree_load_address





                                    share|improve this answer












                                    you can pass your boot files through uEnv.txt file, besides your files on SD card.



                                    you need these files for boot: BOOT.bin (loads fsbl and uboot), bitstream.bit (your bitstream that loads to PL, uImage (compiled linux kernel), devicetree.dtb (address of drivers that linux reads it), uramdisk.image.gz (linux files after booting).



                                    you can load these to your DDR by this commands:



                                    bootargs=console=ttyPS0,115200 root=/dev/ram rw earlyprintk
                                    load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
                                    fatload mmc 0 $devicetree_load_address $devicetree_image &&
                                    fatload mmc 0 $ramdisk_load_address $ramdisk_image uenvcmd=run mmc_loadbit_fat &&
                                    echo Copying Linux from SD to RAM... &&
                                    run load_image &&
                                    bootm $kernel_load_address $ramdisk_load_address $devicetree_load_address


                                    also if you want to load other linux files from ext4 partition of SD, you can use this commands on uEnv.txt:



                                    bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
                                    load_image=fatload mmc 0 $kernel_load_address $kernel_image &&
                                    fatload mmc 0 $devicetree_load_address $devicetree_image uenvcmd=run mmc_loadbit_fat &&
                                    echo Copying Linux from SD to RAM... &&
                                    mmcinfo && run load_image &&
                                    bootm $kernel_load_address - $devicetree_load_address






                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Sep 3 at 6:42









                                    Mojtaba Ahmadi

                                    12110




                                    12110



























                                         

                                        draft saved


                                        draft discarded















































                                         


                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f218846%2fuboot-passes-arguments-to-kernel%23new-answer', 'question_page');

                                        );

                                        Post as a guest













































































                                        Popular posts from this blog

                                        How to check contact read email or not when send email to Individual?

                                        Displaying single band from multi-band raster using QGIS

                                        How many registers does an x86_64 CPU actually have?