Forums » Software Development »
fw_printenv not working
Added by Srinivasa Wunnimani almost 5 years ago
Hi,
fw_printenv command in kernel is not working, for new kernel (4.14).Is there any configuration we have to do u-boot or kernel for this to work.
we are using your u-boot & kernel images only for this experiment for AM3352.
fw_printenv is supposed to print environmental variables when the command is called , is our understanding correct.
we have also left uenv partition(/dev/mtd6) empty while writing to nand.
attached is the fw_env.config file we are using.
Is there any method to compile fw_printenv binary.
Regards
fw_env.config (827 Bytes) fw_env.config |
Replies (1)
RE: fw_printenv not working - Added by Jonathan Cormier almost 5 years ago
Your config file looks reasonable. Though I'm not sure we've ever gotten the fw_printenv command working. I just tried to build the command in two different versions of u-boot and got a variety of compile errors. But in theory you can build the tool by running "make ARCH=<appropriate toolchain> env" or envtools in newer u-boots.
we have also left uenv partition(/dev/mtd6) empty while writing to nand
You will need to call saveenv in u-boot for the /dev/mtd6 partition to get populated. Before that fw_printenv won't have anything to read.
Note that if you are trying to modify the environment from linux, my recommendation would be to store a file which can be read either on an sd card or in the rootfs nand partition. And have u-boot load the file into its environment. We do something similar by default with the uEnv.txt file in the boot partition of the sd card.