AnsweredAssumed Answered

How to access u boot environment from linux?

Question asked by Alex Komar on Jul 3, 2013
Latest reply on Sep 12, 2013 by Yuri Muhin
Branched to a new discussion


I try to make firmware update tool for imx35. But i have one problem (


How can I access and change the u-Boot env variables in linux. Using the u-boot/tools/env directory in u boot directory:

u-boot$ make env 

Which created the executable file fw_printenv. I copied this to /usr/sbin and on target etc/fw_env.config file:

# Configuration file for fw_(printenv/saveenv) utility. # Up to two entries are valid, in this case the redundand # environment sector is assumed present. # MTD device name Device offset Env. size Flash sector size /dev/mtd0 0x00000 0x20000 0x80000 



What is causing this error?

Warning: Bad CRC, using default environment

bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm




target# cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00080000 00020000 "Bootloader"

mtd1: 00300000 00020000 "nor.Kernel.1"

mtd2: 00300000 00020000 "nor.Kernel.2"

mtd3: 01c00000 00020000 "nor.rootfs.1"

mtd4: 01c00000 00020000 "nor.rootfs.2"

mtd5: 00003000 00020000 "FIS directory"

mtd6: 02001000 00020000 "Redboot config"

mtd7: 00300000 00080000 "nand.bootloader"

mtd8: 00500000 00080000 "nand.kernel"

mtd9: 10000000 00080000 "nand.rootfs"

mtd10: 00800000 00080000 "nand.configure"

mtd11: 6f000000 00080000 "nand.userfs"