User error with fw_printenv - I hope

Mike Frysinger vapier.adi at gmail.com
Fri Mar 30 18:30:03 EDT 2012


On Fri, Mar 30, 2012 at 16:54, Bishop, Mark wrote:
> I am trying to read my uboot environment from userspace.  Not too successful.
>
> root:/> cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00080000 00020000 "bootloader(nand)"
> mtd1: 00800000 00020000 "linux kernel(nand)"
> mtd2: 06400000 00020000 "file system(nand)"
> mtd3: 09380000 00020000 "file system(ubifs)"
>
> From my uboot config:
> #define CONFIG_ENV_OFFSET       0x60000
> #define CONFIG_ENV_SIZE         0x20000
>
> Try #1
> root:/> cat /etc/fw_env.config
> /dev/mtd0               0x60000         0x20000         0x20000         1
>
> root:/> ./fw_printenv
> Cannot read bad block mark: Invalid argument

strace it to see what is actually complaining
-mike



More information about the linux-mtd mailing list