Dear all,
Now I use SABRE-AI board.
The u-boot store in NAND flash (MT29F64G08AFAAAWP).
u-boot version is u-boot-2009.08 that get from LTIB.
<<build fw_printenv, fw_setenv>>
# cd u-boot-2009.08
u-boot-2009.08# make mx6dl_sabreauto_nand_config
u-boot-2009.08# make env
u-boot-2009.08# cp tools/env/fw_printenv tools/env/fw_setenv
copy fw_printenv and fw_setenv to SABRE-AI board (/home/linaro/ directory).
<<following is my /etc/fw_env.config on SABRE-AI>>
root@linaro-ubuntu-desktop:/home/linaro# cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0x100000 0x2000 0x2000 1
<<fw_printenv, fw_setenv test on SABRE-AI board>>
root@linaro-ubuntu-desktop:/home/linaro#./fw_printenv bootdelay
bootdelay=3
root@linaro-ubuntu-desktop:/home/linaro# ./fw_setenv bootdelay 5
MTD erase error on /dev/mtd0: Invalid argument
Error: can't write fw_env to flash
root@linaro-ubuntu-desktop:/home/linaro#
<<Question>>
The fw_printenv command is OK.
The fw_setenv command fail.
Could you help me to fix fw_setenv fail ?
Thank you very much
-Jason
To configure correctly fw_env.config, please use section FLASH and environment
organization in the board header file in U-boot directory
\include\configs\mx6qsabreauto.h
There environment parameters are as following :
CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE, CONFIG_ENV_SIZE.
Device offset (of Linux fw_env.config) = CONFIG_ENV_OFFSET
Env. size = CONFIG_ENV_SIZE
Flash sector size = CONFIG_ENV_SIZE.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yuri,
Thanks about your reply.
I use SABRE-AI Dual Lite CPU board.
My u-boot store in the NAND flash (MT29F64G08AFAAAWP).
So I refer include\configs\mx6dl_sabreauto_nand.h.
Following get from mx6dl_sabreauto_nand.h.
#define CONFIG_ENV_SECT_SIZE (8 * 1024)
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_OFFSET 0x100000
8 * 1024 = 0x2000
So my /etc/fw_env.config is
root@linaro-ubuntu-desktop:/home/linaro# cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0x100000 0x2000 0x2000 1
<<fw_printenv, fw_setenv test on SABRE-AI board>>
root@linaro-ubuntu-desktop:/home/linaro#./fw_printenv bootdelay
bootdelay=3
root@linaro-ubuntu-desktop:/home/linaro# ./fw_setenv bootdelay 5
MTD erase error on /dev/mtd0: Invalid argument
Error: can't write fw_env to flash
root@linaro-ubuntu-desktop:/home/linaro#
<<Question>>
The fw_printenv command OK.
The fw_setenv command still fail.
Do you have any suggestion about fw_env.config?
Do my fw_env.config need to modify?
-Jason
Did you progress on this issue? Did you find what was your problem?