All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] fw_printenv (uboot2011.12) 'Warning: Bad CRC, using default environment'
@ 2013-07-31 13:26 Andy Neubi
  2013-07-31 16:51 ` Andreas Bießmann
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Neubi @ 2013-07-31 13:26 UTC (permalink / raw)
  To: u-boot

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
[root at buildroot ~]# cat /proc/mtd dev:    size   erasesize  namemtd0: 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"

# MTD device name       Device offset   Env. size       Flash sector size/dev/mtd2              0x0000          0x20000          0x20000

[root at buildroot ~]# fw_printenv Warning: Bad CRC, using default environmentbootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootmbootdelay=5baudrate=115200

- 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

>>> uboot-tools 2013.04 Building/usr/bin/make -j2 -C /home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04 HOSTCC="/home/neubacher/indect/trunk/buildroot-system/output/host/usr/bin/arm-none-linux-gnueabi-gcc" HOSTCFLAGS=" -pipe -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -Os  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" HOSTLDFLAGS="" HOSTSTRIP=true tools envmake[1]: Entering directory `/home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04'/usr/bin/make -C tools/env all MTD_VERSION=make[2]: Entering directory `/home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/tools/env'/home/neubacher/indect/trunk/buildroot-system/output/host/usr/bin/arm-none-linux-gnueabi-gcc -pipe -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -o fw_printenv /home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/lib/crc32.c  fw_env.c  fw_env_main.c /home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/lib/ctype.c /home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/lib/linux_string.c /home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/common/env_attr.c /home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/common/env_flags.c/usr/bin/make -C tools allmake[2]: Entering directory `/home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/tools'/home/neubacher/indect/trunk/buildroot-system/output/host/usr/bin/arm-none-linux-gnueabi-gcc -g -pipe -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -Os  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o crc32.o /home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/lib/crc32.c/home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/lib/crc32.c:14:20: fatal error: common.h: No such file or directorycompilation terminated./home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/lib/crc32.c:14:20: fatal error: common.h: No such file or directorycompilation terminated.make[2]: *** [crc32.o] Error 1make[2]: Leaving directory `/home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/tools'make[1]: *** [tools] Error 2make[1]: *** Waiting for unfinished jobs....fw_env.c:28:23: fatal error: env_flags.h: No such file or directorycompilation terminated./home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/lib/ctype.c:30:25: fatal error: linux/ctype.h: No such file or directorycompilation terminated./home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/lib/linux_string.c:11:25: fatal error: linux/ctype.h: No such file or directorycompilation terminated./home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/common/env_attr.c:29:20: fatal error: common.h: No such file or directorycompilation terminated./home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/common/env_flags.c:25:25: fatal error: linux/ctype.h: No such file or directorycompilation terminated.make[2]: *** [fw_printenv] Error 1make[2]: Leaving directory `/home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/tools/env'make[1]: *** [env] Error 2make[1]: Leaving directory `/home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04'make: *** [/home/neubacher/indect/trunk/buildroot-system/output/build/uboot-tools-2013.04/.stamp_built] Error 2neu


Q: ... i tried to modify the Makefile but without any success - somehow the includepath is wrong?!



Q: what is wrong with my "fw_printenv" setting?Q: why can't i build the uboot-tools later than uboot-2011.12 (all newer versions are broken)

cheers for any suggestions,andy 		 	   		  

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] fw_printenv (uboot2011.12) 'Warning: Bad CRC, using default environment'
  2013-07-31 13:26 [U-Boot] fw_printenv (uboot2011.12) 'Warning: Bad CRC, using default environment' Andy Neubi
@ 2013-07-31 16:51 ` Andreas Bießmann
  2013-08-01 15:15   ` Andreas Neubacher
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Bießmann @ 2013-07-31 16:51 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] fw_printenv (uboot2011.12) 'Warning: Bad CRC, using default environment'
  2013-07-31 16:51 ` Andreas Bießmann
@ 2013-08-01 15:15   ` Andreas Neubacher
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Neubacher @ 2013-08-01 15:15 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-01 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-31 13:26 [U-Boot] fw_printenv (uboot2011.12) 'Warning: Bad CRC, using default environment' Andy Neubi
2013-07-31 16:51 ` Andreas Bießmann
2013-08-01 15:15   ` Andreas Neubacher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.