fw_printenv gives Warning: Bad CRC, using default environment.

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

fw_printenv gives Warning: Bad CRC, using default environment.

5,858 Views
Nitishroy
Contributor I

Hello Team,

I am trying to access u-boot environment from user space but facing issue with fw_utils like command fw_printenv always prints default environment instead of environment used on boot.

FYI: I have flashed my image in the emmc on iMX8QM_MEK board. So enabled the option for block devices in the fw_env.config file. 

Please help me to resolve this issue. 

Thank you.

0 Kudos
8 Replies

5,846 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

Did you print the uboot env successfully?

In my test ,it would show Warning: Bad CRC, using default environment, but it can print uboot args successfully.

 

BR

Zhiming

0 Kudos

5,840 Views
Nitishroy
Contributor I

Yes I can print the default environment, with warning: Bad CRC. But it is not taking the upgraded environment that is created on boot.

Thank you.

0 Kudos

5,818 Views
sinanakman
Senior Contributor III

 

Hi Nitishroy

It is possible that your u-boot is configured to save the environment to a device that is not configured properly or not configured at all. You might want to verify if CONFIG_SYS_MMC_ENV_DEV is set. On u-boot command line where you printed them, if you try to save them you might see where it is trying to save and if it fails.

Hope this helps.

Best regards

Sinan Akman

0 Kudos

5,811 Views
Nitishroy
Contributor I

Hi @sinanakman 

Yes, CONFIG_SYS_MMC_ENV_DEV is set in u-boot source code.

Thank you.

 

0 Kudos

5,808 Views
sinanakman
Senior Contributor III

Hi Nitishroy

When you try to save the environment what do you get ? Does it hint at any error ?

Regards

Sinan Akman

0 Kudos

5,834 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

HI

 

Tha just a warning and have no effect with uboot.

You can prevent the "Warning - bad CRC" by changing the u-boot configuration:

- disable CONFIG_ENV_IS_IN_FAT

- enable CONFIG_ENV_IS_NOWHERE

 

BR

Zhiming

0 Kudos

5,832 Views
Nitishroy
Contributor I

Hi
Actually the warning it is giving cause it is not finding correct environment variable and always switch to default environment. That's why the changes made in the u-boot with environment variable is not reflecting in the user space. So disabling the configuration suggested by you will not solve my problem.

Thank you.

0 Kudos

4,471 Views
jerry_liu
Contributor III

Hi,

I have the same problem.

Did you solve it?

 

Thanks!

0 Kudos