user8908459
user8908459

Reputation: 577

What do these U-boot arguments do?

I am looking at a uEnv.txt file with the following lines:

bootpart=0:1                                                                                                                               
devtype=mmc
bootdir=                                                                                                                                   
bootfile=zImage                                                                                                                            
bootpartition=mmcblk0p2                                                                                                                    
set_mmc1=if test $board_name = A33515BB; then setenv bootpartition mmcblk1p2; fi                                                           
set_bootargs=setenv bootargs console=ttyO0,115200n8 root=/dev/${bootpartition} rw rootfstype=ext4 rootwait                                 
uenvcmd=run set_mmc1; run set_bootargs;run loadimage;run loadfdt;printenv bootargs;bootz ${loadaddr} - ${fdtaddr} 

Some of these things make sense. For example, line 7 sets the u-boot environment variable bootargs (documented here) with kernel command-line parameters (documented here).

On line 5, bootpartition is set which is later used in the kernel arguments.

However, many of the variables never seem to be used anywhere (i.e. bootpart, devtype, bootfile, etc). What are these for and where can I find documentation? Also, why does the setenv bootargs... line need to be assigned to set_bootargs?

Upvotes: 0

Views: 3504

Answers (1)

Tom Rini
Tom Rini

Reputation: 2173

You cannot look at a uEnv.txt file by itself, you need to look at in the context of the board's environment as a uEnv.txt will be loaded to modify the existing environment and also run that uenvcmd. It's quite likely those variables you don't see directly referenced are referenced in other parts of the full environment such as loadimage.

Upvotes: 1

Related Questions