Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

using fw_setenv to write U-boot environment variables to nand from linux gives bad CRC error

$
0
0

We are having problems using fw_setenv to set U-boot environment variables in nand from linux.

Here is the nand partition layout:-
>cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00020000 "SPL"
mtd1: 00020000 00020000 "SPL.backup1"
mtd2: 00020000 00020000 "SPL.backup2"
mtd3: 00020000 00020000 "SPL.backup3"
mtd4: 001e0000 00020000 "U-Boot"
mtd5: 00020000 00020000 "U-Boot Env"
mtd6: 04000000 00020000 "Kernel+initramfs"
mtd7: 0bd80000 00020000 "File System"

/etc/fw_env.config:-
/dev/mtd5 0x0000 0x2000 0x20000

fw_printenv from linux appears to work ok.

If I create a new environment variable using fw_setenv such as...
>fw_setenv test 123
then fw_printenv displays the new variable as expected.

However, when I reboot, U-boot indicates 'bad CRC, using default environment'.

It suggests a mismatch between the ECC method used by U-boot to read environment variables
and that used by fw_setenv when saving.

We are using:-

linux-3.1.0-psp04.06.00.03.sdk
u-boot-2011.09-psp04.06.00.03

I have looked through a number of forums and although I've found others with
similar issues, I have not found a solution.

Any help appreciated.


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>