Hi,
I am using OMAP3 EVM kit.
I am getting "Cannot read bad block mark: Invalid argument" while reading the u-boot environment variables from linux console. I can erase and read/write environment variables from u-boot with no problem and even with flash_erase and flash_dump mtd-utils so I know the Nand sectors are not bad.
********************************************************
/ # ./fw_printenv
Cannot read bad block mark: Invalid argument
********************************************************
I commented the bad block sectors check and crc check in fw_printenv source code in u-boot-omap3/tools/env and recompiled.
Now I can print the u-boot environment variables correctly.
But, now fw_setenv is not writing the environment variables. I get the below error:
******************************************************
/ # fw_setenv bootdelay 5
Writing new environment at 0x240000 on /dev/mtd/mtd2
MTD erase error on /dev/mtd/mtd2: Invalid argument
Error: can't write fw_env to flash
******************************************************
I can erase environment partition using mtd with no problem.
My fw_env.config file looks like:
/ # cat /etc/fw_env.config
/dev/mtd/mtd2 0x240000 0x40000 0x20000 0x2
I have compiled fw_printenv as below:
make env CROSS_COMPILE=/home/pawan//work/cross-compiler-armv5l/bin/armv5l-
/ # cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "xloader"
mtd1: 001c0000 00020000 "bootloader"
mtd2: 00040000 00020000 "environment"
mtd3: 05000000 00020000 "recovery"
mtd4: 05000000 00020000 "cache"
mtd5: 00040000 00020000 "misc"
mtd6: 00a00000 00020000 "boot"
mtd7: 08000000 00020000 "system"
mtd8: 0d340000 00020000 "userdata"
Please revert if anybody has any suggestion on how to change u-boot environment variables from linux.
Thanks,
Pawan