[U-Boot] fw_printenv (uboot2011.12) 'Warning: Bad CRC, using default environment'

Andreas Neubacher a_neubi at hotmail.com
Thu Aug 1 17:15:58 CEST 2013


On 31.07.2013 18:51, Andreas Bießmann wrote:
> Dear Andy Neubi,
>
> On 31.07.13 15:26, Andy Neubi wrote:
>> hi,
>> i'm using the uboot-tools (fw_printenv) to readout the env-settings of my beagleboard-XM uboot. unfortunately i always getthe 'Warning: Bad CRC, using default environment' msg
> please configure your MUA to wrap at about 78 chars
>
>> [root at buildroot ~]# cat /proc/mtd
>> dev:    size   erasesize  name
>> mtd0: 00080000 00020000 "X-Loader"
>> mtd1: 001e0000 00020000 "U-Boot"
>> mtd2: 00020000 00020000 "U-Boot Env"
>> mtd3: 00800000 00020000 "Kernel"
>> mtd4: 00800000 00020000 "Kernel Backup Partition"
>> mtd5: 0ed80000 00020000 "File System"
>>
> Next seems to be /etc/fw_env.config
>
>> # MTD device name       Device offset   Env. size       Flash sector size
>> /dev/mtd2              0x0000          0x20000          0x20000
> Do you really know the env size is the same as the sector size?
> Sometimes one define a smaller space for faster reading.
> Have you tried to dd the mtd2 into an file and investigate it (the env
> structure is quite simple and should easily be understood when reading
> the code).
>
>> [root at buildroot ~]# fw_printenv
>> Warning: Bad CRC, using default environment
>> bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
>> bootdelay=5
>> baudrate=115200
> (re-formatted for better readability)
>
> That's the 'default env' defined in fw_env.h, not the default env of
> your board!
>
>> - uboot-version of my beagleboard is 2013.04- uboot-tools-version under buildroot is 2011.12- ubuntu 13.04
>>
>> Q: what i'm doing wrong?
>>
>> -> IMHO so in most cases 2 different uboot versions are not good, so i tried to build the uboot-tools-2013.04 ... unfortunately i always get
> That's not true! You can use an older fw_printenv tool to read the
> environment of a newer u-boot. The environment format is fix since ages
> and will not change cause we want to read an older environment with an
> newer u-boot .. so that's obvious.
>
>> uboot-tools-2013.04/lib/crc32.c:14:20: fatal error: common.h: No such file or directory
> This means your u-boot is not configured. Somewhere in 2012 a commit
> stopped building env target for unconfigured u-boot. There where a lot
> of discussion around, unfortunately no solution was found. Maybe your
> complaint gives some new input to that.
> So a 'make <your board name>_config' before 'make
> HOSTCC=${CROSS_COMPILE}gcc env' should solve your issue.
>
> Best regards
>
> Andreas Bießmann
>
>

hi,

thx for your quick response ... now i got the 2013.04-tools version 
working!! :)

br,
Andy


More information about the U-Boot mailing list