Why are u-boot's printenv and linux's fw_printenv default values different?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why are u-boot's printenv and linux's fw_printenv default values different?

Jump to solution
3,113 Views
songhee_yun
Contributor III

Hello~

I use lx2160ardb board.

Why are u-boot's printenv and linux's fw_printenv default values different?

How do i set if i want to use the same default value?

0 Kudos
1 Solution
2,930 Views
songhee_yun
Contributor III

hi~ Thank you for your help.

but, i solved my problem myself.

u-boot printenv & linux fw_printenv default value is different.

- Linux fw_printenv(ex. bootdelay=2) is downloaded binary for url.

- U-boot printenv is compiled with my configuration(ex. bootdelay=10).

So, default value is different.

And i tried to compile u-boot/tools/env/ directory, then fw_printenv that compiled has same default env as u-boot printenv tool.

View solution in original post

0 Kudos
4 Replies
2,929 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello songhee yun,

After creating configuration file  /etc/fw_env.config as the following, I execute command "fw_printenv" to get u-boot environment parameters as the attachment, I compared this file with the one generated by u-boot pri command, they are same.

# cat /etc/fw_env.config
/dev/mtd0 0x500000 0x2000 0x20000

 

Please make sure you get u-boot environment parameters from the same flash bank.

Thanks,

Yiping

0 Kudos
2,930 Views
songhee_yun
Contributor III

Hello yipingwang

I uses sd card(DIP SW1 1111->1000) and CONFIG_SYS_MMC_ENV_DEV 0 -> 1

I configure fw_env.conf already. and i tested 2 cases.

/dev/mmcblk0   0x500000 0x2000

First, i tried '# env default -f -a' at u-boot command line.

Second, i tried 'dd if=/dev/null of=/dev/mmcblk0 bs=1 skip=0x500000 seek=0x500000 count=20' after linux booting.

And that cases results are different. 

0 Kudos
2,930 Views
yipingwang
NXP TechSupport
NXP TechSupport

In "dd" command seek should be 0x02800, bs should be 512

0 Kudos
2,931 Views
songhee_yun
Contributor III

hi~ Thank you for your help.

but, i solved my problem myself.

u-boot printenv & linux fw_printenv default value is different.

- Linux fw_printenv(ex. bootdelay=2) is downloaded binary for url.

- U-boot printenv is compiled with my configuration(ex. bootdelay=10).

So, default value is different.

And i tried to compile u-boot/tools/env/ directory, then fw_printenv that compiled has same default env as u-boot printenv tool.

0 Kudos