AnsweredAssumed Answered

How to make fw_printenv and fw_setenv on MX6Q_SABRESD

Question asked by Qiulong Li on Nov 24, 2015
Latest reply on Aug 11, 2016 by Yen Chao



My environment is MX6Q_SABRESD,android 4.4.2,and my uboot stored in eMMC.I want to modify the uboot environment variables from userspace,then I found fw_printenv can do this,but maybe something wrong within my steps.


1.make fw_printenv

Then,I get fw_printenv.


2.Modify fw_env.config.

I need MTD device name and Device offset,Env. size,Flash sector size to do this,so I look up uboot-imx/include/configs/mx6q_sabresd.h,and then get Device offset = 0xC0000,Env. size = 0x2000,Flash sector size = 0x2000.

Then,I want to get MTD device name,so I cat /proc/mtd on my board, but I get nothing!

So that's my first question,Why can't I get the right device name?


3.copy fw_env.config to my board,and put it in /etc

Even though I can't get device name,I just go next.

In order to change /etc from read-only to read-write,I've done this command:

mount -o rw,remount -t ext4 /dev/block/mmcblk0p5

Then copy fw_env.config to /etc

4.Copy fw_printenv to my board,chmod and run

This is my second question,I can't execute fw_printenv,why?

I think maybe fw_printenv depends on other lib file to execute,so I've done this:

Then I found it depends on,but my path /lib doesn't have,only have my third question,where can I get


Please help me to handle this 3 questions.

Thank You

Qiulong Li.