fw_printenv prints always default environment instead of updated environment on boot.

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

fw_printenv prints always default environment instead of updated environment on boot.

Jump to solution
2,088 Views
Nitishroy
Contributor I

I am trying to access u-boot from user space of imx8qmmek and for that I have compiled u-boot-fslc-fw-utils recipes in my yocto image. I could see that fw_printenv binary is successfully generated. I flashed my image on the target and test fw_printenv command from user space but it always prints default environment variable instead of updated environment variable on boot. I could see that environment variable printed from u-boot is different from user space. 

Please guide me to resolve this issue.

Thank you.

0 Kudos
Reply
1 Solution
2,065 Views
weidong_sun
NXP TechSupport
NXP TechSupport

You also need to confirm whether this partition is read-only:

echo 0> /sys/block/mmcblk0boot0/force_ro

[I don't confirm this path of i.MX8QM, you can try or check it. ]

 

weidong

View solution in original post

0 Kudos
Reply
6 Replies
2,066 Views
weidong_sun
NXP TechSupport
NXP TechSupport

You also need to confirm whether this partition is read-only:

echo 0> /sys/block/mmcblk0boot0/force_ro

[I don't confirm this path of i.MX8QM, you can try or check it. ]

 

weidong

0 Kudos
Reply
2,055 Views
Nitishroy
Contributor I

Hi @weidong_sun 

I could able to resolve it. Thank you for your support.

 

0 Kudos
Reply
2,070 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Did you try config file like this:

/dev/mmcblk0boot0

 

weidong

0 Kudos
Reply
2,069 Views
Nitishroy
Contributor I

Yes. But issue did not get resolved.

Thank you.

0 Kudos
Reply
2,077 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,

 When using fw_printenv and fw_setenv, fw_env.config is a very important configuration file. 

 When using fw_printenv and fw_setenv, fw_env.config is a very important configuration file. Only the correct configuration of offset position and size can display and set u-boot environment variables correctly. You can modify this configuration file by the value of CONFIG_ENV_OFFSET. 

 

Try it, please!

Have a nice day!

B.R,

Weidong

0 Kudos
Reply
2,076 Views
Nitishroy
Contributor I

Hi @weidong_sun 

Yes, I have modified the value of fw_env.config file with the value of CONFIG_ENV_OFFSET and CONFIG_ENV_SIZE as per the value given in the imx8qm_mek_defconfig file for option "/dev/mmcblk0". But facing the same issue. fw_printenv command always prints default environment variable.

Thank you. 

0 Kudos
Reply