This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

fw_printenv

I am using AM335x-EVM and trying to use fw_printenv under tools/env directory. I compiled the code, change fw_env.config to point to /dev/mtd5 (for u-boot env), correct offset and size. When I try to run fw_printenv, I have an error:

           Cannot read bad block mark: Invalid argument

Looking at the code, it is failing at this call and I verified that the blockstart is 0x260000.

  int badblock = ioctl (fd, MEMGETBADBLOCK, blockstart);

If you have any idea, I really appreciate the help

  • Hi, 

    To work properly one need to specify the things properly in either 1) tool/env/fw_env.h with device name as /dev/mtdx with proper partition info , offset should be 0x0000 , where it is the starting location in that partition , size should match with u-boot's include/configs/xxx_evm.h 

    or 2) if #define fw_env.config is not commented, then use proper numbers in the file which is going to be placed in any of the binary locations like /usr/bin or sbin .... . check for the proper numbers there as well like /dev/mtd2 if the environment is getting stored in nand partition number 2, and  next feild should be zero, and the the size should match as per your u-boot's include/configs /xxx_evm.h. and the partition size is as per the /dev/mtdx . 

    Murali Krishna Dama

    dama.murali@gmail.com 

    murali.krishna@pathpartnertech.com