Where are u-boot.imx environment variables installed after saveenv?

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

Where are u-boot.imx environment variables installed after saveenv?

2,108 Views
jupiter_hce
Contributor III

Hi,

I have MTD partitions: mtdparts "gpmi-nand:1m(boot),1m(ubootenv),-(storage)"

If I connected NXP USB HID class device to run uuu SDP: boot -f u-boot.imx -nojump, I can see all the environment settings from the u-boot-ram.imx, then I run saveenv, after I disconnected USB HID, the device was in NAND boot, I stopped it in u-boot, all environment values were lost, the saveenv did not save the environment to NAND.

How to write  u-boot.imxI to partitions 1m(boot),1m(ubootenv)? Using nand write.trimffs <u-boot.imx> boot?

Thank you.

Kind regards,

- jh

Labels (4)
0 Kudos
2 Replies

1,941 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jupiter

one can look at linux - How u-boot bootloader reads/saves its environment Variables? - Stack Overflow 

and  #define CONFIG_SYS_MMC_ENV_DEV        1   /* USDHC2 */
mx6ul_14x14_evk.h\configs\include - uboot-imx - i.MX U-Boot 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,941 Views
jupiter_hce
Contributor III

Hi igorpadykov, thanks for the response. I found that the saveenv depends on fdt_addr, but I could not find it in document if the fdt_addr=0x83000000 must be used in mx6ul_14x14_evk, if I change the fdt_addr it could not even boot:

=> print fdt_addr
fdt_addr=0x88c00000
=> saveenv
saveenv
Saving Environment to NAND... Erasing NAND...
Erasing at 0x5e0000 -- 100% complete.
Writing to NAND... OK

=> print fdt_addr
fdt_addr=0x83000000
=> saveenv
Saving Environment to NAND... Erasing NAND...
Erasing at 0x3c00000 -- 100% complete.
Writing to NAND... OK
OK

Could anyone help to explain if the fdt_addr is hard coded in u-boot to link to kernel or what I could be missing?

Thank you.

Kind regards

- jh

0 Kudos