Uboot passes arguments to kernel!
Clash 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?
kernel boot linux-kernel boot-loader u-boot
add a comment |Â
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?
kernel boot linux-kernel boot-loader u-boot
add a comment |Â
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?
kernel boot linux-kernel boot-loader u-boot
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
kernel boot linux-kernel boot-loader u-boot
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
add a comment |Â
add a comment |Â
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.
add a comment |Â
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
add a comment |Â
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
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Jul 28 '15 at 14:51
gena2x
1,806618
1,806618
add a comment |Â
add a comment |Â
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
add a comment |Â
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
add a comment |Â
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
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
answered Jul 28 '15 at 14:40
Michael Shaw
61137
61137
add a comment |Â
add a comment |Â
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
add a comment |Â
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
add a comment |Â
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
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
answered Sep 3 at 6:42
Mojtaba Ahmadi
12110
12110
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password