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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
2,087件の閲覧回数
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 件の賞賛
返信
1 解決策
2,064件の閲覧回数
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 件の賞賛
返信
6 返答(返信)
2,065件の閲覧回数
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 件の賞賛
返信
2,054件の閲覧回数
Nitishroy
Contributor I

Hi @weidong_sun 

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

 

0 件の賞賛
返信
2,069件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Did you try config file like this:

/dev/mmcblk0boot0

 

weidong

0 件の賞賛
返信
2,068件の閲覧回数
Nitishroy
Contributor I

Yes. But issue did not get resolved.

Thank you.

0 件の賞賛
返信
2,076件の閲覧回数
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 件の賞賛
返信
2,075件の閲覧回数
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 件の賞賛
返信